From a9e8148f8519c714dbf6ff9a1e9567d31f2aa332 Mon Sep 17 00:00:00 2001 From: praneesha Date: Wed, 12 Jul 2023 17:39:47 +0530 Subject: [PATCH 01/94] Add the FaaS BBE changes --- .../aws-lambda-dynamodb-trigger.bal | 8 +++ .../aws-lambda-dynamodb-trigger.md | 46 ++++++++++++++ .../aws-lambda-dynamodb-trigger.metatags | 2 + .../aws_deploy.out | 1 + .../aws-lambda-dynamodb-trigger/bal_build.out | 12 ++++ .../aws-lambda-dynamodb-trigger/bal_new.out | 1 + .../aws-lambda-execution-context.bal | 12 ++++ .../aws-lambda-execution-context.md | 39 ++++++++++++ .../aws-lambda-execution-context.metatags | 2 + .../aws_deploy.out | 1 + .../bal_build.out | 12 ++++ .../aws-lambda-execution-context/bal_new.out | 1 + .../invoke_functions.out | 8 +++ .../aws-lambda-hello-world.bal | 9 +++ .../aws-lambda-hello-world.md | 39 ++++++++++++ .../aws-lambda-hello-world.metatags | 2 + .../aws-lambda-hello-world/aws_deploy.out | 1 + examples/aws-lambda-hello-world/bal_build.out | 12 ++++ examples/aws-lambda-hello-world/bal_new.out | 1 + .../invoke_functions.out | 8 +++ .../aws-lambda-s3-trigger.bal | 8 +++ .../aws-lambda-s3-trigger.md | 45 ++++++++++++++ .../aws-lambda-s3-trigger.metatags | 2 + examples/aws-lambda-s3-trigger/aws_deploy.out | 1 + examples/aws-lambda-s3-trigger/bal_build.out | 12 ++++ examples/aws-lambda-s3-trigger/bal_new.out | 1 + .../az_deploy.out | 12 ++++ .../azure-functions-cosmosdb-trigger.bal | 18 ++++++ .../azure-functions-cosmosdb-trigger.md | 61 +++++++++++++++++++ .../azure-functions-cosmosdb-trigger.metatags | 2 + .../bal_build.out | 14 +++++ .../bal_new.out | 1 + .../azure-functions-hello-world/az_deploy.out | 12 ++++ .../azure-functions-hello-world.bal | 9 +++ .../azure-functions-hello-world.md | 45 ++++++++++++++ .../azure-functions-hello-world.metatags | 2 + .../azure-functions-hello-world/bal_build.out | 14 +++++ .../azure-functions-hello-world/bal_new.out | 1 + .../execute_function.out | 2 + .../az_deploy.out | 10 +++ ...zure-functions-http-trigger-with-queue.bal | 16 +++++ ...azure-functions-http-trigger-with-queue.md | 42 +++++++++++++ ...functions-http-trigger-with-queue.metatags | 2 + .../bal_build.out | 14 +++++ .../bal_new.out | 1 + .../execute_function.out | 5 ++ .../az_deploy.out | 12 ++++ .../azure-functions-timer-trigger.bal | 12 ++++ .../azure-functions-timer-trigger.md | 35 +++++++++++ .../azure-functions-timer-trigger.metatags | 2 + .../bal_build.out | 14 +++++ .../azure-functions-timer-trigger/bal_new.out | 1 + examples/docker-hello-world/Cloud.toml | 4 ++ examples/docker-hello-world/build_output.out | 13 ++++ .../docker-hello-world/docker-hello-world.bal | 10 +++ .../docker-hello-world/docker-hello-world.md | 23 +++++++ examples/docker-hello-world/docker_images.out | 4 ++ examples/docker-hello-world/docker_run.out | 2 + examples/docker-hello-world/execute_curl.out | 2 + examples/kubernetes-hello-world/Cloud.toml | 4 ++ .../kubernetes-hello-world/build_output.out | 19 ++++++ .../kubernetes-hello-world/docker_push.out | 1 + .../kubernetes-hello-world/execute_curl.out | 2 + .../kubernetes-hello-world/kubectl_apply.out | 4 ++ .../kubernetes-hello-world/kubectl_expose.out | 2 + .../kubernetes-hello-world/kubectl_pods.out | 3 + .../kubernetes-hello-world/kubectl_svc.out | 4 ++ .../kubernetes-hello-world.bal | 10 +++ .../kubernetes-hello-world.md | 35 +++++++++++ .../kubernetes-hello-world/minikube_ip.out | 2 + 70 files changed, 789 insertions(+) create mode 100644 examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.bal create mode 100644 examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md create mode 100644 examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.metatags create mode 100644 examples/aws-lambda-dynamodb-trigger/aws_deploy.out create mode 100644 examples/aws-lambda-dynamodb-trigger/bal_build.out create mode 100644 examples/aws-lambda-dynamodb-trigger/bal_new.out create mode 100644 examples/aws-lambda-execution-context/aws-lambda-execution-context.bal create mode 100644 examples/aws-lambda-execution-context/aws-lambda-execution-context.md create mode 100644 examples/aws-lambda-execution-context/aws-lambda-execution-context.metatags create mode 100644 examples/aws-lambda-execution-context/aws_deploy.out create mode 100644 examples/aws-lambda-execution-context/bal_build.out create mode 100644 examples/aws-lambda-execution-context/bal_new.out create mode 100644 examples/aws-lambda-execution-context/invoke_functions.out create mode 100644 examples/aws-lambda-hello-world/aws-lambda-hello-world.bal create mode 100644 examples/aws-lambda-hello-world/aws-lambda-hello-world.md create mode 100644 examples/aws-lambda-hello-world/aws-lambda-hello-world.metatags create mode 100644 examples/aws-lambda-hello-world/aws_deploy.out create mode 100644 examples/aws-lambda-hello-world/bal_build.out create mode 100644 examples/aws-lambda-hello-world/bal_new.out create mode 100644 examples/aws-lambda-hello-world/invoke_functions.out create mode 100644 examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal create mode 100644 examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md create mode 100644 examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.metatags create mode 100644 examples/aws-lambda-s3-trigger/aws_deploy.out create mode 100644 examples/aws-lambda-s3-trigger/bal_build.out create mode 100644 examples/aws-lambda-s3-trigger/bal_new.out create mode 100644 examples/azure-functions-cosmosdb-trigger/az_deploy.out create mode 100644 examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal create mode 100644 examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md create mode 100644 examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.metatags create mode 100644 examples/azure-functions-cosmosdb-trigger/bal_build.out create mode 100644 examples/azure-functions-cosmosdb-trigger/bal_new.out create mode 100644 examples/azure-functions-hello-world/az_deploy.out create mode 100644 examples/azure-functions-hello-world/azure-functions-hello-world.bal create mode 100644 examples/azure-functions-hello-world/azure-functions-hello-world.md create mode 100644 examples/azure-functions-hello-world/azure-functions-hello-world.metatags create mode 100644 examples/azure-functions-hello-world/bal_build.out create mode 100644 examples/azure-functions-hello-world/bal_new.out create mode 100644 examples/azure-functions-hello-world/execute_function.out create mode 100644 examples/azure-functions-http-trigger-with-queue/az_deploy.out create mode 100644 examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal create mode 100644 examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md create mode 100644 examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.metatags create mode 100644 examples/azure-functions-http-trigger-with-queue/bal_build.out create mode 100644 examples/azure-functions-http-trigger-with-queue/bal_new.out create mode 100644 examples/azure-functions-http-trigger-with-queue/execute_function.out create mode 100644 examples/azure-functions-timer-trigger/az_deploy.out create mode 100644 examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal create mode 100644 examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md create mode 100644 examples/azure-functions-timer-trigger/azure-functions-timer-trigger.metatags create mode 100644 examples/azure-functions-timer-trigger/bal_build.out create mode 100644 examples/azure-functions-timer-trigger/bal_new.out create mode 100644 examples/docker-hello-world/Cloud.toml create mode 100644 examples/docker-hello-world/build_output.out create mode 100644 examples/docker-hello-world/docker-hello-world.bal create mode 100644 examples/docker-hello-world/docker-hello-world.md create mode 100644 examples/docker-hello-world/docker_images.out create mode 100644 examples/docker-hello-world/docker_run.out create mode 100644 examples/docker-hello-world/execute_curl.out create mode 100644 examples/kubernetes-hello-world/Cloud.toml create mode 100644 examples/kubernetes-hello-world/build_output.out create mode 100644 examples/kubernetes-hello-world/docker_push.out create mode 100644 examples/kubernetes-hello-world/execute_curl.out create mode 100644 examples/kubernetes-hello-world/kubectl_apply.out create mode 100644 examples/kubernetes-hello-world/kubectl_expose.out create mode 100644 examples/kubernetes-hello-world/kubectl_pods.out create mode 100644 examples/kubernetes-hello-world/kubectl_svc.out create mode 100644 examples/kubernetes-hello-world/kubernetes-hello-world.bal create mode 100644 examples/kubernetes-hello-world/kubernetes-hello-world.md create mode 100644 examples/kubernetes-hello-world/minikube_ip.out diff --git a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.bal b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.bal new file mode 100644 index 0000000000..42776fcc6c --- /dev/null +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.bal @@ -0,0 +1,8 @@ +import ballerina/io; +import ballerinax/awslambda; + +@awslambda:Function +public function dynamoDBTrigger(awslambda:Context ctx, + awslambda:DynamoDBEvent event) { + io:println(event.Records[0].dynamodb.Keys.toString()); +} diff --git a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md new file mode 100644 index 0000000000..a8d57fbdc9 --- /dev/null +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md @@ -0,0 +1,46 @@ +# AWS Lambda DynamoDB trigger + +This example creates a function, which will be executed for each entry added to a database in the DynamoDB. + +For more information, see the [AWS Lambda learn guide](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/). + +## Set up the prerequisites + +For instructions, see [Set up the prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/#set-up-the-prerequisites). + +## Write the function + +Follow the steps below to write the function. + +1. Execute the command below to create a new Ballerina package. + +::: out bal_new.out ::: + +2. Replace the content of the generated Ballerina file with the content below. + +::: code aws-lambda-dynamodb-trigger.bal ::: + +## Build the function + +Execute the command below to generate the AWS Lambda artifacts. + +::: out bal_build.out ::: + +## Deploy the function + +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. + +::: out aws_deploy.out ::: + +## Invoke the function + +Follow the instructions below to create a DynamoDB table for invoking this function. + +1. Navigate to [**roles**](https://console.aws.amazon.com/iamv2/home#/roles), and add `AWSLambdaDynamoDBExecutionRole` to the role you created in [Set up the prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/#set-up-the-prerequisites). +2. Go to [DynamoDB](https://us-west-1.console.aws.amazon.com/dynamodbv2). +3. Click **Create Table**, enter the table name and partition key, and create the table (if you already have a table created, you can skip this step). +4. Click on the DynamoDB table you created, and then click the **Exports and streams** tab. +5. Click **enable DynamoDB stream details**, and select the key attributes only for the event type. +6. Once it is enabled, click **Create a trigger**, select the `dynamoDBTrigger` from the dropdown, and create a trigger. +7. Go to [**Items**](https://us-west-1.console.aws.amazon.com/dynamodbv2) in the DynamoDB, select the table, and click **Create item** to add an entry to the DynamoDB table to invoke the Lambda function. +8. Go to the AWS Lambda function and check the logs via CloudWatch to see the object identifier in the logs. diff --git a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.metatags b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.metatags new file mode 100644 index 0000000000..ad99d516d2 --- /dev/null +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.metatags @@ -0,0 +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, aws lambda, dynamodb, serverless, cloud, function as a service diff --git a/examples/aws-lambda-dynamodb-trigger/aws_deploy.out b/examples/aws-lambda-dynamodb-trigger/aws_deploy.out new file mode 100644 index 0000000000..0069df5061 --- /dev/null +++ b/examples/aws-lambda-dynamodb-trigger/aws_deploy.out @@ -0,0 +1 @@ +$ aws lambda create-function --function-name dynamoDBTrigger --zip-file fileb://aws-ballerina-lambda-functions.zip --handler aws-lambda-dynamodb-trigger.dynamoDBTrigger --runtime provided --role arn:aws:iam::908363916111:role/lambda-role--layers arn:aws:lambda:us-west-1:134633749276:layer:ballerina-jre11:6 --memory-size 512 --timeout 10 diff --git a/examples/aws-lambda-dynamodb-trigger/bal_build.out b/examples/aws-lambda-dynamodb-trigger/bal_build.out new file mode 100644 index 0000000000..8fd10e70c7 --- /dev/null +++ b/examples/aws-lambda-dynamodb-trigger/bal_build.out @@ -0,0 +1,12 @@ +$ bal build +Compiling source + wso2/aws-lambda-dynamodb-trigger:0.1.0 + +Generating executable + @awslambda:Function: dynamoDBTrigger + + Run the following command to deploy each Ballerina AWS Lambda function: + aws lambda create-function --function-name $FUNCTION_NAME --zip-file fileb:///aws-lambda-s3-trigger/target/bin/aws-ballerina-lambda-functions.zip --handler aws-lambda-dynamodb-trigger.$FUNCTION_NAME --runtime provided --role $LAMBDA_ROLE_ARN --layers arn:aws:lambda:$REGION_ID:134633749276:layer:ballerina-jre11:6 --memory-size 512 --timeout 10 + + Run the following command to re-deploy an updated Ballerina AWS Lambda function: + aws lambda update-function-code --function-name $FUNCTION_NAME --zip-file fileb://aws-ballerina-lambda-functions.zip diff --git a/examples/aws-lambda-dynamodb-trigger/bal_new.out b/examples/aws-lambda-dynamodb-trigger/bal_new.out new file mode 100644 index 0000000000..6061dbdef8 --- /dev/null +++ b/examples/aws-lambda-dynamodb-trigger/bal_new.out @@ -0,0 +1 @@ +$ bal new aws-lambda-dynamodb-trigger diff --git a/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal b/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal new file mode 100644 index 0000000000..36bb967d82 --- /dev/null +++ b/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal @@ -0,0 +1,12 @@ +import ballerinax/awslambda; + +@awslambda:Function +public function ctxinfo(awslambda:Context ctx, json input) returns json|error { + return { + RequestID: ctx.getRequestId(), + DeadlineMS: ctx.getDeadlineMs(), + InvokedFunctionArn: ctx.getInvokedFunctionArn(), + TraceID: ctx.getTraceId(), + RemainingExecTime: ctx.getRemainingExecutionTime() + }; +} diff --git a/examples/aws-lambda-execution-context/aws-lambda-execution-context.md b/examples/aws-lambda-execution-context/aws-lambda-execution-context.md new file mode 100644 index 0000000000..24fbc442fa --- /dev/null +++ b/examples/aws-lambda-execution-context/aws-lambda-execution-context.md @@ -0,0 +1,39 @@ +# AWS Lambda execution context + +The example below demonstrates how the execution context information of an AWS function can be retrieved. + +For more information, see the [AWS Lambda learn guide](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/). + +## Set up the prerequisites + +For instructions, see [Set up the prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/#set-up-the-prerequisites). + +## Write the function + +Follow the steps below to write the function. + +1. Execute the command below to create a new Ballerina package. + +::: out bal_new.out ::: + +2. Replace the content of the generated Ballerina file with the content below. + +::: code aws-lambda-execution-context.bal ::: + +## Build the function + +Execute the command below to generate the AWS Lambda artifacts. + +::: out bal_build.out ::: + +## Deploy the function + +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. + +::: out aws_deploy.out ::: + +## Invoke the function + +Execute the commands below to invoke the function. + +::: out invoke_functions.out ::: diff --git a/examples/aws-lambda-execution-context/aws-lambda-execution-context.metatags b/examples/aws-lambda-execution-context/aws-lambda-execution-context.metatags new file mode 100644 index 0000000000..d75a357ce1 --- /dev/null +++ b/examples/aws-lambda-execution-context/aws-lambda-execution-context.metatags @@ -0,0 +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, serverless, cloud, function as a service diff --git a/examples/aws-lambda-execution-context/aws_deploy.out b/examples/aws-lambda-execution-context/aws_deploy.out new file mode 100644 index 0000000000..b92d5109ed --- /dev/null +++ b/examples/aws-lambda-execution-context/aws_deploy.out @@ -0,0 +1 @@ +$ aws lambda create-function --function-name ctxinfo --zip-file fileb://aws-ballerina-lambda-functions.zip --handler aws-lambda-execution-context.ctxinfo --runtime provided --role arn:aws:iam::908363916111:role/lambda-role --layers arn:aws:lambda:us-west-1:134633749276:layer:ballerina-jre11:6 --memory-size 512 --timeout 10 diff --git a/examples/aws-lambda-execution-context/bal_build.out b/examples/aws-lambda-execution-context/bal_build.out new file mode 100644 index 0000000000..c007fa3a34 --- /dev/null +++ b/examples/aws-lambda-execution-context/bal_build.out @@ -0,0 +1,12 @@ +$ bal build +Compiling source + wso2/aws-lambda-execution-context:0.1.0 + +Generating executable + @awslambda:Function: ctxinfo + + Run the following command to deploy each Ballerina AWS Lambda function: + aws lambda create-function --function-name $FUNCTION_NAME --zip-file fileb:///aws-lambda-execution-context/target/bin/aws-ballerina-lambda-functions.zip --handler aws_lambda_deployment.$FUNCTION_NAME --runtime provided --role $LAMBDA_ROLE_ARN --layers arn:aws:lambda:$REGION_ID:134633749276:layer:ballerina-jre11:6 --memory-size 512 --timeout 10 + + Run the following command to re-deploy an updated Ballerina AWS Lambda function: + aws lambda update-function-code --function-name $FUNCTION_NAME --zip-file fileb://aws-ballerina-lambda-functions.zip diff --git a/examples/aws-lambda-execution-context/bal_new.out b/examples/aws-lambda-execution-context/bal_new.out new file mode 100644 index 0000000000..fdb884a78a --- /dev/null +++ b/examples/aws-lambda-execution-context/bal_new.out @@ -0,0 +1 @@ +$ bal new aws-lambda-execution-context diff --git a/examples/aws-lambda-execution-context/invoke_functions.out b/examples/aws-lambda-execution-context/invoke_functions.out new file mode 100644 index 0000000000..0361f200e5 --- /dev/null +++ b/examples/aws-lambda-execution-context/invoke_functions.out @@ -0,0 +1,8 @@ +$ echo '{"MESSAGE":"HELLO"}' > input.json +$ aws lambda invoke --function-name ctxinfo ctxinfo-response.txt +{ +"ExecutedVersion": "$LATEST", +"StatusCode": 200 +} +$ cat ctxinfo-response.txt +{"RequestID":"d55f7d06-f2ab-4b6e-8606-482607785a91", "DeadlineMS":1548069389978, "InvokedFunctionArn":"arn:aws:lambda:us-west-2:908363916138:function:ctxinfo", "TraceID":"Root=1-5c45aa03-f8aff4c9e24dc4fbf48f2990;Parent=17ad3b290def98fd;Sampled=0", "RemainingExecTime":9946} diff --git a/examples/aws-lambda-hello-world/aws-lambda-hello-world.bal b/examples/aws-lambda-hello-world/aws-lambda-hello-world.bal new file mode 100644 index 0000000000..252c7878f8 --- /dev/null +++ b/examples/aws-lambda-hello-world/aws-lambda-hello-world.bal @@ -0,0 +1,9 @@ +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 { + 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 new file mode 100644 index 0000000000..c20fd64db5 --- /dev/null +++ b/examples/aws-lambda-hello-world/aws-lambda-hello-world.md @@ -0,0 +1,39 @@ +# AWS Lambda - Hello world + +This example demonstrates how to write a simple echo function in AWS Lambda. + +For more information, see the [AWS Lambda learn guide](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/). + +## Set up the prerequisites + +For instructions, see [Set up the prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/#set-up-the-prerequisites). + +## Write the function + +Follow the steps below to write the function. + +1. Execute the command below to create a new Ballerina package. + +::: out bal_new.out ::: + +2. Replace the content of the generated Ballerina file with the content below. + +::: code aws-lambda-hello-world.bal ::: + +## Build the function + +Execute the command below to generate the AWS Lambda artifacts. + +::: out bal_build.out ::: + +## Deploy the function + +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. + +::: out aws_deploy.out ::: + +## Invoke the function + +Execute the commands below to invoke the function. + +::: out invoke_functions.out ::: diff --git a/examples/aws-lambda-hello-world/aws-lambda-hello-world.metatags b/examples/aws-lambda-hello-world/aws-lambda-hello-world.metatags new file mode 100644 index 0000000000..8bb3559706 --- /dev/null +++ b/examples/aws-lambda-hello-world/aws-lambda-hello-world.metatags @@ -0,0 +1,2 @@ +description: This example demonstrates how to write a simple echo function in AWS Lambda. +keywords: ballerina, ballerina by example, serverless, aws lambda, cloud, function as a service diff --git a/examples/aws-lambda-hello-world/aws_deploy.out b/examples/aws-lambda-hello-world/aws_deploy.out new file mode 100644 index 0000000000..1ea510bb00 --- /dev/null +++ b/examples/aws-lambda-hello-world/aws_deploy.out @@ -0,0 +1 @@ +$ aws lambda create-function --function-name echo --zip-file fileb://aws-ballerina-lambda-functions.zip --handler aws-lambda-hello-world.echo --runtime provided --role arn:aws:iam::908363916111:role/lambda-role--layers arn:aws:lambda:us-west-1:134633749276:layer:ballerina-jre11:6 --memory-size 512 --timeout 10 diff --git a/examples/aws-lambda-hello-world/bal_build.out b/examples/aws-lambda-hello-world/bal_build.out new file mode 100644 index 0000000000..7a176907a4 --- /dev/null +++ b/examples/aws-lambda-hello-world/bal_build.out @@ -0,0 +1,12 @@ +$ bal build +Compiling source + wso2/aws-lambda-hello-world:0.1.0 + +Generating executable + @awslambda:Function: echo + + Run the following command to deploy each Ballerina AWS Lambda function: + aws lambda create-function --function-name $FUNCTION_NAME --zip-file fileb:///aws-lambda-hello-world/target/bin/aws-ballerina-lambda-functions.zip --handler aws-lambda-hello-world.$FUNCTION_NAME --runtime provided --role $LAMBDA_ROLE_ARN --layers arn:aws:lambda:$REGION_ID:134633749276:layer:ballerina-jre11:6 --memory-size 512 --timeout 10 + + Run the following command to re-deploy an updated Ballerina AWS Lambda function: + aws lambda update-function-code --function-name $FUNCTION_NAME --zip-file fileb://aws-ballerina-lambda-functions.zip diff --git a/examples/aws-lambda-hello-world/bal_new.out b/examples/aws-lambda-hello-world/bal_new.out new file mode 100644 index 0000000000..3fd4ff56d0 --- /dev/null +++ b/examples/aws-lambda-hello-world/bal_new.out @@ -0,0 +1 @@ +$ bal new aws-lambda-hello-world diff --git a/examples/aws-lambda-hello-world/invoke_functions.out b/examples/aws-lambda-hello-world/invoke_functions.out new file mode 100644 index 0000000000..c45754e688 --- /dev/null +++ b/examples/aws-lambda-hello-world/invoke_functions.out @@ -0,0 +1,8 @@ +$ echo '{"MESSAGE":"HELLO"}' > input.json +$ aws lambda invoke --function-name echo --payload fileb://input.json echo-response.txt +{ +"ExecutedVersion": "$LATEST", +"StatusCode": 200 +} +$ cat echo-response.txt +{"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 new file mode 100644 index 0000000000..e6160d6e75 --- /dev/null +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal @@ -0,0 +1,8 @@ +import ballerina/io; +import ballerinax/awslambda; + +@awslambda:Function +public function s3Trigger(awslambda:Context ctx, + awslambda:S3Event event) { + io:println(event.Records[0].s3.'object.key); +} diff --git a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md new file mode 100644 index 0000000000..abe3bfcd4a --- /dev/null +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md @@ -0,0 +1,45 @@ +# AWS Lambda S3 trigger + +This example creates a function, which will be executed for each object creation in AWS S3. + +For more information, see the [AWS Lambda learn guide](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/). + +## Set up the prerequisites + +For instructions, see [Set up the prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/#set-up-the-prerequisites). + +## Write the function + +Follow the steps below to write the function. + +1. Execute the command below to create a new Ballerina package. + +::: out bal_new.out ::: + +2. Replace the content of the generated Ballerina file with the content below. + +::: code aws-lambda-s3-trigger.bal ::: + +## Build the function + +Execute the command below to generate the AWS Lambda artifacts. + +::: out bal_build.out ::: + +## Deploy the function + +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. + +::: out aws_deploy.out ::: + +## Invoke the function + +Follow the instructions below to create an S3 bucket in AWS for invoking this function. + +1. Go to the [AWS S3](https://s3.console.aws.amazon.com/s3/) portal and create a bucket. +2. Click on the created bucket, go to the **Properties** tab, and click **Create event notification** under the **Event notifications** section. +3. Enable **All object create events** under event types. +4. Select the AWS Lambda function as the destination. +5. Select the `s3Trigger` Lambda function from the dropdown. +6. Click **Upload** to upload an object to the S3 bucket. +7. Go to the AWS Lambda function and check the logs via CloudWatch to see the object name in the logs. diff --git a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.metatags b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.metatags new file mode 100644 index 0000000000..17fd5bcb3c --- /dev/null +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.metatags @@ -0,0 +1,2 @@ +description: This example creates a function, which will be executed for each object creation in AWS S3. +keywords: ballerina, ballerina by example, aws lambda, s3, trigger, serverless, cloud, function as a service diff --git a/examples/aws-lambda-s3-trigger/aws_deploy.out b/examples/aws-lambda-s3-trigger/aws_deploy.out new file mode 100644 index 0000000000..b1b14c6f1a --- /dev/null +++ b/examples/aws-lambda-s3-trigger/aws_deploy.out @@ -0,0 +1 @@ +$ aws lambda create-function --function-name s3Trigger --zip-file fileb://aws-ballerina-lambda-functions.zip --handler aws-lambda-s3-trigger.s3Trigger --runtime provided --role arn:aws:iam::908363916111:role/lambda-role--layers arn:aws:lambda:us-west-1:134633749276:layer:ballerina-jre11:6 --memory-size 512 --timeout 10 diff --git a/examples/aws-lambda-s3-trigger/bal_build.out b/examples/aws-lambda-s3-trigger/bal_build.out new file mode 100644 index 0000000000..192b860d1f --- /dev/null +++ b/examples/aws-lambda-s3-trigger/bal_build.out @@ -0,0 +1,12 @@ +$ bal build +Compiling source + wso2/aws-lambda-s3-trigger:0.1.0 + +Generating executable + @awslambda:Function: s3Trigger + + Run the following command to deploy each Ballerina AWS Lambda function: + aws lambda create-function --function-name $FUNCTION_NAME --zip-file fileb:///aws-lambda-s3-trigger/target/bin/aws-ballerina-lambda-functions.zip --handler aws-lambda-s3-trigger.$FUNCTION_NAME --runtime provided --role $LAMBDA_ROLE_ARN --layers arn:aws:lambda:$REGION_ID:134633749276:layer:ballerina-jre11:6 --memory-size 512 --timeout 10 + + Run the following command to re-deploy an updated Ballerina AWS Lambda function: + aws lambda update-function-code --function-name $FUNCTION_NAME --zip-file fileb://aws-ballerina-lambda-functions.zip diff --git a/examples/aws-lambda-s3-trigger/bal_new.out b/examples/aws-lambda-s3-trigger/bal_new.out new file mode 100644 index 0000000000..cd23cd38c3 --- /dev/null +++ b/examples/aws-lambda-s3-trigger/bal_new.out @@ -0,0 +1 @@ +$ bal new aws-lambda-s3-trigger diff --git a/examples/azure-functions-cosmosdb-trigger/az_deploy.out b/examples/azure-functions-cosmosdb-trigger/az_deploy.out new file mode 100644 index 0000000000..968f927b8e --- /dev/null +++ b/examples/azure-functions-cosmosdb-trigger/az_deploy.out @@ -0,0 +1,12 @@ +$ func azure functionapp publish bal-bbe --script-root target/azure_functions +Getting site publishing info... +Creating archive for current directory... +Uploading 28.67 MB [##############################################################################] +Upload completed successfully. +Deployment completed successfully. +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-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal new file mode 100644 index 0000000000..30ffd4e072 --- /dev/null +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal @@ -0,0 +1,18 @@ +import ballerina/io; +import ballerinax/azure_functions as af; + +public type DBEntry record { + string id; + string name; +}; + +@af:CosmosDBTrigger {connectionStringSetting: "CosmosDBConnection", databaseName: "db1", collectionName: "c1"} +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; + 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 new file mode 100644 index 0000000000..6c8a16a3f8 --- /dev/null +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md @@ -0,0 +1,61 @@ +# Azure Functions Cosmos DB trigger + +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. + +For more information, see the [Azure Functions deployment guide](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/). + +## Set up the prerequisites + +Follow the steps below to create a Cosmos DB and a queue to make use of those services later in this example. + +1. Set up the [general prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). +2. Create the queue in the [HTTP trigger](/learn/by-example/azure-functions/http-trigger/) example to resue it in this one. +3. Create an [Azure Cosmos DB account](https://portal.azure.com/#create/Microsoft.DocumentDB) and select **Cosmos DB Core**. +4. Once the database is created, go to the **Data Explorer**, and select **Create Container**. +5. Enter `db1` as the Database ID, `c1` as the collection ID, and click **Ok**. +>**Note:** If you want to change these values, change them in the code as well. +6. Go to the **Keys** tab of the Cosmos DB page. +7. Copy the value of the `PRIMARY CONNECTION STRING`. +8. Click the **Configuration** tab on the function app page. +9. Select **New Application Setting**, and paste the data you copied above as the value. +>**Tip:** For the key, use the value of the `connectionStringSetting` key and save. + +Example application settings are as follows. + +- Name - `CosmosDBConnection` +- Value - `AccountEndpoint=https://db-cosmos.documents.azure.com:443/;AccountKey=12345asda;` + +Now, as all the infrastructure required are up and running and configured, start building and deploying the Azure function. + +## Write the function + +Follow the steps below to write the function. + +1. Execute the command below to create a new Ballerina package. + +::: out bal_new.out ::: + +2. Replace the content of the generated Ballerina file with the content below. + +::: code azure-functions-cosmosdb-trigger.bal ::: + +## Build the function + +Execute the command below to generate the Azure Functions artifacts. + +::: out bal_build.out ::: + +## Deploy the function + +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 ``. + +## Invoke the function + +Once the function is deployed, add an item to the collection. + +1. Navigate to the collection created in the **Data Explorer**. +2. Click **New Item** to add a new item to the collection. +3. Go to the queue page and observe the added new entry. + +>**Info:** Additionally, for debugging purposes, view the logs under the **Logs stream** in the function app. + diff --git a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.metatags b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.metatags new file mode 100644 index 0000000000..8a9cb7e4cf --- /dev/null +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.metatags @@ -0,0 +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, aws lambda, cosmos db, trigger, serverless, cloud, function as a service diff --git a/examples/azure-functions-cosmosdb-trigger/bal_build.out b/examples/azure-functions-cosmosdb-trigger/bal_build.out new file mode 100644 index 0000000000..3b36378a03 --- /dev/null +++ b/examples/azure-functions-cosmosdb-trigger/bal_build.out @@ -0,0 +1,14 @@ +$ bal build --cloud="azure_functions" +Compiling source + wso2/azure-functions-cosmosdb-trigger:0.1.0 + +Generating executable + @azure_functions:Function: cosmos + + Execute the command below to deploy the function locally. + func start --script-root target/azure_functions --java + + Execute the command below to deploy Ballerina Azure Functions. + func azure functionapp publish --script-root target/azure_functions + + target/bin/azure_functions_deployment.jar diff --git a/examples/azure-functions-cosmosdb-trigger/bal_new.out b/examples/azure-functions-cosmosdb-trigger/bal_new.out new file mode 100644 index 0000000000..e79bf8f658 --- /dev/null +++ b/examples/azure-functions-cosmosdb-trigger/bal_new.out @@ -0,0 +1 @@ +$ bal new azure-functions-cosmosdb-trigger diff --git a/examples/azure-functions-hello-world/az_deploy.out b/examples/azure-functions-hello-world/az_deploy.out new file mode 100644 index 0000000000..968f927b8e --- /dev/null +++ b/examples/azure-functions-hello-world/az_deploy.out @@ -0,0 +1,12 @@ +$ func azure functionapp publish bal-bbe --script-root target/azure_functions +Getting site publishing info... +Creating archive for current directory... +Uploading 28.67 MB [##############################################################################] +Upload completed successfully. +Deployment completed successfully. +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-hello-world/azure-functions-hello-world.bal b/examples/azure-functions-hello-world/azure-functions-hello-world.bal new file mode 100644 index 0000000000..b79c6f33d3 --- /dev/null +++ b/examples/azure-functions-hello-world/azure-functions-hello-world.bal @@ -0,0 +1,9 @@ +import ballerinax/azure_functions as af; + +// This function gets triggered by an HTTP call with the name query parameter and +// returns a processed HTTP output to the caller. +service / on new af:HttpListener() { + resource function get hello(string name) returns string { + return "Hello, " + name + "!"; + } +} diff --git a/examples/azure-functions-hello-world/azure-functions-hello-world.md b/examples/azure-functions-hello-world/azure-functions-hello-world.md new file mode 100644 index 0000000000..8ce7bb1c0d --- /dev/null +++ b/examples/azure-functions-hello-world/azure-functions-hello-world.md @@ -0,0 +1,45 @@ +# Azure Functions - Hello world + +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 + +For instructions, see [Set up the prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). + +## Write the function + +Follow the steps below to write the function. + +1. Execute the command below to create a new Ballerina package. + +::: out bal_new.out ::: + +2. Replace the content of the generated Ballerina file with the content below. + +::: code azure-functions-hello-world.bal ::: + +## Build the function + +Execute the command below to generate the Azure Functions artifacts. + +::: out bal_build.out ::: + +## Deploy the function + +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 ``. + +::: out az_deploy.out ::: + +## Invoke the function + +Execute the commands below to invoke the function. + +::: out execute_function.out ::: diff --git a/examples/azure-functions-hello-world/azure-functions-hello-world.metatags b/examples/azure-functions-hello-world/azure-functions-hello-world.metatags new file mode 100644 index 0000000000..94c8e451fe --- /dev/null +++ b/examples/azure-functions-hello-world/azure-functions-hello-world.metatags @@ -0,0 +1,2 @@ +description: This example demonstrates how to write a hello world function with http trigger and output in Azure Functions. +keywords: ballerina, ballerina by example, azure functions, function as a service, serverless diff --git a/examples/azure-functions-hello-world/bal_build.out b/examples/azure-functions-hello-world/bal_build.out new file mode 100644 index 0000000000..bfb0dbc3d6 --- /dev/null +++ b/examples/azure-functions-hello-world/bal_build.out @@ -0,0 +1,14 @@ +$ bal build --cloud="azure_functions" +Compiling source + wso2/azure-functions-hello-world:0.1.0 + +Generating executable + @azure_functions:Function: get-hello + + Execute the command below to deploy the function locally. + func start --script-root target/azure_functions --java + + Execute the command below to deploy Ballerina Azure Functions. + func azure functionapp publish --script-root target/azure_functions + + target/bin/azure_functions_deployment.jar diff --git a/examples/azure-functions-hello-world/bal_new.out b/examples/azure-functions-hello-world/bal_new.out new file mode 100644 index 0000000000..27be8e9b36 --- /dev/null +++ b/examples/azure-functions-hello-world/bal_new.out @@ -0,0 +1 @@ +$ bal new azure-functions-hello-world diff --git a/examples/azure-functions-hello-world/execute_function.out b/examples/azure-functions-hello-world/execute_function.out new file mode 100644 index 0000000000..0da4052046 --- /dev/null +++ b/examples/azure-functions-hello-world/execute_function.out @@ -0,0 +1,2 @@ +$ curl https://bal-bbe.azurewebsites.net/hello\?name\=Jack +Hello, Jack! diff --git a/examples/azure-functions-http-trigger-with-queue/az_deploy.out b/examples/azure-functions-http-trigger-with-queue/az_deploy.out new file mode 100644 index 0000000000..cdd093ffbd --- /dev/null +++ b/examples/azure-functions-http-trigger-with-queue/az_deploy.out @@ -0,0 +1,10 @@ +$ func azure functionapp publish bal-bbe --script-root target/azure_functions +Getting site publishing info... +Creating archive for current directory... +Uploading 28.67 MB [##############################################################################] +Upload completed successfully. +Deployment completed successfully. +Syncing triggers... +Functions in bal-bbe: + get-hello - [httpTrigger] + Invoke url: https://bal-bbe.azurewebsites.net/hello diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal new file mode 100644 index 0000000000..2ad7b7ee2f --- /dev/null +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal @@ -0,0 +1,16 @@ +import ballerina/http; +import ballerinax/azure_functions as af; + +public type Person record { + string name; + int age; +}; + +service / on new af:HttpListener() { + resource function post queue(@http:Payload Person person) returns [@af:HttpOutput http:Created, @af:QueueOutput {queueName: "people"} string] { + http:Created httpRes = { + body: person.name + " Added to the Queue!" + }; + return [httpRes, person.name + " is " + person.age.toString() + " years old."]; + } +} diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md new file mode 100644 index 0000000000..3184f6156d --- /dev/null +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -0,0 +1,42 @@ +# 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. + +For more information, see the [Azure Functions deployment guide](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/). + +## Set up the prerequisites + +1. Set up the [general prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). +2. Accessing the storage account that was created alongside the function app in step 1, and create a queue to hold the outputs of the function. +3. Select **Queues** in the sidebar in the storage accounts. +4. Click the **Add queue** button, and enter the same value as the value of the `queueName` property in the `QueueOutput` annotation in the [Ballerina source below](https://ballerina.io/learn/by-example/azure-functions-trigger/#write-the-function). + +## Write the function + +Follow the steps below to write the function. + +1. Execute the command below to create a new Ballerina package. + +::: out bal_new.out ::: + +2. Replace the content of the generated Ballerina file with the content below. + +::: code azure-functions-http-trigger-with-queue.bal ::: + +## Build the function + +Execute the command below to generate the Azure Functions artifacts. + +::: out bal_build.out ::: + +## Deploy the function + +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 ``. + +## Invoke the function + +Execute the commands below to invoke the function. + +::: out execute_function.out ::: + +>**Tip:** Refresh the queue page in the portal and view the added entry. diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.metatags b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.metatags new file mode 100644 index 0000000000..bfb22ffc2f --- /dev/null +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.metatags @@ -0,0 +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, aws lambda, http, trigger, serverless, cloud, function as a service diff --git a/examples/azure-functions-http-trigger-with-queue/bal_build.out b/examples/azure-functions-http-trigger-with-queue/bal_build.out new file mode 100644 index 0000000000..2680763fc1 --- /dev/null +++ b/examples/azure-functions-http-trigger-with-queue/bal_build.out @@ -0,0 +1,14 @@ +$ bal build --cloud="azure_functions" +Compiling source + wso2/azure-functions-timer-trigger:0.1.0 + +Generating executable + @azure_functions:Function: timer, get-hello + + Execute the command below to deploy the function locally. + func start --script-root target/azure_functions --java + + Execute the command below to deploy Ballerina Azure Functions. + func azure functionapp publish --script-root target/azure_functions + + target/bin/azure_functions_deployment.jar 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-with-queue/execute_function.out b/examples/azure-functions-http-trigger-with-queue/execute_function.out new file mode 100644 index 0000000000..168340bfc7 --- /dev/null +++ b/examples/azure-functions-http-trigger-with-queue/execute_function.out @@ -0,0 +1,5 @@ +$ curl --header "Content-Type: application/json" \ + --request POST \ + --data '{"name":"Jack","age":21}' \ + "https://.azurewebsites.net/queue" +Jack Added to the Queue! diff --git a/examples/azure-functions-timer-trigger/az_deploy.out b/examples/azure-functions-timer-trigger/az_deploy.out new file mode 100644 index 0000000000..968f927b8e --- /dev/null +++ b/examples/azure-functions-timer-trigger/az_deploy.out @@ -0,0 +1,12 @@ +$ func azure functionapp publish bal-bbe --script-root target/azure_functions +Getting site publishing info... +Creating archive for current directory... +Uploading 28.67 MB [##############################################################################] +Upload completed successfully. +Deployment completed successfully. +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-timer-trigger/azure-functions-timer-trigger.bal b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal new file mode 100644 index 0000000000..bc2d6377bf --- /dev/null +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal @@ -0,0 +1,12 @@ +import ballerinax/azure_functions as af; + +// This function gets executed every 10 seconds by the Azure Functions app. Once the function is executed, the timer +// details will be stored in the selected queue storage for every invocation. +@af:TimerTrigger {schedule: "*/10 * * * * *"} +listener af:TimerListener timerListener = new af:TimerListener(); + +service "timer" on timerListener { + remote function onTrigger(af:TimerMetadata metadata) returns @af:QueueOutput {queueName: "queue3"} string|error { + return "Message Status, " + metadata.IsPastDue.toString(); + } +} diff --git a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md new file mode 100644 index 0000000000..adfaa79be2 --- /dev/null +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md @@ -0,0 +1,35 @@ +# Azure Functions timer trigger + +This example demonstrates how a function can be scheduled to execute periodically by the Azure Functions app. Once the function is executed, the timer details will be stored in the selected queue storage for every invocation. + +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 + +For instructions, see [Set up the prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). + +## Write the function + +Follow the steps below to write the function. + +1. Execute the command below to create a new Ballerina package. + +::: out bal_new.out ::: + +2. Replace the content of the generated Ballerina file with the content below. + +::: code azure-functions-timer-trigger.bal ::: + +## Build the function + +Execute the command below to generate the Azure Functions artifacts. + +::: out bal_build.out ::: + +## Deploy the function + +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 ``. + +## 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 new file mode 100644 index 0000000000..6646778ffd --- /dev/null +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.metatags @@ -0,0 +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, aws lambda, timer, trigger, serverless, cloud, function as a service diff --git a/examples/azure-functions-timer-trigger/bal_build.out b/examples/azure-functions-timer-trigger/bal_build.out new file mode 100644 index 0000000000..b11ce9a914 --- /dev/null +++ b/examples/azure-functions-timer-trigger/bal_build.out @@ -0,0 +1,14 @@ +$ bal build --cloud="azure_functions" +Compiling source + wso2/azure-functions-http-trigger:0.1.0 + +Generating executable + @azure_functions:Function: timer + + Execute the command below to deploy the function locally. + func start --script-root target/azure_functions --java + + Execute the command below to deploy Ballerina Azure Functions. + func azure functionapp publish --script-root target/azure_functions + + target/bin/azure_functions_deployment.jar diff --git a/examples/azure-functions-timer-trigger/bal_new.out b/examples/azure-functions-timer-trigger/bal_new.out new file mode 100644 index 0000000000..c358b8cb28 --- /dev/null +++ b/examples/azure-functions-timer-trigger/bal_new.out @@ -0,0 +1 @@ +$ bal new azure-functions-http-trigger diff --git a/examples/docker-hello-world/Cloud.toml b/examples/docker-hello-world/Cloud.toml new file mode 100644 index 0000000000..f83062215c --- /dev/null +++ b/examples/docker-hello-world/Cloud.toml @@ -0,0 +1,4 @@ +[container.image] +repository="wso2inc" +name="hello" +tag="v0.1.0" diff --git a/examples/docker-hello-world/build_output.out b/examples/docker-hello-world/build_output.out new file mode 100644 index 0000000000..0be7c484d3 --- /dev/null +++ b/examples/docker-hello-world/build_output.out @@ -0,0 +1,13 @@ +$ bal build --cloud="docker" + +Compiling source + wso2/hello:0.1.0 + +Generating executable + +Generating artifacts... + + @kubernetes:Docker - complete 2/2 + + Execute the below command to run the generated Docker image: + docker run -d -p 9090:9090 wso2inc/hello:v0.1.0 diff --git a/examples/docker-hello-world/docker-hello-world.bal b/examples/docker-hello-world/docker-hello-world.bal new file mode 100644 index 0000000000..67c8813ed3 --- /dev/null +++ b/examples/docker-hello-world/docker-hello-world.bal @@ -0,0 +1,10 @@ +import ballerina/http; + +// This code is completely focused on the business logic and it does not specify anything related to operations. +listener http:Listener helloEP = new(9090); + +service http:Service /helloWorld on helloEP { + resource function get sayHello() returns string { + return "Hello from Docker!"; + } +} diff --git a/examples/docker-hello-world/docker-hello-world.md b/examples/docker-hello-world/docker-hello-world.md new file mode 100644 index 0000000000..1ffabc6bbc --- /dev/null +++ b/examples/docker-hello-world/docker-hello-world.md @@ -0,0 +1,23 @@ +# Docker + +Ballerina supports generating Docker artifacts from code without any additional configuration. This simplifies the experience of developing and deploying Ballerina code in the cloud. Code to Cloud builds the containers and required artifacts by deriving the required values from the code. If you want to override the default values taken by the compiler, you can use a `Cloud.toml` file. +For more information, see [Code to Cloud Deployment](/learn/run-in-the-cloud/code-to-cloud-deployment/). + +::: code docker-hello-world.bal ::: + +Before you build the package, you need to override some default values taken by the compiler. To do this, create a filed named `Cloud.toml` in the package directory, and add the content below to it. +For all the supported key value properties, see [Code to Cloud specification](https://github.com/ballerina-platform/ballerina-spec/blob/master/c2c/code-to-cloud-spec.md). + +::: code Cloud.toml ::: + +Execute the `bal build` command to build the Ballerina package. Code to Cloud generates only one container per package. +::: out build_output.out ::: + +Verify if the Docker image is generated. +::: out docker_images.out ::: + +Run the generated Docker image. +::: out docker_run.out ::: + +Invoke the service. +::: out execute_curl.out::: diff --git a/examples/docker-hello-world/docker_images.out b/examples/docker-hello-world/docker_images.out new file mode 100644 index 0000000000..654c17ba99 --- /dev/null +++ b/examples/docker-hello-world/docker_images.out @@ -0,0 +1,4 @@ +$ docker images + +REPOSITORY TAG IMAGE ID CREATED SIZE +wso2inc/hello v0.1.0 60d95f0928b2 About a minute ago 228MB diff --git a/examples/docker-hello-world/docker_run.out b/examples/docker-hello-world/docker_run.out new file mode 100644 index 0000000000..7649d4881b --- /dev/null +++ b/examples/docker-hello-world/docker_run.out @@ -0,0 +1,2 @@ +$ docker run -d -p 9090:9090 wso2inc/hello:v0.1.0 +c04194eb0b4d0d78cbc8ca55e0527d381d8ab4a1a68f8ea5dd3770a0845d5fbb diff --git a/examples/docker-hello-world/execute_curl.out b/examples/docker-hello-world/execute_curl.out new file mode 100644 index 0000000000..e59778411c --- /dev/null +++ b/examples/docker-hello-world/execute_curl.out @@ -0,0 +1,2 @@ +$ curl http://localhost:9090/helloWorld/sayHello +Hello from Docker! diff --git a/examples/kubernetes-hello-world/Cloud.toml b/examples/kubernetes-hello-world/Cloud.toml new file mode 100644 index 0000000000..f83062215c --- /dev/null +++ b/examples/kubernetes-hello-world/Cloud.toml @@ -0,0 +1,4 @@ +[container.image] +repository="wso2inc" +name="hello" +tag="v0.1.0" diff --git a/examples/kubernetes-hello-world/build_output.out b/examples/kubernetes-hello-world/build_output.out new file mode 100644 index 0000000000..0be2042599 --- /dev/null +++ b/examples/kubernetes-hello-world/build_output.out @@ -0,0 +1,19 @@ +$ bal build --cloud="k8s" + +Compiling source + wso2/hello:0.1.0 + +Generating executable + +Generating artifacts... + + @kubernetes:Service - complete 1/1 + @kubernetes:Deployment - complete 1/1 + @kubernetes:HPA - complete 1/1 + @kubernetes:Docker - complete 2/2 + + Execute the below command to deploy the Kubernetes artifacts: + kubectl apply -f /home/anjana/bbe-make/k8s/target/kubernetes/hello + + Execute the below command to access service via NodePort: + kubectl expose deployment hello-deployment --type=NodePort --name=hello-svc-local diff --git a/examples/kubernetes-hello-world/docker_push.out b/examples/kubernetes-hello-world/docker_push.out new file mode 100644 index 0000000000..aae0d47703 --- /dev/null +++ b/examples/kubernetes-hello-world/docker_push.out @@ -0,0 +1 @@ +$ docker push wso2inc/hello:v0.1.0 diff --git a/examples/kubernetes-hello-world/execute_curl.out b/examples/kubernetes-hello-world/execute_curl.out new file mode 100644 index 0000000000..29bc34a7d5 --- /dev/null +++ b/examples/kubernetes-hello-world/execute_curl.out @@ -0,0 +1,2 @@ +$ curl http://192.168.49.2:31360/helloWorld/sayHello +Hello from Kubernetes! diff --git a/examples/kubernetes-hello-world/kubectl_apply.out b/examples/kubernetes-hello-world/kubectl_apply.out new file mode 100644 index 0000000000..c1e37d3d30 --- /dev/null +++ b/examples/kubernetes-hello-world/kubectl_apply.out @@ -0,0 +1,4 @@ +$ kubectl apply -f /home/wso2/project/target/kubernetes/hello-0.1.0 +service/helloep-svc created +deployment.apps/wso2-hello-0--deployment created +horizontalpodautoscaler.autoscaling/wso2-hello-0--hpa created diff --git a/examples/kubernetes-hello-world/kubectl_expose.out b/examples/kubernetes-hello-world/kubectl_expose.out new file mode 100644 index 0000000000..dcb2bf50c9 --- /dev/null +++ b/examples/kubernetes-hello-world/kubectl_expose.out @@ -0,0 +1,2 @@ +$ kubectl expose deployment hello-deployment --type=NodePort --name=hello-svc-local +service/hello-svc-local exposed diff --git a/examples/kubernetes-hello-world/kubectl_pods.out b/examples/kubernetes-hello-world/kubectl_pods.out new file mode 100644 index 0000000000..35026982d3 --- /dev/null +++ b/examples/kubernetes-hello-world/kubectl_pods.out @@ -0,0 +1,3 @@ +$ kubectl get pods +NAME READY STATUS RESTARTS AGE +wso2-hello-0--deployment-7d4d56457b-7jlzx 1/1 Running 0 57s diff --git a/examples/kubernetes-hello-world/kubectl_svc.out b/examples/kubernetes-hello-world/kubectl_svc.out new file mode 100644 index 0000000000..cffd7dcaaa --- /dev/null +++ b/examples/kubernetes-hello-world/kubectl_svc.out @@ -0,0 +1,4 @@ +$ kubectl get svc +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +hello-svc ClusterIP 10.97.140.84 9090/TCP 13m +hello-svc-local NodePort 10.108.87.21 9090:31360/TCP 2m18s diff --git a/examples/kubernetes-hello-world/kubernetes-hello-world.bal b/examples/kubernetes-hello-world/kubernetes-hello-world.bal new file mode 100644 index 0000000000..aee765e023 --- /dev/null +++ b/examples/kubernetes-hello-world/kubernetes-hello-world.bal @@ -0,0 +1,10 @@ +import ballerina/http; + +// This code is completely focused on the business logic and it does not specify anything related to the operations. +listener http:Listener helloEP = new(9090); + +service http:Service /helloWorld on helloEP { + resource function get sayHello() returns string { + return "Hello from Kubernetes!"; + } +} diff --git a/examples/kubernetes-hello-world/kubernetes-hello-world.md b/examples/kubernetes-hello-world/kubernetes-hello-world.md new file mode 100644 index 0000000000..a42395397b --- /dev/null +++ b/examples/kubernetes-hello-world/kubernetes-hello-world.md @@ -0,0 +1,35 @@ +# Kubernetes + +Ballerina supports generating Kubernetes artifacts from code without any additional configuration. This simplifies the experience of developing and deploying Ballerina code in the cloud. Code to Cloud builds the containers and required artifacts by deriving the required values from the code. If you want to override the default values taken by the compiler, you can use a `Cloud.toml` file. +For more information, see [Code to Cloud deployment](/learn/run-in-the-cloud/code-to-cloud-deployment/). + +::: code kubernetes-hello-world.bal ::: + +Before you build the package, you need to override some default values taken by the compiler. To do this, create a filed named `Cloud.toml` in the package directory, and add the content below to it. +For all the supported key value properties, see [Code to Cloud Specification](https://github.com/ballerina-platform/ballerina-spec/blob/master/c2c/code-to-cloud-spec.md). + +::: code Cloud.toml ::: + +Execute the `bal build` command to build the Ballerina package. Code to Cloud generates only one container per package. +::: out build_output.out ::: + +Push the created Docker image to Docker Hub. +::: out docker_push.out ::: + +Create the deployment using the Kubernetes artifacts. +::: out kubectl_apply.out ::: + +Verify the Kubernetes pods. +::: out kubectl_pods.out ::: + +Expose via NodePort to test in the developer environment. +::: out kubectl_expose.out ::: + +Get the External IP and port of the Kubernetes service. +::: out kubectl_svc.out ::: + +If the External IP of the `hello-svc-local` service is ``, you need to follow cluster-specific steps to obtain the external IP. If you are using Minikube, you can use the `minikube ip` command to obtain the IP. +::: out minikube_ip.out ::: + +Access the deployed service via CURL. +::: out execute_curl.out ::: diff --git a/examples/kubernetes-hello-world/minikube_ip.out b/examples/kubernetes-hello-world/minikube_ip.out new file mode 100644 index 0000000000..449c37eb24 --- /dev/null +++ b/examples/kubernetes-hello-world/minikube_ip.out @@ -0,0 +1,2 @@ +$ minikube ip +192.168.49.2 From 5b778259308f92f90acd18b0ad2096160c0df6e3 Mon Sep 17 00:00:00 2001 From: praneesha Date: Wed, 12 Jul 2023 17:47:24 +0530 Subject: [PATCH 02/94] Add the index.json file changes --- examples/index.json | 97 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 86 insertions(+), 11 deletions(-) diff --git a/examples/index.json b/examples/index.json index 78928fc82d..4c8f7ef501 100644 --- a/examples/index.json +++ b/examples/index.json @@ -4450,20 +4450,75 @@ "title": "Code to Cloud", "column": 0, "category": "Deployment", + "samples": [ + { + "title": "Docker", + "column": 0, + "category": "Deployment", "samples": [ { - "name": "Docker", - "url": "c2c-docker-deployment", + "name": "Hello world", + "url": "docker-hello-world", "verifyBuild": true, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", "disablePlayground": true, "isLearnByExample": false + } + ] + }, + { + "title": "Kubernetes", + "column": 1, + "category": "Deployment", + "samples": [ + { + "name": "Hello world", + "url": "kubernetes-hello-world", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "AWS Lambda", + "column": 2, + "category": "Deployment", + "samples": [ + { + "name": "Hello world", + "url": "aws-lambda-hello-world", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false }, { - "name": "Kubernetes", - "url": "c2c-k8s-deployment", - "verifyBuild": true, + "name": "Execution context", + "url": "aws-lambda-execution-context", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "S3 trigger", + "url": "aws-lambda-s3-trigger", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "DynamoDB trigger", + "url": "aws-lambda-dynamodb-trigger", + "verifyBuild": false, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", "disablePlayground": true, @@ -4472,13 +4527,13 @@ ] }, { - "title": "Function as a Service", - "column": 1, + "title": "Azure Functions", + "column": 3, "category": "Deployment", "samples": [ { - "name": "Azure Functions", - "url": "azure-functions-deployment", + "name": "Hello world", + "url": "azure-functions-hello-world", "verifyBuild": false, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", @@ -4486,8 +4541,26 @@ "isLearnByExample": false }, { - "name": "AWS Lambda", - "url": "aws-lambda-deployment", + "name": "Timer trigger", + "url": "azure-functions-timer-trigger", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "HTTP trigger with queue", + "url": "azure-functions-http-trigger-with-queue", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Cosmos DB trigger", + "url": "azure-functions-cosmosdb-trigger", "verifyBuild": false, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", @@ -4496,4 +4569,6 @@ } ] } + ] + } ] From 92eecb4c6ce859c7a347fa2f57ac7e583bb1d209 Mon Sep 17 00:00:00 2001 From: praneesha Date: Wed, 12 Jul 2023 21:06:20 +0530 Subject: [PATCH 03/94] Update aws-lambda-execution-context.bal --- .../aws-lambda-execution-context.bal | 9 +++++++++ 1 file changed, 9 insertions(+) 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 36bb967d82..144ffbdef8 100644 --- a/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal +++ b/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal @@ -1,5 +1,7 @@ import ballerinax/awslambda; +import ballerina/io; +// The `awslambda:Context` object contains request execution context information. @awslambda:Function public function ctxinfo(awslambda:Context ctx, json input) returns json|error { return { @@ -10,3 +12,10 @@ public function ctxinfo(awslambda:Context ctx, json input) returns json|error { RemainingExecTime: ctx.getRemainingExecutionTime() }; } + +// If you know the external service that's being used for the function, you can use the built-in types such as +// `S3Event`, `DynamoDBEvent`, `SESEvent` etc. for data binding. +@awslambda:Function +public function notifyS3(awslambda:Context ctx, awslambda:S3Event event) { + io:println(event.Records[0].s3.'object.key); +} From ec506b116020012afb8f328e782b03b5a1030160 Mon Sep 17 00:00:00 2001 From: praneesha Date: Wed, 12 Jul 2023 21:07:56 +0530 Subject: [PATCH 04/94] Update aws-lambda-execution-context.bal --- .../aws-lambda-execution-context.bal | 7 ------- 1 file changed, 7 deletions(-) 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 144ffbdef8..6d0961bdea 100644 --- a/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal +++ b/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal @@ -12,10 +12,3 @@ public function ctxinfo(awslambda:Context ctx, json input) returns json|error { RemainingExecTime: ctx.getRemainingExecutionTime() }; } - -// If you know the external service that's being used for the function, you can use the built-in types such as -// `S3Event`, `DynamoDBEvent`, `SESEvent` etc. for data binding. -@awslambda:Function -public function notifyS3(awslambda:Context ctx, awslambda:S3Event event) { - io:println(event.Records[0].s3.'object.key); -} From aba7c3cfac8a29df562424647f1c566f5cdeb5bb Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 06:07:11 +0530 Subject: [PATCH 05/94] Update AF Hello World BBE --- .../azure-functions-hello-world/azure-functions-hello-world.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8ce7bb1c0d..f7597f6267 100644 --- a/examples/azure-functions-hello-world/azure-functions-hello-world.md +++ b/examples/azure-functions-hello-world/azure-functions-hello-world.md @@ -2,7 +2,7 @@ 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. +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 the `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. From 5fef737a6b2e32c86952f80cc0024c7656ed058b Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 06:31:33 +0530 Subject: [PATCH 06/94] Update index.json --- examples/index.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/examples/index.json b/examples/index.json index 4c8f7ef501..7068a2abbf 100644 --- a/examples/index.json +++ b/examples/index.json @@ -4447,11 +4447,6 @@ ] }, { - "title": "Code to Cloud", - "column": 0, - "category": "Deployment", - "samples": [ - { "title": "Docker", "column": 0, "category": "Deployment", From 0ebe60402824cb22dc7d3f99daf5e2d4636f3c98 Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 06:36:06 +0530 Subject: [PATCH 07/94] Update index.json --- examples/index.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/index.json b/examples/index.json index 7068a2abbf..eb02bee631 100644 --- a/examples/index.json +++ b/examples/index.json @@ -4563,7 +4563,5 @@ "isLearnByExample": false } ] - } - ] - } + }, ] From dd10f8e99a3da991586d821554a9d327f6576418 Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 06:40:50 +0530 Subject: [PATCH 08/94] Update index.json --- examples/index.json | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/index.json b/examples/index.json index eb02bee631..cacfbbed94 100644 --- a/examples/index.json +++ b/examples/index.json @@ -4564,4 +4564,5 @@ } ] }, + ] From aed1e257d72d4e65dd98c4b32f9f235755285cb5 Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 06:42:28 +0530 Subject: [PATCH 09/94] Update index.json --- examples/index.json | 95 +++++++-------------------------------------- 1 file changed, 13 insertions(+), 82 deletions(-) diff --git a/examples/index.json b/examples/index.json index cacfbbed94..78928fc82d 100644 --- a/examples/index.json +++ b/examples/index.json @@ -4447,73 +4447,23 @@ ] }, { - "title": "Docker", + "title": "Code to Cloud", "column": 0, "category": "Deployment", "samples": [ { - "name": "Hello world", - "url": "docker-hello-world", + "name": "Docker", + "url": "c2c-docker-deployment", "verifyBuild": true, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", "disablePlayground": true, "isLearnByExample": false - } - ] - }, - { - "title": "Kubernetes", - "column": 1, - "category": "Deployment", - "samples": [ - { - "name": "Hello world", - "url": "kubernetes-hello-world", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "AWS Lambda", - "column": 2, - "category": "Deployment", - "samples": [ - { - "name": "Hello world", - "url": "aws-lambda-hello-world", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false }, { - "name": "Execution context", - "url": "aws-lambda-execution-context", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "S3 trigger", - "url": "aws-lambda-s3-trigger", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "DynamoDB trigger", - "url": "aws-lambda-dynamodb-trigger", - "verifyBuild": false, + "name": "Kubernetes", + "url": "c2c-k8s-deployment", + "verifyBuild": true, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", "disablePlayground": true, @@ -4522,13 +4472,13 @@ ] }, { - "title": "Azure Functions", - "column": 3, + "title": "Function as a Service", + "column": 1, "category": "Deployment", "samples": [ { - "name": "Hello world", - "url": "azure-functions-hello-world", + "name": "Azure Functions", + "url": "azure-functions-deployment", "verifyBuild": false, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", @@ -4536,26 +4486,8 @@ "isLearnByExample": false }, { - "name": "Timer trigger", - "url": "azure-functions-timer-trigger", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "HTTP trigger with queue", - "url": "azure-functions-http-trigger-with-queue", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Cosmos DB trigger", - "url": "azure-functions-cosmosdb-trigger", + "name": "AWS Lambda", + "url": "aws-lambda-deployment", "verifyBuild": false, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", @@ -4563,6 +4495,5 @@ "isLearnByExample": false } ] - }, - + } ] From 56b37611ab1e1e5af2ffa6e2b2c85accb3f4ce52 Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 06:45:13 +0530 Subject: [PATCH 10/94] Update index.json --- examples/index.json | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/examples/index.json b/examples/index.json index 78928fc82d..546938fede 100644 --- a/examples/index.json +++ b/examples/index.json @@ -4447,23 +4447,30 @@ ] }, { - "title": "Code to Cloud", + "title": "Docker", "column": 0, "category": "Deployment", "samples": [ { - "name": "Docker", - "url": "c2c-docker-deployment", + "name": "Hello world", + "url": "docker-hello-world", "verifyBuild": true, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", "disablePlayground": true, "isLearnByExample": false - }, + } + ] + }, + { + "title": "Kubernetes", + "column": 1, + "category": "Deployment", + "samples": [ { - "name": "Kubernetes", - "url": "c2c-k8s-deployment", - "verifyBuild": true, + "name": "Hello world", + "url": "kubernetes-hello-world", + "verifyBuild": false, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", "disablePlayground": true, From 89b6fbef214130169b6e2f14df44e01aeabb3189 Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 06:46:38 +0530 Subject: [PATCH 11/94] Update index.json --- examples/index.json | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/examples/index.json b/examples/index.json index 546938fede..521ee2d665 100644 --- a/examples/index.json +++ b/examples/index.json @@ -4478,14 +4478,14 @@ } ] }, - { - "title": "Function as a Service", - "column": 1, + { + "title": "AWS Lambda", + "column": 2, "category": "Deployment", "samples": [ { - "name": "Azure Functions", - "url": "azure-functions-deployment", + "name": "Hello world", + "url": "aws-lambda-hello-world", "verifyBuild": false, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", @@ -4493,8 +4493,26 @@ "isLearnByExample": false }, { - "name": "AWS Lambda", - "url": "aws-lambda-deployment", + "name": "Execution context", + "url": "aws-lambda-execution-context", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "S3 trigger", + "url": "aws-lambda-s3-trigger", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "DynamoDB trigger", + "url": "aws-lambda-dynamodb-trigger", "verifyBuild": false, "verifyOutput": false, "disableVerificationReason": "Needs prerequisite condition", @@ -4502,5 +4520,5 @@ "isLearnByExample": false } ] - } + }, ] From 57233f843a0d3d8d04ede45b73820c0274904fd7 Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 06:48:47 +0530 Subject: [PATCH 12/94] Update index.json --- examples/index.json | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/examples/index.json b/examples/index.json index 521ee2d665..b7dee5add2 100644 --- a/examples/index.json +++ b/examples/index.json @@ -4521,4 +4521,47 @@ } ] }, + { + "title": "Azure Functions", + "column": 3, + "category": "Deployment", + "samples": [ + { + "name": "Hello world", + "url": "azure-functions-hello-world", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Timer trigger", + "url": "azure-functions-timer-trigger", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "HTTP trigger with queue", + "url": "azure-functions-http-trigger-with-queue", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Cosmos DB trigger", + "url": "azure-functions-cosmosdb-trigger", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + } ] From f7141c2d347ea2455e4fdc96cd1a1a0eaf435851 Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 06:59:11 +0530 Subject: [PATCH 13/94] Update index.json --- examples/index.json | 236 ++++++++++++++++++++++---------------------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/examples/index.json b/examples/index.json index b7dee5add2..2d3a6270fa 100644 --- a/examples/index.json +++ b/examples/index.json @@ -4320,6 +4320,124 @@ ] }, { + "title": "Docker", + "column": 0, + "category": "Deployment", + "samples": [ + { + "name": "Hello world", + "url": "docker-hello-world", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Kubernetes", + "column": 1, + "category": "Deployment", + "samples": [ + { + "name": "Hello world", + "url": "kubernetes-hello-world", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "AWS Lambda", + "column": 2, + "category": "Deployment", + "samples": [ + { + "name": "Hello world", + "url": "aws-lambda-hello-world", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Execution context", + "url": "aws-lambda-execution-context", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "S3 trigger", + "url": "aws-lambda-s3-trigger", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "DynamoDB trigger", + "url": "aws-lambda-dynamodb-trigger", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Azure Functions", + "column": 3, + "category": "Deployment", + "samples": [ + { + "name": "Hello world", + "url": "azure-functions-hello-world", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Timer trigger", + "url": "azure-functions-timer-trigger", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "HTTP trigger with queue", + "url": "azure-functions-http-trigger-with-queue", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Cosmos DB trigger", + "url": "azure-functions-cosmosdb-trigger", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { "title": "Query data", "column": 0, "category": "Bal persist", @@ -4445,123 +4563,5 @@ "isLearnByExample": false } ] - }, - { - "title": "Docker", - "column": 0, - "category": "Deployment", - "samples": [ - { - "name": "Hello world", - "url": "docker-hello-world", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Kubernetes", - "column": 1, - "category": "Deployment", - "samples": [ - { - "name": "Hello world", - "url": "kubernetes-hello-world", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "AWS Lambda", - "column": 2, - "category": "Deployment", - "samples": [ - { - "name": "Hello world", - "url": "aws-lambda-hello-world", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Execution context", - "url": "aws-lambda-execution-context", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "S3 trigger", - "url": "aws-lambda-s3-trigger", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "DynamoDB trigger", - "url": "aws-lambda-dynamodb-trigger", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Azure Functions", - "column": 3, - "category": "Deployment", - "samples": [ - { - "name": "Hello world", - "url": "azure-functions-hello-world", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Timer trigger", - "url": "azure-functions-timer-trigger", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "HTTP trigger with queue", - "url": "azure-functions-http-trigger-with-queue", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Cosmos DB trigger", - "url": "azure-functions-cosmosdb-trigger", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] } ] From 617bba18e95cc06afaedc5a867a19291756671bd Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 07:15:40 +0530 Subject: [PATCH 14/94] Update aws-lambda-execution-context.bal --- .../aws-lambda-execution-context.bal | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 6d0961bdea..f608bdc905 100644 --- a/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal +++ b/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal @@ -1,5 +1,12 @@ -import ballerinax/awslambda; 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 { + io:println(input.toJsonString()); + return input; +} // The `awslambda:Context` object contains request execution context information. @awslambda:Function From a1ae6c586d6f1ab0a85f7914b1589cceea7a8fa2 Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 13:00:39 +0530 Subject: [PATCH 15/94] Update aws-lambda-execution-context.bal --- .../aws-lambda-execution-context.bal | 8 -------- 1 file changed, 8 deletions(-) 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 f608bdc905..ffbe324623 100644 --- a/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal +++ b/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal @@ -1,13 +1,5 @@ -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 { - io:println(input.toJsonString()); - return input; -} - // The `awslambda:Context` object contains request execution context information. @awslambda:Function public function ctxinfo(awslambda:Context ctx, json input) returns json|error { From c16ecec08df688e49f0a0870d6d091c77ed48afe Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 13:53:34 +0530 Subject: [PATCH 16/94] Update aws-lambda-s3-trigger.bal --- examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 e6160d6e75..66efcb71a7 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal @@ -1,8 +1,8 @@ import ballerina/io; -import ballerinax/awslambda; +import ballerinax/aws.lambda; -@awslambda:Function -public function s3Trigger(awslambda:Context ctx, - awslambda:S3Event event) { +@lambda:Function +public function s3Trigger(lambda:Context ctx, + lambda:S3Event event) { io:println(event.Records[0].s3.'object.key); } From 1cbf90727321c801d1c7735f95d439f636a22a26 Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 14:21:44 +0530 Subject: [PATCH 17/94] Update aws-lambda-dynamodb-trigger.bal --- .../aws-lambda-dynamodb-trigger.bal | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.bal b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.bal index 42776fcc6c..bd79b48fd5 100644 --- a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.bal +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.bal @@ -1,8 +1,8 @@ import ballerina/io; -import ballerinax/awslambda; +import ballerinax/aws.lambda; -@awslambda:Function -public function dynamoDBTrigger(awslambda:Context ctx, - awslambda:DynamoDBEvent event) { +@lambda:Function +public function dynamoDBTrigger(lambda:Context ctx, + lambda:DynamoDBEvent event) { io:println(event.Records[0].dynamodb.Keys.toString()); } From d60ead58c0a83f79c65f88eeefe43a5cc5c86da3 Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 14:23:17 +0530 Subject: [PATCH 18/94] Update aws-lambda-hello-world.bal --- .../aws-lambda-hello-world/aws-lambda-hello-world.bal | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 252c7878f8..df22a7c2b5 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/io; -import ballerinax/awslambda; +import ballerinax/aws.lambda; -// 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 { +// The `@lambda:Function` annotation marks a function to generate an AWS Lambda function. +@lambda:Function +public function echo(lambda:Context ctx, json input) returns json { io:println(input.toJsonString()); return input; } From 44f085f4a32ea6138f41ffb039ef84720552b325 Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 14:23:46 +0530 Subject: [PATCH 19/94] Update aws-lambda-execution-context.bal --- .../aws-lambda-execution-context.bal | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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..3e31dd4dec 100644 --- a/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal +++ b/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal @@ -1,8 +1,8 @@ -import ballerinax/awslambda; +import ballerinax/aws.lambda; -// The `awslambda:Context` object contains request execution context information. +// The `lambda:Context` object contains request execution context information. @awslambda:Function -public function ctxinfo(awslambda:Context ctx, json input) returns json|error { +public function ctxinfo(lambda:Context ctx, json input) returns json|error { return { RequestID: ctx.getRequestId(), DeadlineMS: ctx.getDeadlineMs(), From 1237cb32926e979c1eed1d50fda5104871adbe5b Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 13 Jul 2023 15:58:48 +0530 Subject: [PATCH 20/94] Update bal_new.out --- examples/azure-functions-timer-trigger/bal_new.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-timer-trigger/bal_new.out b/examples/azure-functions-timer-trigger/bal_new.out index c358b8cb28..a58faf07b6 100644 --- a/examples/azure-functions-timer-trigger/bal_new.out +++ b/examples/azure-functions-timer-trigger/bal_new.out @@ -1 +1 @@ -$ bal new azure-functions-http-trigger +$ bal new azure-functions-timer-trigger From a98b1da7137d7abfe30888a59b0837d51e337aa9 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 00:25:35 +0530 Subject: [PATCH 21/94] Update aws-lambda-execution-context.bal --- .../aws-lambda-execution-context.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3e31dd4dec..4cd08f4dd6 100644 --- a/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal +++ b/examples/aws-lambda-execution-context/aws-lambda-execution-context.bal @@ -1,7 +1,7 @@ import ballerinax/aws.lambda; // The `lambda:Context` object contains request execution context information. -@awslambda:Function +@lambda:Function public function ctxinfo(lambda:Context ctx, json input) returns json|error { return { RequestID: ctx.getRequestId(), From 24b7a94b4cf14918f8ef72a1c98c9ef93204cfad Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 05:58:45 +0530 Subject: [PATCH 22/94] Update aws-lambda-s3-trigger.md --- .../aws-lambda-s3-trigger/aws-lambda-s3-trigger.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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 abe3bfcd4a..12f2fe9265 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md @@ -37,9 +37,10 @@ Execute the AWS CLI command given by the compiler to create and publish the func Follow the instructions below to create an S3 bucket in AWS for invoking this function. 1. Go to the [AWS S3](https://s3.console.aws.amazon.com/s3/) portal and create a bucket. -2. Click on the created bucket, go to the **Properties** tab, and click **Create event notification** under the **Event notifications** section. -3. Enable **All object create events** under event types. -4. Select the AWS Lambda function as the destination. -5. Select the `s3Trigger` Lambda function from the dropdown. -6. Click **Upload** to upload an object to the S3 bucket. -7. Go to the AWS Lambda function and check the logs via CloudWatch to see the object name in the logs. + >**Note:** Make sure to select the same region in which you created the AWS user and role when creating the S3 bucket. +3. Click on the created bucket, go to the **Properties** tab, and click **Create event notification** under the **Event notifications** section. +4. Enable **All object create events** under event types. +5. Select the AWS Lambda function as the destination. +6. Select the `s3Trigger` Lambda function from the dropdown. +7. Click **Upload** to upload an object to the S3 bucket. +8. Go to the AWS Lambda function and check the logs via CloudWatch to see the object name in the logs. From a1deb909ac524b32117f8f8a0408089b68b2c371 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 05:59:11 +0530 Subject: [PATCH 23/94] Update aws-lambda-s3-trigger.md --- examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 12f2fe9265..143641c407 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md @@ -37,7 +37,7 @@ Execute the AWS CLI command given by the compiler to create and publish the func Follow the instructions below to create an S3 bucket in AWS for invoking this function. 1. Go to the [AWS S3](https://s3.console.aws.amazon.com/s3/) portal and create a bucket. - >**Note:** Make sure to select the same region in which you created the AWS user and role when creating the S3 bucket. + >**Note:** Make sure to select the same AWS region in which you created the AWS user and role when creating the S3 bucket. 3. Click on the created bucket, go to the **Properties** tab, and click **Create event notification** under the **Event notifications** section. 4. Enable **All object create events** under event types. 5. Select the AWS Lambda function as the destination. From dab5dde2929c819219eac374549044457125f652 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 05:59:34 +0530 Subject: [PATCH 24/94] Update aws-lambda-s3-trigger.md --- examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 143641c407..f615df75eb 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md @@ -37,7 +37,7 @@ Execute the AWS CLI command given by the compiler to create and publish the func Follow the instructions below to create an S3 bucket in AWS for invoking this function. 1. Go to the [AWS S3](https://s3.console.aws.amazon.com/s3/) portal and create a bucket. - >**Note:** Make sure to select the same AWS region in which you created the AWS user and role when creating the S3 bucket. + >**Note:** Make sure to select the same **AWS region** in which you created the AWS user and role when creating the S3 bucket. 3. Click on the created bucket, go to the **Properties** tab, and click **Create event notification** under the **Event notifications** section. 4. Enable **All object create events** under event types. 5. Select the AWS Lambda function as the destination. From e2ec351de68a0fa9b8f2e28f9edef296fd73b3da Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 06:12:30 +0530 Subject: [PATCH 25/94] Update aws-lambda-s3-trigger.md --- .../aws-lambda-s3-trigger/aws-lambda-s3-trigger.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 f615df75eb..2dd63db9cd 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md @@ -40,7 +40,9 @@ Follow the instructions below to create an S3 bucket in AWS for invoking this fu >**Note:** Make sure to select the same **AWS region** in which you created the AWS user and role when creating the S3 bucket. 3. Click on the created bucket, go to the **Properties** tab, and click **Create event notification** under the **Event notifications** section. 4. Enable **All object create events** under event types. -5. Select the AWS Lambda function as the destination. -6. Select the `s3Trigger` Lambda function from the dropdown. -7. Click **Upload** to upload an object to the S3 bucket. -8. Go to the AWS Lambda function and check the logs via CloudWatch to see the object name in the logs. +5. Under the **Destination** section, select the AWS Lambda function (i.e., `s3Trigger` in this example) from the dropdown. +6. Select the created bucket under the **Buckets** list, and click **Upload**. +7. Upload an object to the S3 bucket. +8. Under the **Functions** list of the AWS Management Console, click the AWS Lambda function. +9. Click the **Monitor** tab, and click **View CloudWatch logs** to check the logs via CloudWatch. +10. Under **Log streams** in CloudWatch, click on the top-most stream in the list and verify the object name in the logs. From 91ede8294a179a7a9e2712dc33179f3028c2947e Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 06:13:39 +0530 Subject: [PATCH 26/94] Update aws-lambda-s3-trigger.md --- .../aws-lambda-s3-trigger.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) 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 2dd63db9cd..814c53d409 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md @@ -38,11 +38,10 @@ Follow the instructions below to create an S3 bucket in AWS for invoking this fu 1. Go to the [AWS S3](https://s3.console.aws.amazon.com/s3/) portal and create a bucket. >**Note:** Make sure to select the same **AWS region** in which you created the AWS user and role when creating the S3 bucket. -3. Click on the created bucket, go to the **Properties** tab, and click **Create event notification** under the **Event notifications** section. -4. Enable **All object create events** under event types. -5. Under the **Destination** section, select the AWS Lambda function (i.e., `s3Trigger` in this example) from the dropdown. -6. Select the created bucket under the **Buckets** list, and click **Upload**. -7. Upload an object to the S3 bucket. -8. Under the **Functions** list of the AWS Management Console, click the AWS Lambda function. -9. Click the **Monitor** tab, and click **View CloudWatch logs** to check the logs via CloudWatch. -10. Under **Log streams** in CloudWatch, click on the top-most stream in the list and verify the object name in the logs. +2. Click on the created bucket, go to the **Properties** tab, and click **Create event notification** under the **Event notifications** section. +3. Enable **All object create events** under event types. +4. Under the **Destination** section, select the AWS Lambda function (i.e., `s3Trigger` in this example) from the dropdown. +5. Select the created bucket under the **Buckets** list, click **Upload**, and upload an object to the S3 bucket. +6. Under the **Functions** list of the AWS Management Console, click the AWS Lambda function. +7. Click the **Monitor** tab, and click **View CloudWatch logs** to check the logs via CloudWatch. +8. Under **Log streams** in CloudWatch, click on the top-most stream in the list and verify the object name in the logs. From ea82731dbbc07380ac086fbc961785864645aaec Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 06:20:13 +0530 Subject: [PATCH 27/94] Update aws-lambda-s3-trigger.md --- examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 814c53d409..e8f5bcd9b8 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md @@ -42,6 +42,8 @@ Follow the instructions below to create an S3 bucket in AWS for invoking this fu 3. Enable **All object create events** under event types. 4. Under the **Destination** section, select the AWS Lambda function (i.e., `s3Trigger` in this example) from the dropdown. 5. Select the created bucket under the **Buckets** list, click **Upload**, and upload an object to the S3 bucket. -6. Under the **Functions** list of the AWS Management Console, click the AWS Lambda function. -7. Click the **Monitor** tab, and click **View CloudWatch logs** to check the logs via CloudWatch. -8. Under **Log streams** in CloudWatch, click on the top-most stream in the list and verify the object name in the logs. +6. Under the **Functions** list of the AWS Management Console, click the AWS Lambda function, and click the **Monitor** tab. +7. If you get a **Missing permissions** notice at the top, click the **Open the IAM Console** in it. +8. In the IAM Console, click the corresponding role in the list, click **Edit**, and add the **AWSLambdaBasicExecutionRole** to the role. +9. In the **Monitor** tab of the AWS Management Console, click **View CloudWatch logs** to check the logs via CloudWatch. +10. Under **Log streams** in CloudWatch, click on the topmost stream in the list and verify the object name in the logs. From 87b9e68fa7ebcfc93c06b103f560f9fc1e6215e3 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 06:21:06 +0530 Subject: [PATCH 28/94] Update aws-lambda-s3-trigger.md --- examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e8f5bcd9b8..83c266e549 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md @@ -44,6 +44,6 @@ Follow the instructions below to create an S3 bucket in AWS for invoking this fu 5. Select the created bucket under the **Buckets** list, click **Upload**, and upload an object to the S3 bucket. 6. Under the **Functions** list of the AWS Management Console, click the AWS Lambda function, and click the **Monitor** tab. 7. If you get a **Missing permissions** notice at the top, click the **Open the IAM Console** in it. -8. In the IAM Console, click the corresponding role in the list, click **Edit**, and add the **AWSLambdaBasicExecutionRole** to the role. +8. In the IAM Console, click the corresponding role in the list, click **Add permissions**, and add the **AWSLambdaBasicExecutionRole** to the role. 9. In the **Monitor** tab of the AWS Management Console, click **View CloudWatch logs** to check the logs via CloudWatch. 10. Under **Log streams** in CloudWatch, click on the topmost stream in the list and verify the object name in the logs. From d6976018d88511f121a9c99bbc8f84d4528a550c Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 06:29:20 +0530 Subject: [PATCH 29/94] Update aws-lambda-s3-trigger.md --- examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 83c266e549..6dec41377d 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md @@ -44,6 +44,7 @@ Follow the instructions below to create an S3 bucket in AWS for invoking this fu 5. Select the created bucket under the **Buckets** list, click **Upload**, and upload an object to the S3 bucket. 6. Under the **Functions** list of the AWS Management Console, click the AWS Lambda function, and click the **Monitor** tab. 7. If you get a **Missing permissions** notice at the top, click the **Open the IAM Console** in it. -8. In the IAM Console, click the corresponding role in the list, click **Add permissions**, and add the **AWSLambdaBasicExecutionRole** to the role. -9. In the **Monitor** tab of the AWS Management Console, click **View CloudWatch logs** to check the logs via CloudWatch. -10. Under **Log streams** in CloudWatch, click on the topmost stream in the list and verify the object name in the logs. +8. In the IAM Console, click the corresponding role in the list, and click **Add permissions**. +9. Select **attach policies** from the drop-down menu, and add the **AWSLambdaBasicExecutionRole** to the role. +10. In the **Monitor** tab of the AWS Management Console, click **View CloudWatch logs** to check the logs via CloudWatch. +11. Under **Log streams** in CloudWatch, click on the topmost stream in the list and verify the object name in the logs. From 8d2576f08acbbfa1bed8d993883636abc2409053 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 06:29:36 +0530 Subject: [PATCH 30/94] Update aws-lambda-s3-trigger.bal --- examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 66efcb71a7..710fa91dc7 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal @@ -1,8 +1,9 @@ import ballerina/io; -import ballerinax/aws.lambda; +import ballerinax/awslambda; -@lambda:Function -public function s3Trigger(lambda:Context ctx, - lambda:S3Event event) { +@awslambda:Function +public function notifyS3(awslambda:Context ctx, + awslambda:S3Event event) returns json { io:println(event.Records[0].s3.'object.key); + return event.Records[0].s3.'object.key; } From e8b3f18b730c66d652447c2ac9a23c634ec89571 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 06:30:13 +0530 Subject: [PATCH 31/94] Update aws-lambda-s3-trigger.bal --- examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 710fa91dc7..20b51207df 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal @@ -1,9 +1,9 @@ import ballerina/io; -import ballerinax/awslambda; +import ballerinax/aws.lambda; -@awslambda:Function -public function notifyS3(awslambda:Context ctx, - awslambda:S3Event event) returns json { +@lambda:Function +public function notifyS3(lambda:Context ctx, + lambda:S3Event event) returns json { io:println(event.Records[0].s3.'object.key); return event.Records[0].s3.'object.key; } From 340dd241f6812e08ec35fed649f9b99a9dee2f8b Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 06:30:39 +0530 Subject: [PATCH 32/94] Update aws-lambda-s3-trigger.bal --- examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 20b51207df..853ad43a20 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.bal @@ -2,7 +2,7 @@ import ballerina/io; import ballerinax/aws.lambda; @lambda:Function -public function notifyS3(lambda:Context ctx, +public function s3Trigger(lambda:Context ctx, lambda:S3Event event) returns json { io:println(event.Records[0].s3.'object.key); return event.Records[0].s3.'object.key; From 379999399c7b82a96bfe112af8dec00f4ef373ab Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 06:51:29 +0530 Subject: [PATCH 33/94] Update aws-lambda-dynamodb-trigger.bal --- .../aws-lambda-dynamodb-trigger.bal | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.bal b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.bal index bd79b48fd5..bdee82d5b4 100644 --- a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.bal +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.bal @@ -3,6 +3,7 @@ import ballerinax/aws.lambda; @lambda:Function public function dynamoDBTrigger(lambda:Context ctx, - lambda:DynamoDBEvent event) { + lambda:DynamoDBEvent event) returns json { io:println(event.Records[0].dynamodb.Keys.toString()); + return event.Records[0].dynamodb.Keys.toString(); } From 6b87ef22eb91c941db6f0c0e776e2f1f3dfb0f24 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 06:57:14 +0530 Subject: [PATCH 34/94] Update aws-lambda-dynamodb-trigger.md --- .../aws-lambda-dynamodb-trigger.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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 a8d57fbdc9..6a45b4b9e2 100644 --- a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md @@ -36,11 +36,12 @@ Execute the AWS CLI command given by the compiler to create and publish the func Follow the instructions below to create a DynamoDB table for invoking this function. -1. Navigate to [**roles**](https://console.aws.amazon.com/iamv2/home#/roles), and add `AWSLambdaDynamoDBExecutionRole` to the role you created in [Set up the prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/#set-up-the-prerequisites). -2. Go to [DynamoDB](https://us-west-1.console.aws.amazon.com/dynamodbv2). -3. Click **Create Table**, enter the table name and partition key, and create the table (if you already have a table created, you can skip this step). -4. Click on the DynamoDB table you created, and then click the **Exports and streams** tab. -5. Click **enable DynamoDB stream details**, and select the key attributes only for the event type. -6. Once it is enabled, click **Create a trigger**, select the `dynamoDBTrigger` from the dropdown, and create a trigger. -7. Go to [**Items**](https://us-west-1.console.aws.amazon.com/dynamodbv2) in the DynamoDB, select the table, and click **Create item** to add an entry to the DynamoDB table to invoke the Lambda function. -8. Go to the AWS Lambda function and check the logs via CloudWatch to see the object identifier in the logs. +1. In the IAM Console, click the corresponding role in the list, and click **Add permissions**. +2. Select **attach policies** from the drop-down menu, and add the **AWSLambdaDynamoDBExecutionRole** to the role. +3. Go to [DynamoDB](https://us-west-1.console.aws.amazon.com/dynamodbv2). +4. Click **Create Table**, enter the table name and partition key, and create the table (if you already have a table created, you can skip this step). +5. Click on the DynamoDB table you created, and then click the **Exports and streams** tab. +6. Click **enable DynamoDB stream details**, and select the key attributes only for the event type. +7. Once it is enabled, click **Create a trigger**, select the `dynamoDBTrigger` from the dropdown, and create a trigger. +8. Go to [**Items**](https://us-west-1.console.aws.amazon.com/dynamodbv2) in the DynamoDB, select the table, and click **Create item** to add an entry to the DynamoDB table to invoke the Lambda function. +9. Go to the AWS Lambda function and check the logs via CloudWatch to see the object identifier in the logs. From 869b3757ac98ae5252812cde0a08a2f889b0c456 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 06:59:10 +0530 Subject: [PATCH 35/94] Update aws-lambda-dynamodb-trigger.md --- .../aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6a45b4b9e2..582a68646c 100644 --- a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md @@ -38,7 +38,7 @@ Follow the instructions below to create a DynamoDB table for invoking this funct 1. In the IAM Console, click the corresponding role in the list, and click **Add permissions**. 2. Select **attach policies** from the drop-down menu, and add the **AWSLambdaDynamoDBExecutionRole** to the role. -3. Go to [DynamoDB](https://us-west-1.console.aws.amazon.com/dynamodbv2). +3. Go to [DynamoDB](https://us-west-1.console.aws.amazon.com/dynamodbv2), and from the drop-down menu at the RHS of the screen, select the **AWS region** in which you created the user and role. 4. Click **Create Table**, enter the table name and partition key, and create the table (if you already have a table created, you can skip this step). 5. Click on the DynamoDB table you created, and then click the **Exports and streams** tab. 6. Click **enable DynamoDB stream details**, and select the key attributes only for the event type. From d1f3e2086dddc9071d3aa184d64923e3ec1c3571 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 07:09:20 +0530 Subject: [PATCH 36/94] Update aws-lambda-dynamodb-trigger.md --- .../aws-lambda-dynamodb-trigger.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 582a68646c..dd53dbe652 100644 --- a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md @@ -39,9 +39,10 @@ Follow the instructions below to create a DynamoDB table for invoking this funct 1. In the IAM Console, click the corresponding role in the list, and click **Add permissions**. 2. Select **attach policies** from the drop-down menu, and add the **AWSLambdaDynamoDBExecutionRole** to the role. 3. Go to [DynamoDB](https://us-west-1.console.aws.amazon.com/dynamodbv2), and from the drop-down menu at the RHS of the screen, select the **AWS region** in which you created the user and role. -4. Click **Create Table**, enter the table name and partition key, and create the table (if you already have a table created, you can skip this step). +4. Click **Create Table**, enter a table name and a partition key, and create the table (if you already have a table created, you can skip this step). 5. Click on the DynamoDB table you created, and then click the **Exports and streams** tab. -6. Click **enable DynamoDB stream details**, and select the key attributes only for the event type. -7. Once it is enabled, click **Create a trigger**, select the `dynamoDBTrigger` from the dropdown, and create a trigger. -8. Go to [**Items**](https://us-west-1.console.aws.amazon.com/dynamodbv2) in the DynamoDB, select the table, and click **Create item** to add an entry to the DynamoDB table to invoke the Lambda function. -9. Go to the AWS Lambda function and check the logs via CloudWatch to see the object identifier in the logs. +6. Click **Turn on** under **DynamoDB stream details**, select **Key attributes only** for the event type, and click **Turn on stream**. +8. Under the **Trigger** section, click **Create trigger**, select the `dynamoDBTrigger` from the dropdown, and click **Create trigger**. +9. Click **Explore table items**, and click **Create items** under the **Items returned** section. +10. Enter a value under the **Attributes** section to add an entry to the DynamoDB table to invoke the Lambda function, and click **Create item**. +11. Go to the AWS Lambda function and check the logs via CloudWatch to see the object identifier in the logs. From c4e947d76bb4af713ef573182d4fa5d38da67d33 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 07:11:17 +0530 Subject: [PATCH 37/94] Update aws-lambda-dynamodb-trigger.md --- .../aws-lambda-dynamodb-trigger.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 dd53dbe652..1c9e271971 100644 --- a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md @@ -45,4 +45,6 @@ Follow the instructions below to create a DynamoDB table for invoking this funct 8. Under the **Trigger** section, click **Create trigger**, select the `dynamoDBTrigger` from the dropdown, and click **Create trigger**. 9. Click **Explore table items**, and click **Create items** under the **Items returned** section. 10. Enter a value under the **Attributes** section to add an entry to the DynamoDB table to invoke the Lambda function, and click **Create item**. -11. Go to the AWS Lambda function and check the logs via CloudWatch to see the object identifier in the logs. +11. Click the **Monitor** tab of the Lambda function in the AWS Management Console, and click **View CloudWatch logs** to check the logs via CloudWatch. +11. Under **Log streams** in CloudWatch, click on the topmost stream in the list and verify the object name in the logs. +12. Go to the AWS Lambda function and check the logs via CloudWatch to see the object identifier in the logs. From 6b9ca4175db23f6c01cec49f8726ff072684e6d9 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 07:11:42 +0530 Subject: [PATCH 38/94] Update aws-lambda-s3-trigger.md --- examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6dec41377d..700ad62576 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md @@ -46,5 +46,5 @@ Follow the instructions below to create an S3 bucket in AWS for invoking this fu 7. If you get a **Missing permissions** notice at the top, click the **Open the IAM Console** in it. 8. In the IAM Console, click the corresponding role in the list, and click **Add permissions**. 9. Select **attach policies** from the drop-down menu, and add the **AWSLambdaBasicExecutionRole** to the role. -10. In the **Monitor** tab of the AWS Management Console, click **View CloudWatch logs** to check the logs via CloudWatch. +10. Click the **Monitor** tab of the Lambda function in the AWS Management Console, and click **View CloudWatch logs** to check the logs via CloudWatch. 11. Under **Log streams** in CloudWatch, click on the topmost stream in the list and verify the object name in the logs. From 5a318fb2da21969f6411043af54b724cd944dfce Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 07:30:25 +0530 Subject: [PATCH 39/94] Update azure-functions-hello-world.bal --- .../azure-functions-hello-world/azure-functions-hello-world.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-hello-world/azure-functions-hello-world.bal b/examples/azure-functions-hello-world/azure-functions-hello-world.bal index b79c6f33d3..c8434524f0 100644 --- a/examples/azure-functions-hello-world/azure-functions-hello-world.bal +++ b/examples/azure-functions-hello-world/azure-functions-hello-world.bal @@ -1,4 +1,4 @@ -import ballerinax/azure_functions as af; +import ballerinax/azure.functions as af; // This function gets triggered by an HTTP call with the name query parameter and // returns a processed HTTP output to the caller. From b9fe102bd14bc7c80dfba43e09156e313d36cbd6 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 07:30:49 +0530 Subject: [PATCH 40/94] Update azure-functions-http-trigger-with-queue.bal --- .../azure-functions-http-trigger-with-queue.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal index 2ad7b7ee2f..e86b98a74e 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal @@ -1,5 +1,5 @@ import ballerina/http; -import ballerinax/azure_functions as af; +import ballerinax/azure.functions as af; public type Person record { string name; From a1883ad28d958d23b0a575d3cb558dee34c7726c Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 07:31:04 +0530 Subject: [PATCH 41/94] Update azure-functions-timer-trigger.bal --- .../azure-functions-timer-trigger.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal index bc2d6377bf..f3983e339f 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal @@ -1,4 +1,4 @@ -import ballerinax/azure_functions as af; +import ballerinax/azure.functions as af; // This function gets executed every 10 seconds by the Azure Functions app. Once the function is executed, the timer // details will be stored in the selected queue storage for every invocation. From 44f5b9b56fe12f06d3bf531847d5deb93b0a4cc4 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 07:31:21 +0530 Subject: [PATCH 42/94] Update azure-functions-cosmosdb-trigger.bal --- .../azure-functions-cosmosdb-trigger.bal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 30ffd4e072..44f85351ca 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal @@ -1,5 +1,5 @@ import ballerina/io; -import ballerinax/azure_functions as af; +import ballerinax/azure.functions as af; public type DBEntry record { string id; @@ -15,4 +15,4 @@ service "cosmos" on cosmosEp { io:println(entries.toJsonString()); return "Hello, " + name; } -} \ No newline at end of file +} From 0eabb97fbeea29bac9eda15b74eb26c75aa5c417 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 07:42:21 +0530 Subject: [PATCH 43/94] Update azure-functions-hello-world.md --- .../azure-functions-hello-world/azure-functions-hello-world.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 f7597f6267..445a082726 100644 --- a/examples/azure-functions-hello-world/azure-functions-hello-world.md +++ b/examples/azure-functions-hello-world/azure-functions-hello-world.md @@ -40,6 +40,6 @@ Execute the Azure CLI command given by the compiler to create and publish the fu ## Invoke the function -Execute the commands below to invoke the function. +Execute the command below to invoke the function by replacing `bal-bbe` with your respective Azure ``. ::: out execute_function.out ::: From 6bb7f2230b40c3f7a7c875bd505ce2d00ad9345b Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 08:13:46 +0530 Subject: [PATCH 44/94] Update azure-functions-timer-trigger.md --- .../azure-functions-timer-trigger.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 adfaa79be2..8e98608a41 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md @@ -32,4 +32,9 @@ Execute the Azure CLI command given by the compiler to create and publish the fu ## 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. +The `timer` function is triggered by the Azure Functions app from a timer. Follow the steps below to verify the output in the queue storage of the function app. + +1. In the AWS Portal, click **Storage accounts**. +2. From the list, click on the resource group entry that corresponds with your function app. +3. Click ***Queue***, and click on the **queue3** queue. +4. You view the output below getting logged every 10 seconds. From 6157396a90fd0b8898ec2e0ac57c50a1aa56f07f Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 08:32:58 +0530 Subject: [PATCH 45/94] Update azure-functions-timer-trigger.bal --- .../azure-functions-timer-trigger.bal | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal index f3983e339f..b2b8cf62df 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal @@ -1,4 +1,5 @@ import ballerinax/azure.functions as af; +import ballerina/time; // This function gets executed every 10 seconds by the Azure Functions app. Once the function is executed, the timer // details will be stored in the selected queue storage for every invocation. @@ -7,6 +8,7 @@ listener af:TimerListener timerListener = new af:TimerListener(); service "timer" on timerListener { remote function onTrigger(af:TimerMetadata metadata) returns @af:QueueOutput {queueName: "queue3"} string|error { - return "Message Status, " + metadata.IsPastDue.toString(); + time:Utc utc = time:utcNow(); + return "Hello from timer " + time:utcToEmailString(utc); } } From 15a769638fa4c8751789268a0ef646d644bac309 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 08:33:17 +0530 Subject: [PATCH 46/94] Update azure-functions-timer-trigger.bal --- .../azure-functions-timer-trigger.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal index b2b8cf62df..ccd9ed59aa 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal @@ -7,7 +7,7 @@ import ballerina/time; listener af:TimerListener timerListener = new af:TimerListener(); service "timer" on timerListener { - remote function onTrigger(af:TimerMetadata metadata) returns @af:QueueOutput {queueName: "queue3"} string|error { + remote function onTrigger(af:TimerMetadata metadata) returns @af:QueueOutput {queueName: "timerqueue"} string|error { time:Utc utc = time:utcNow(); return "Hello from timer " + time:utcToEmailString(utc); } From 49765997c2cebf566b154465d3394ac128b732be Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 08:33:31 +0530 Subject: [PATCH 47/94] Update azure-functions-timer-trigger.bal --- .../azure-functions-timer-trigger.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal index ccd9ed59aa..e6111fa88e 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal @@ -7,7 +7,7 @@ import ballerina/time; listener af:TimerListener timerListener = new af:TimerListener(); service "timer" on timerListener { - remote function onTrigger(af:TimerMetadata metadata) returns @af:QueueOutput {queueName: "timerqueue"} string|error { + remote function onTrigger(af:TimerMetadata metadata) returns @af:QueueOutput {queueName: "timer-queue"} string|error { time:Utc utc = time:utcNow(); return "Hello from timer " + time:utcToEmailString(utc); } From 159c06dbcfc2c41c3c887c03ecd7a1a7ca81b18c Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 08:37:37 +0530 Subject: [PATCH 48/94] Update azure-functions-timer-trigger.md --- .../azure-functions-timer-trigger.md | 1 + 1 file changed, 1 insertion(+) 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 8e98608a41..be8b2a4c45 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md @@ -38,3 +38,4 @@ The `timer` function is triggered by the Azure Functions app from a timer. Follo 2. From the list, click on the resource group entry that corresponds with your function app. 3. Click ***Queue***, and click on the **queue3** queue. 4. You view the output below getting logged every 10 seconds. + `Hello from timer, ` From 887a88e1bf944600d2817ec441281e41e1ea294a Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 08:37:50 +0530 Subject: [PATCH 49/94] Update azure-functions-timer-trigger.bal --- .../azure-functions-timer-trigger.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal index e6111fa88e..96e19ff144 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal @@ -9,6 +9,6 @@ listener af:TimerListener timerListener = new af:TimerListener(); service "timer" on timerListener { remote function onTrigger(af:TimerMetadata metadata) returns @af:QueueOutput {queueName: "timer-queue"} string|error { time:Utc utc = time:utcNow(); - return "Hello from timer " + time:utcToEmailString(utc); + return "Hello from timer: " + time:utcToEmailString(utc); } } From 3803c36316c72d1c0d0e7e0ef45a5ba4e5913716 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 08:38:01 +0530 Subject: [PATCH 50/94] Update azure-functions-timer-trigger.md --- .../azure-functions-timer-trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 be8b2a4c45..b189386acf 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md @@ -38,4 +38,4 @@ The `timer` function is triggered by the Azure Functions app from a timer. Follo 2. From the list, click on the resource group entry that corresponds with your function app. 3. Click ***Queue***, and click on the **queue3** queue. 4. You view the output below getting logged every 10 seconds. - `Hello from timer, ` + `Hello from timer: ` From 5d8105900d505af9a00e178d727ab39444158de8 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 08:58:45 +0530 Subject: [PATCH 51/94] Update azure-functions-http-trigger-with-queue.md --- .../azure-functions-http-trigger-with-queue.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md index 3184f6156d..26f16890ed 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -7,9 +7,10 @@ For more information, see the [Azure Functions deployment guide](https://balleri ## Set up the prerequisites 1. Set up the [general prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). -2. Accessing the storage account that was created alongside the function app in step 1, and create a queue to hold the outputs of the function. -3. Select **Queues** in the sidebar in the storage accounts. -4. Click the **Add queue** button, and enter the same value as the value of the `queueName` property in the `QueueOutput` annotation in the [Ballerina source below](https://ballerina.io/learn/by-example/azure-functions-trigger/#write-the-function). +2. In the AWS Portal, click **Storage accounts** to create a queue to hold the outputs of the function. +2. From the list, click on the storage account entry that corresponds with your function app. +3. Click **Queues*** in the sidebar, click **+ Queue**, enter a name in the **Addd queue** in the pop-up, and click **Add**. + >**Note:** For the queue name, enter the same value as the value of the `queueName` property in the `QueueOutput` annotation in the [Ballerina source below](https://ballerina.io/learn/by-example/azure-functions-trigger/#write-the-function) ## Write the function From 1edcf4ef445806f442fec16771d04b719f3d6c6e Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 09:00:26 +0530 Subject: [PATCH 52/94] Update azure-functions-timer-trigger.md --- .../azure-functions-timer-trigger.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 b189386acf..3005e14fca 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md @@ -34,8 +34,8 @@ Execute the Azure CLI command given by the compiler to create and publish the fu The `timer` function is triggered by the Azure Functions app from a timer. Follow the steps below to verify the output in the queue storage of the function app. -1. In the AWS Portal, click **Storage accounts**. -2. From the list, click on the resource group entry that corresponds with your function app. -3. Click ***Queue***, and click on the **queue3** queue. +1. In the AWS Portal, click **Storage accounts** to view the created queue. +2. From the list, click on the storage account entry that corresponds with your function app. +3. Click ***Queues***, and click on the **queue3** queue. 4. You view the output below getting logged every 10 seconds. `Hello from timer: ` From 5b0fa0764458b4e3f51a748bc00671f4e5e7e6a2 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 09:08:48 +0530 Subject: [PATCH 53/94] Update azure-functions-http-trigger-with-queue.md --- .../azure-functions-http-trigger-with-queue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md index 26f16890ed..0ec422f3c8 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -40,4 +40,4 @@ Execute the commands below to invoke the function. ::: out execute_function.out ::: ->**Tip:** Refresh the queue page in the portal and view the added entry. +>**Tip:** Refresh the page of the `people` queue in the Azure portal and view the entry added with the message text: `Jack is 21 years old.` From 7622a01ba8073494e89af68ffebe6ee7acd753e0 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 09:12:01 +0530 Subject: [PATCH 54/94] Update azure-functions-http-trigger-with-queue.md --- .../azure-functions-http-trigger-with-queue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md index 0ec422f3c8..5810d79e74 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -36,7 +36,7 @@ Execute the Azure CLI command given by the compiler to create and publish the fu ## Invoke the function -Execute the commands below to invoke the function. +Execute the command below by replacing the sample app name given in the command with your respective Azure `` to invoke the function. ::: out execute_function.out ::: From aae886c206d6dadba9d5ea22482bfc94e365c81c Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 09:13:29 +0530 Subject: [PATCH 55/94] Update azure-functions-http-trigger-with-queue.md --- .../azure-functions-http-trigger-with-queue.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md index 5810d79e74..ac6d6f9cdf 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -32,11 +32,10 @@ Execute the command below to generate the Azure Functions artifacts. ## Deploy the function -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 ``. - +Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `` with your respective function app name. ## Invoke the function -Execute the command below by replacing the sample app name given in the command with your respective Azure `` to invoke the function. +Execute the command below by replacing `` with your respective function app name to invoke the function. ::: out execute_function.out ::: From 534a37a38901e50a9546f8e3c74564fd5c7dd21b Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 09:14:14 +0530 Subject: [PATCH 56/94] Update azure-functions-hello-world.md --- .../azure-functions-hello-world/azure-functions-hello-world.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 445a082726..8573b4d13a 100644 --- a/examples/azure-functions-hello-world/azure-functions-hello-world.md +++ b/examples/azure-functions-hello-world/azure-functions-hello-world.md @@ -34,7 +34,7 @@ Execute the command below to generate the Azure Functions artifacts. ## Deploy the function -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 ``. +Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `` with your respective function app name. ::: out az_deploy.out ::: From ce7ea260a8f8b9c77e1e4b997abe79ac273b95ef Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 09:15:15 +0530 Subject: [PATCH 57/94] Update azure-functions-timer-trigger.md --- .../azure-functions-timer-trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3005e14fca..a009b99af2 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md @@ -28,7 +28,7 @@ Execute the command below to generate the Azure Functions artifacts. ## Deploy the function -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 ``. +Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `bal-bbe` with your respective function app name to invoke the function. ## Invoke the function From 2f023fcb82574e3bb702f358a2db8f3b026856e6 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 09:15:47 +0530 Subject: [PATCH 58/94] Update azure-functions-hello-world.md --- .../azure-functions-hello-world/azure-functions-hello-world.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8573b4d13a..8ea8ec4b9d 100644 --- a/examples/azure-functions-hello-world/azure-functions-hello-world.md +++ b/examples/azure-functions-hello-world/azure-functions-hello-world.md @@ -34,7 +34,7 @@ Execute the command below to generate the Azure Functions artifacts. ## Deploy the function -Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `` with your respective function app name. +Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `bal-bbe` with your respective function app name. ::: out az_deploy.out ::: From 9d5a77cf9d4df5d83cc5a5b89b31bc8188ac9194 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 09:16:28 +0530 Subject: [PATCH 59/94] Update azure-functions-http-trigger-with-queue.md --- .../azure-functions-http-trigger-with-queue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md index ac6d6f9cdf..89fe969ba1 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -32,7 +32,7 @@ Execute the command below to generate the Azure Functions artifacts. ## Deploy the function -Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `` with your respective function app name. +Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `bal-bbe` with your respective function app name. ## Invoke the function Execute the command below by replacing `` with your respective function app name to invoke the function. From af5efe7f2e7aba1e0262360ab11d0f6ed9ede815 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 09:20:13 +0530 Subject: [PATCH 60/94] Update azure-functions-cosmosdb-trigger.bal --- .../azure-functions-cosmosdb-trigger.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 44f85351ca..bfcd1dc962 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal @@ -10,7 +10,7 @@ public type DBEntry record { listener af:CosmosDBListener cosmosEp = new (); service "cosmos" on cosmosEp { - remote function onUpdate(DBEntry[] entries) returns @af:QueueOutput {queueName: "people"} string { + remote function onUpdate(DBEntry[] entries) returns @af:QueueOutput {queueName: "cosmos-queue"} string { string name = entries[0].name; io:println(entries.toJsonString()); return "Hello, " + name; From 024593a40a3612f97fafeda68af46b147814b22e Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 09:22:22 +0530 Subject: [PATCH 61/94] Update azure-functions-cosmosdb-trigger.bal --- .../azure-functions-cosmosdb-trigger.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 bfcd1dc962..44f85351ca 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal @@ -10,7 +10,7 @@ public type DBEntry record { listener af:CosmosDBListener cosmosEp = new (); service "cosmos" on cosmosEp { - remote function onUpdate(DBEntry[] entries) returns @af:QueueOutput {queueName: "cosmos-queue"} string { + remote function onUpdate(DBEntry[] entries) returns @af:QueueOutput {queueName: "people"} string { string name = entries[0].name; io:println(entries.toJsonString()); return "Hello, " + name; From ca21e64cf12ad7a706e684543f4247061f49d3a2 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 09:24:29 +0530 Subject: [PATCH 62/94] Update azure-functions-cosmosdb-trigger.md --- .../azure-functions-cosmosdb-trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6c8a16a3f8..b7f87e190c 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md @@ -10,7 +10,7 @@ Follow the steps below to create a Cosmos DB and a queue to make use of those se 1. Set up the [general prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). 2. Create the queue in the [HTTP trigger](/learn/by-example/azure-functions/http-trigger/) example to resue it in this one. -3. Create an [Azure Cosmos DB account](https://portal.azure.com/#create/Microsoft.DocumentDB) and select **Cosmos DB Core**. +3. Create an [Azure Cosmos DB account](https://portal.azure.com/#create/Microsoft.DocumentDB) and select **Azure Cosmos DB for Table**. 4. Once the database is created, go to the **Data Explorer**, and select **Create Container**. 5. Enter `db1` as the Database ID, `c1` as the collection ID, and click **Ok**. >**Note:** If you want to change these values, change them in the code as well. From a0084dd842155ff21abe7309e1fce0a2826ff31e Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 09:27:20 +0530 Subject: [PATCH 63/94] Update azure-functions-cosmosdb-trigger.md --- .../azure-functions-cosmosdb-trigger.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 b7f87e190c..6188e1417f 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md @@ -10,9 +10,11 @@ Follow the steps below to create a Cosmos DB and a queue to make use of those se 1. Set up the [general prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). 2. Create the queue in the [HTTP trigger](/learn/by-example/azure-functions/http-trigger/) example to resue it in this one. -3. Create an [Azure Cosmos DB account](https://portal.azure.com/#create/Microsoft.DocumentDB) and select **Azure Cosmos DB for Table**. -4. Once the database is created, go to the **Data Explorer**, and select **Create Container**. -5. Enter `db1` as the Database ID, `c1` as the collection ID, and click **Ok**. +3. Create an [Azure Cosmos DB account](https://portal.azure.com/#create/Microsoft.DocumentDB) by selecting **Azure Cosmos DB for Table**, and entering an account name and resource group name. + +4. Cosmos DB Core +5. Once the database is created, go to the **Data Explorer**, and select **Create Container**. +6. Enter `db1` as the Database ID, `c1` as the collection ID, and click **Ok**. >**Note:** If you want to change these values, change them in the code as well. 6. Go to the **Keys** tab of the Cosmos DB page. 7. Copy the value of the `PRIMARY CONNECTION STRING`. From 4f00f8be2f2350d2c32d237b9fee77dd1ad1def1 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 12:09:24 +0530 Subject: [PATCH 64/94] Update azure-functions-cosmosdb-trigger.md --- .../azure-functions-cosmosdb-trigger.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 6188e1417f..c191ac66c6 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md @@ -10,11 +10,12 @@ Follow the steps below to create a Cosmos DB and a queue to make use of those se 1. Set up the [general prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). 2. Create the queue in the [HTTP trigger](/learn/by-example/azure-functions/http-trigger/) example to resue it in this one. -3. Create an [Azure Cosmos DB account](https://portal.azure.com/#create/Microsoft.DocumentDB) by selecting **Azure Cosmos DB for Table**, and entering an account name and resource group name. +3. In the Microsoft Azure Dashboard [Azure Cosmos DB account](https://portal.azure.com/#create/Microsoft.DocumentDB). +4. Select **Azure Cosmos DB for Table**, enter an account name and resource group name, and click **Review + Create**. -4. Cosmos DB Core -5. Once the database is created, go to the **Data Explorer**, and select **Create Container**. -6. Enter `db1` as the Database ID, `c1` as the collection ID, and click **Ok**. +6. Cosmos DB Core +7. Once the database is created, go to the **Data Explorer**, and select **Create Container**. +8. Enter `db1` as the Database ID, `c1` as the collection ID, and click **Ok**. >**Note:** If you want to change these values, change them in the code as well. 6. Go to the **Keys** tab of the Cosmos DB page. 7. Copy the value of the `PRIMARY CONNECTION STRING`. From 068dde4911a03fdcc885c8318a05171a28d8dc09 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 12:10:54 +0530 Subject: [PATCH 65/94] Update azure-functions-cosmosdb-trigger.md --- .../azure-functions-cosmosdb-trigger.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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 c191ac66c6..2f858a8c01 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md @@ -10,12 +10,9 @@ Follow the steps below to create a Cosmos DB and a queue to make use of those se 1. Set up the [general prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). 2. Create the queue in the [HTTP trigger](/learn/by-example/azure-functions/http-trigger/) example to resue it in this one. -3. In the Microsoft Azure Dashboard [Azure Cosmos DB account](https://portal.azure.com/#create/Microsoft.DocumentDB). -4. Select **Azure Cosmos DB for Table**, enter an account name and resource group name, and click **Review + Create**. - -6. Cosmos DB Core -7. Once the database is created, go to the **Data Explorer**, and select **Create Container**. -8. Enter `db1` as the Database ID, `c1` as the collection ID, and click **Ok**. +3. In the Microsoft Azure Dashboard [Azure Cosmos DB account](https://portal.azure.com/#create/Microsoft.DocumentDB), select **Azure Cosmos DB for NoSQL**, enter an account name and resource group name, and click **Review + Create**. +4. Once the database is created, go to the **Data Explorer**, and select **Create Container**. +5. Enter `db1` as the Database ID, `c1` as the collection ID, and click **Ok**. >**Note:** If you want to change these values, change them in the code as well. 6. Go to the **Keys** tab of the Cosmos DB page. 7. Copy the value of the `PRIMARY CONNECTION STRING`. From 820d5a35ce85f9d4f0fd46cb490a9f0ee9efffc5 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 12:11:15 +0530 Subject: [PATCH 66/94] Update azure-functions-cosmosdb-trigger.md --- .../azure-functions-cosmosdb-trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 2f858a8c01..e8e611ddd3 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md @@ -10,7 +10,7 @@ Follow the steps below to create a Cosmos DB and a queue to make use of those se 1. Set up the [general prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). 2. Create the queue in the [HTTP trigger](/learn/by-example/azure-functions/http-trigger/) example to resue it in this one. -3. In the Microsoft Azure Dashboard [Azure Cosmos DB account](https://portal.azure.com/#create/Microsoft.DocumentDB), select **Azure Cosmos DB for NoSQL**, enter an account name and resource group name, and click **Review + Create**. +3. In the Microsoft Azure Dashboard [Azure Cosmos DB account](https://portal.azure.com/#create/Microsoft.DocumentDB), select **Azure Cosmos DB for NoSQL**, enter an account name and a resource group name, and click **Review + Create**. 4. Once the database is created, go to the **Data Explorer**, and select **Create Container**. 5. Enter `db1` as the Database ID, `c1` as the collection ID, and click **Ok**. >**Note:** If you want to change these values, change them in the code as well. From a72800fb09af5f27eb6f16aa5169b1339d0e6146 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 12:21:08 +0530 Subject: [PATCH 67/94] Update azure-functions-cosmosdb-trigger.md --- .../azure-functions-cosmosdb-trigger.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 e8e611ddd3..853ffe1e5e 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md @@ -10,9 +10,10 @@ Follow the steps below to create a Cosmos DB and a queue to make use of those se 1. Set up the [general prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). 2. Create the queue in the [HTTP trigger](/learn/by-example/azure-functions/http-trigger/) example to resue it in this one. -3. In the Microsoft Azure Dashboard [Azure Cosmos DB account](https://portal.azure.com/#create/Microsoft.DocumentDB), select **Azure Cosmos DB for NoSQL**, enter an account name and a resource group name, and click **Review + Create**. -4. Once the database is created, go to the **Data Explorer**, and select **Create Container**. -5. Enter `db1` as the Database ID, `c1` as the collection ID, and click **Ok**. +3. In the [**Azure Cosmos DB** service of the Azure Portal](https://portal.azure.com/#create/Microsoft.DocumentDB), click **Create**, and select **Azure Cosmos DB for NoSQL**. +4. Enter an account name and a resource group name, and click **Review + Create**, and then, click **Create**. +5. Once the database is created, go to the **Data Explorer**, and select **Create Container**. +6. Enter `db1` as the Database ID, `c1` as the collection ID, and click **Ok**. >**Note:** If you want to change these values, change them in the code as well. 6. Go to the **Keys** tab of the Cosmos DB page. 7. Copy the value of the `PRIMARY CONNECTION STRING`. From 9499688ce91e595bcd7e93ef1fb206bfd9ed281d Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 13:39:08 +0530 Subject: [PATCH 68/94] Update azure-functions-http-trigger-with-queue.md --- .../azure-functions-http-trigger-with-queue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md index 89fe969ba1..654b8682a0 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -9,7 +9,7 @@ For more information, see the [Azure Functions deployment guide](https://balleri 1. Set up the [general prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). 2. In the AWS Portal, click **Storage accounts** to create a queue to hold the outputs of the function. 2. From the list, click on the storage account entry that corresponds with your function app. -3. Click **Queues*** in the sidebar, click **+ Queue**, enter a name in the **Addd queue** in the pop-up, and click **Add**. +3. Click **Queues*** in the sidebar, click **+ Queue**, enter a name in the **Add queue** in the pop-up, and click **Add**. >**Note:** For the queue name, enter the same value as the value of the `queueName` property in the `QueueOutput` annotation in the [Ballerina source below](https://ballerina.io/learn/by-example/azure-functions-trigger/#write-the-function) ## Write the function From 5f4ab90bbf9c868fd2ec223b4d8118606a8a05d8 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 13:40:08 +0530 Subject: [PATCH 69/94] Update azure-functions-http-trigger-with-queue.md --- .../azure-functions-http-trigger-with-queue.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md index 654b8682a0..0515c9fde2 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -9,7 +9,8 @@ For more information, see the [Azure Functions deployment guide](https://balleri 1. Set up the [general prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). 2. In the AWS Portal, click **Storage accounts** to create a queue to hold the outputs of the function. 2. From the list, click on the storage account entry that corresponds with your function app. -3. Click **Queues*** in the sidebar, click **+ Queue**, enter a name in the **Add queue** in the pop-up, and click **Add**. +3. Click **Queues*** in the sidebar, and click **+ Queue**. +4. Enter a name in the **Add queue** pop-up, and click **Add**. >**Note:** For the queue name, enter the same value as the value of the `queueName` property in the `QueueOutput` annotation in the [Ballerina source below](https://ballerina.io/learn/by-example/azure-functions-trigger/#write-the-function) ## Write the function From 498f74eb379466f534080e9ac31fc32100f46bb2 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 13:41:03 +0530 Subject: [PATCH 70/94] Update azure-functions-http-trigger-with-queue.md --- .../azure-functions-http-trigger-with-queue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md index 0515c9fde2..d7956ad969 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -11,7 +11,7 @@ For more information, see the [Azure Functions deployment guide](https://balleri 2. From the list, click on the storage account entry that corresponds with your function app. 3. Click **Queues*** in the sidebar, and click **+ Queue**. 4. Enter a name in the **Add queue** pop-up, and click **Add**. - >**Note:** For the queue name, enter the same value as the value of the `queueName` property in the `QueueOutput` annotation in the [Ballerina source below](https://ballerina.io/learn/by-example/azure-functions-trigger/#write-the-function) + >**Note:** For the **Queue name**, enter the same value as the value of the `queueName` property in the `QueueOutput` annotation in the [Ballerina source below](https://ballerina.io/learn/by-example/azure-functions-trigger/#write-the-function) ## Write the function From b21eedf2bebc39c49ca89475707c090df43c433b Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 13:41:29 +0530 Subject: [PATCH 71/94] Update azure-functions-http-trigger-with-queue.md --- .../azure-functions-http-trigger-with-queue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md index d7956ad969..0bbbe61ddd 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -11,7 +11,7 @@ For more information, see the [Azure Functions deployment guide](https://balleri 2. From the list, click on the storage account entry that corresponds with your function app. 3. Click **Queues*** in the sidebar, and click **+ Queue**. 4. Enter a name in the **Add queue** pop-up, and click **Add**. - >**Note:** For the **Queue name**, enter the same value as the value of the `queueName` property in the `QueueOutput` annotation in the [Ballerina source below](https://ballerina.io/learn/by-example/azure-functions-trigger/#write-the-function) + >**Note:** For the **Queue name**, enter the same value of the `queueName` property in the `QueueOutput` annotation in the [Ballerina source below](https://ballerina.io/learn/by-example/azure-functions-trigger/#write-the-function) ## Write the function From e4be4e507ec9183372e9c0a89ef4915c11d3a2cf Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 14:00:48 +0530 Subject: [PATCH 72/94] Update azure-functions-hello-world.bal --- .../azure-functions-hello-world.bal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/azure-functions-hello-world/azure-functions-hello-world.bal b/examples/azure-functions-hello-world/azure-functions-hello-world.bal index c8434524f0..4c50c5928d 100644 --- a/examples/azure-functions-hello-world/azure-functions-hello-world.bal +++ b/examples/azure-functions-hello-world/azure-functions-hello-world.bal @@ -1,8 +1,8 @@ -import ballerinax/azure.functions as af; +import ballerinax/azure.functions; // This function gets triggered by an HTTP call with the name query parameter and // returns a processed HTTP output to the caller. -service / on new af:HttpListener() { +service / on new functions:HttpListener() { resource function get hello(string name) returns string { return "Hello, " + name + "!"; } From cd57be268db4d2cb1b513e9dd0bf2b036760fb02 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 14:01:19 +0530 Subject: [PATCH 73/94] Update azure-functions-timer-trigger.bal --- .../azure-functions-timer-trigger.bal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal index 96e19ff144..4cfa51c15d 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal @@ -1,9 +1,9 @@ -import ballerinax/azure.functions as af; +import ballerinax/azure.functions; import ballerina/time; // This function gets executed every 10 seconds by the Azure Functions app. Once the function is executed, the timer // details will be stored in the selected queue storage for every invocation. -@af:TimerTrigger {schedule: "*/10 * * * * *"} +@functions:TimerTrigger {schedule: "*/10 * * * * *"} listener af:TimerListener timerListener = new af:TimerListener(); service "timer" on timerListener { From 7f7917da94ad39670be1a7dac452a3d377cea047 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 14:02:03 +0530 Subject: [PATCH 74/94] Update azure-functions-http-trigger-with-queue.bal --- .../azure-functions-http-trigger-with-queue.bal | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal index e86b98a74e..b07d21ee3e 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal @@ -1,13 +1,13 @@ import ballerina/http; -import ballerinax/azure.functions as af; +import ballerinax/azure.functions; public type Person record { string name; int age; }; -service / on new af:HttpListener() { - resource function post queue(@http:Payload Person person) returns [@af:HttpOutput http:Created, @af:QueueOutput {queueName: "people"} string] { +service / on new functions:HttpListener() { + resource function post queue(@http:Payload Person person) returns [@functions:HttpOutput http:Created, @functions:QueueOutput {queueName: "people"} string] { http:Created httpRes = { body: person.name + " Added to the Queue!" }; From a91653f065e23d9d82ea9d01cac536b64a9da52f Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 14:02:34 +0530 Subject: [PATCH 75/94] Update azure-functions-cosmosdb-trigger.bal --- .../azure-functions-cosmosdb-trigger.bal | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 44f85351ca..55a4342db2 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.bal @@ -1,16 +1,16 @@ import ballerina/io; -import ballerinax/azure.functions as af; +import ballerinax/azure.functions; public type DBEntry record { string id; string name; }; -@af:CosmosDBTrigger {connectionStringSetting: "CosmosDBConnection", databaseName: "db1", collectionName: "c1"} -listener af:CosmosDBListener cosmosEp = new (); +@functions:CosmosDBTrigger {connectionStringSetting: "CosmosDBConnection", databaseName: "db1", collectionName: "c1"} +listener functions:CosmosDBListener cosmosEp = new (); service "cosmos" on cosmosEp { - remote function onUpdate(DBEntry[] entries) returns @af:QueueOutput {queueName: "people"} string { + remote function onUpdate(DBEntry[] entries) returns @functions:QueueOutput {queueName: "people"} string { string name = entries[0].name; io:println(entries.toJsonString()); return "Hello, " + name; From c400052a302a94d9b05753b49410918d716a1cb4 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 14 Jul 2023 14:07:07 +0530 Subject: [PATCH 76/94] Update azure-functions-cosmosdb-trigger.md --- .../azure-functions-cosmosdb-trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 853ffe1e5e..9ca983dded 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md @@ -26,7 +26,7 @@ Example application settings are as follows. - Name - `CosmosDBConnection` - Value - `AccountEndpoint=https://db-cosmos.documents.azure.com:443/;AccountKey=12345asda;` -Now, as all the infrastructure required are up and running and configured, start building and deploying the Azure function. +Now, as all the infrastructure required is up and running and configured, start building and deploying the Azure function. ## Write the function From 6483b577a188f833764beb23187bfdc8dd7c76b0 Mon Sep 17 00:00:00 2001 From: praneesha Date: Mon, 17 Jul 2023 14:56:51 +0530 Subject: [PATCH 77/94] Remove the current FaaS BBEs --- examples/aws-lambda-deployment/aws_deploy.out | 3 - .../aws_lambda_deployment.bal | 27 - .../aws_lambda_deployment.md | 23 - examples/aws-lambda-deployment/bal_build.out | 12 - examples/aws-lambda-deployment/bal_new.out | 1 - .../invoke_functions.out | 16 - .../azure-functions-deployment/az_deploy.out | 12 - .../azure_functions_deployment.bal | 19 - .../azure_functions_deployment.md | 21 - .../azure-functions-deployment/bal_build.out | 14 - .../azure-functions-deployment/bal_new.out | 1 - .../execute_function.out | 2 - examples/index.json | 4361 ----------------- 13 files changed, 4512 deletions(-) delete mode 100644 examples/aws-lambda-deployment/aws_deploy.out delete mode 100644 examples/aws-lambda-deployment/aws_lambda_deployment.bal delete mode 100644 examples/aws-lambda-deployment/aws_lambda_deployment.md delete mode 100644 examples/aws-lambda-deployment/bal_build.out delete mode 100644 examples/aws-lambda-deployment/bal_new.out delete mode 100644 examples/aws-lambda-deployment/invoke_functions.out delete mode 100644 examples/azure-functions-deployment/az_deploy.out delete mode 100644 examples/azure-functions-deployment/azure_functions_deployment.bal delete mode 100644 examples/azure-functions-deployment/azure_functions_deployment.md delete mode 100644 examples/azure-functions-deployment/bal_build.out delete mode 100644 examples/azure-functions-deployment/bal_new.out delete mode 100644 examples/azure-functions-deployment/execute_function.out diff --git a/examples/aws-lambda-deployment/aws_deploy.out b/examples/aws-lambda-deployment/aws_deploy.out deleted file mode 100644 index 9903c8e992..0000000000 --- a/examples/aws-lambda-deployment/aws_deploy.out +++ /dev/null @@ -1,3 +0,0 @@ -$ aws lambda create-function --function-name echo --zip-file fileb://aws-ballerina-lambda-functions.zip --handler aws_lambda_deployment.echo --runtime provided --role arn:aws:iam::908363916111:role/lambda-role--layers arn:aws:lambda:us-west-1:134633749276:layer:ballerina-jre11:6 --memory-size 512 --timeout 10 -$ aws lambda create-function --function-name uuid --zip-file fileb://aws-ballerina-lambda-functions.zip --handler aws_lambda_deployment.uuid --runtime provided --role arn:aws:iam::908363916111:role/lambda-role--layers arn:aws:lambda:us-west-1:134633749276:layer:ballerina-jre11:6 --memory-size 512 --timeout 10 -$ aws lambda create-function --function-name ctxinfo --zip-file fileb://aws-ballerina-lambda-functions.zip --handler aws_lambda_deployment.ctxinfo --runtime provided --role arn:aws:iam::908363916111:role/lambda-role --layers arn:aws:lambda:us-west-1:134633749276:layer:ballerina-jre11:6 --memory-size 512 --timeout 10 diff --git a/examples/aws-lambda-deployment/aws_lambda_deployment.bal b/examples/aws-lambda-deployment/aws_lambda_deployment.bal deleted file mode 100644 index 54109b090e..0000000000 --- a/examples/aws-lambda-deployment/aws_lambda_deployment.bal +++ /dev/null @@ -1,27 +0,0 @@ -import ballerinax/awslambda; -import ballerina/io; - -// 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 { - return input; -} - -// The `awslambda:Context` object contains request execution context information. -@awslambda:Function -public function ctxinfo(awslambda:Context ctx, json input) returns json|error { - return { - RequestID: ctx.getRequestId(), - DeadlineMS: ctx.getDeadlineMs(), - InvokedFunctionArn: ctx.getInvokedFunctionArn(), - TraceID: ctx.getTraceId(), - RemainingExecTime: ctx.getRemainingExecutionTime() - }; -} - -// If you know the external service that's being used for the function, you can use the built-in types such as -// `S3Event`, `DynamoDBEvent`, `SESEvent` etc. for data binding. -@awslambda:Function -public function notifyS3(awslambda:Context ctx, awslambda:S3Event event) { - io:println(event.Records[0].s3.'object.key); -} diff --git a/examples/aws-lambda-deployment/aws_lambda_deployment.md b/examples/aws-lambda-deployment/aws_lambda_deployment.md deleted file mode 100644 index 5f2e2311fd..0000000000 --- a/examples/aws-lambda-deployment/aws_lambda_deployment.md +++ /dev/null @@ -1,23 +0,0 @@ -# AWS Lambda - -AWS Lambda is an event driven, serverless computing platform. Ballerina functions can be deployed in AWS Lambda by annotating a Ballerina function with "@awslambda:Function", which should have the function signature `function (awslambda:Context, json|EventType) returns json|error`. - -For more information, see the [AWS Lambda Deployment Guide](/learn/run-in-the-cloud/function-as-a-service/aws-lambda/). - -::: code aws_lambda_deployment.bal ::: - -Create a ballerina package and replace the content of the generated ballerina file with the content above. -::: out bal_new.out ::: - -Build the Ballerina program to generate the AWS Lambda artifacts -::: out bal_build.out ::: - -Execute the AWS CLI commands to create and publish the functions; and set your respective AWS `$LAMBDA_ROLE_ARN`, `$REGION_ID`, and `$FUNCTION_NAME` values. -For instructions on getting the value for the`$LAMBDA_ROLE_ARN`, see [AWS Lambda deployment](/learn/run-in-the-cloud/function-as-a-service/aws-lambda/). -::: out aws_deploy.out ::: - -Invoke the functions. -::: out invoke_functions.out ::: - -To invoke the `notifyS3` function, it needs to be registered in the S3 bucket. -For registration and execution details, see [AWS Lambda deployment](/learn/run-in-the-cloud/function-as-a-service/aws-lambda/). diff --git a/examples/aws-lambda-deployment/bal_build.out b/examples/aws-lambda-deployment/bal_build.out deleted file mode 100644 index 28d6ec11dc..0000000000 --- a/examples/aws-lambda-deployment/bal_build.out +++ /dev/null @@ -1,12 +0,0 @@ -$ bal build -Compiling source - wso2/aws_lambda_deployment:0.1.0 - -Generating executable - @awslambda:Function: echo, ctxinfo, notifyS3 - - Run the following command to deploy each Ballerina AWS Lambda function: - aws lambda create-function --function-name $FUNCTION_NAME --zip-file fileb:///aws_lambda_deployment/target/bin/aws-ballerina-lambda-functions.zip --handler aws_lambda_deployment.$FUNCTION_NAME --runtime provided --role $LAMBDA_ROLE_ARN --layers arn:aws:lambda:$REGION_ID:134633749276:layer:ballerina-jre11:6 --memory-size 512 --timeout 10 - - Run the following command to re-deploy an updated Ballerina AWS Lambda function: - aws lambda update-function-code --function-name $FUNCTION_NAME --zip-file fileb://aws-ballerina-lambda-functions.zip diff --git a/examples/aws-lambda-deployment/bal_new.out b/examples/aws-lambda-deployment/bal_new.out deleted file mode 100644 index ac3b9157cc..0000000000 --- a/examples/aws-lambda-deployment/bal_new.out +++ /dev/null @@ -1 +0,0 @@ -$ bal new aws_lambda_deployment diff --git a/examples/aws-lambda-deployment/invoke_functions.out b/examples/aws-lambda-deployment/invoke_functions.out deleted file mode 100644 index d182a6dafb..0000000000 --- a/examples/aws-lambda-deployment/invoke_functions.out +++ /dev/null @@ -1,16 +0,0 @@ -$ echo '{"MESSAGE":"HELLO"}' > input.json -$ aws lambda invoke --function-name echo --payload fileb://input.json echo-response.txt -{ -"ExecutedVersion": "$LATEST", -"StatusCode": 200 -} -$ cat echo-response.txt -{"MESSAGE":"HELLO"} - -$ aws lambda invoke --function-name ctxinfo ctxinfo-response.txt -{ -"ExecutedVersion": "$LATEST", -"StatusCode": 200 -} -$ cat ctxinfo-response.txt -{"RequestID":"d55f7d06-f2ab-4b6e-8606-482607785a91", "DeadlineMS":1548069389978, "InvokedFunctionArn":"arn:aws:lambda:us-west-2:908363916138:function:ctxinfo", "TraceID":"Root=1-5c45aa03-f8aff4c9e24dc4fbf48f2990;Parent=17ad3b290def98fd;Sampled=0", "RemainingExecTime":9946} diff --git a/examples/azure-functions-deployment/az_deploy.out b/examples/azure-functions-deployment/az_deploy.out deleted file mode 100644 index 968f927b8e..0000000000 --- a/examples/azure-functions-deployment/az_deploy.out +++ /dev/null @@ -1,12 +0,0 @@ -$ func azure functionapp publish bal-bbe --script-root target/azure_functions -Getting site publishing info... -Creating archive for current directory... -Uploading 28.67 MB [##############################################################################] -Upload completed successfully. -Deployment completed successfully. -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-deployment/azure_functions_deployment.bal b/examples/azure-functions-deployment/azure_functions_deployment.bal deleted file mode 100644 index 8c9c37e2aa..0000000000 --- a/examples/azure-functions-deployment/azure_functions_deployment.bal +++ /dev/null @@ -1,19 +0,0 @@ -import ballerinax/azure_functions as af; - -// This function gets triggered by an HTTP call with the name query parameter and returns a processed HTTP output to the caller. -service / on new af:HttpListener() { - resource function get hello(string name) returns string { - return "Hello, " + name + "!"; - } -} - -// This function gets executed every 10 seconds by the Azure Functions app. Once the function is executed, the timer -// details will be stored in the selected queue storage for every invocation. -@af:TimerTrigger {schedule: "*/10 * * * * *"} -listener af:TimerListener timerListener = new af:TimerListener(); - -service "timer" on timerListener { - remote function onTrigger(af:TimerMetadata metadata) returns @af:QueueOutput {queueName: "queue3"} string|error { - return "Message Status, " + metadata.IsPastDue.toString(); - } -} diff --git a/examples/azure-functions-deployment/azure_functions_deployment.md b/examples/azure-functions-deployment/azure_functions_deployment.md deleted file mode 100644 index ecf26ab6b4..0000000000 --- a/examples/azure-functions-deployment/azure_functions_deployment.md +++ /dev/null @@ -1,21 +0,0 @@ -# Azure Functions - -Azure Functions is an event driven, serverless computing platform. Azure Functions can be written from Ballerina using the listeners and services provided by Azure Functions package. You can view the code examples below. - -For more information, see the [Azure deployment guide](/learn/run-in-the-cloud/function-as-a-service/azure-functions/). - -::: code azure_functions_deployment.bal ::: - -Create a Ballerina package and replace the content of the generated BAL file with the content above. -::: out bal_new.out ::: - -Build the Ballerina program to generate the Azure Functions artifacts. -::: out bal_build.out ::: - -Execute the Azure CLI command given by the compiler to publish the functions (replace the sample app name given in the command with your respective Azure ``). -::: out az_deploy.out ::: - -Invoke the `HTTP Trigger` functions. -::: out execute_function.out ::: - -The `timer` function is triggered by the Azure Functions app from a timer. You can check the queue storage to see the output. For more information on the infrastructure, see [Azure Functions deployment](/learn/run-in-the-cloud/function-as-a-service/azure-functions/). diff --git a/examples/azure-functions-deployment/bal_build.out b/examples/azure-functions-deployment/bal_build.out deleted file mode 100644 index cc1448aa34..0000000000 --- a/examples/azure-functions-deployment/bal_build.out +++ /dev/null @@ -1,14 +0,0 @@ -$ bal build --cloud="azure_functions" -Compiling source - wso2/azure_functions_deployment:0.1.0 - -Generating executable - @azure_functions:Function: timer, get-hello - - Execute the command below to deploy the function locally. - func start --script-root target/azure_functions --java - - Execute the command below to deploy Ballerina Azure Functions. - func azure functionapp publish --script-root target/azure_functions - - target/bin/azure_functions_deployment.jar diff --git a/examples/azure-functions-deployment/bal_new.out b/examples/azure-functions-deployment/bal_new.out deleted file mode 100644 index 9f1771644c..0000000000 --- a/examples/azure-functions-deployment/bal_new.out +++ /dev/null @@ -1 +0,0 @@ -$ bal new azure_functions_deployment diff --git a/examples/azure-functions-deployment/execute_function.out b/examples/azure-functions-deployment/execute_function.out deleted file mode 100644 index 0da4052046..0000000000 --- a/examples/azure-functions-deployment/execute_function.out +++ /dev/null @@ -1,2 +0,0 @@ -$ curl https://bal-bbe.azurewebsites.net/hello\?name\=Jack -Hello, Jack! diff --git a/examples/index.json b/examples/index.json index 2d3a6270fa..ad9f22b371 100644 --- a/examples/index.json +++ b/examples/index.json @@ -1,4324 +1,4 @@ [ - { - "title": "Hello World", - "column": 0, - "category": "Language concepts", - "samples": [ - { - "name": "Hello world main", - "url": "hello-world", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Hello world service", - "url": "hello-world-service", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Basics", - "column": 0, - "category": "Language concepts", - "samples": [ - { - "name": "Programs and modules", - "url": "programs-and-modules", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Main function", - "url": "main-function", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": true - }, - { - "name": "Init function", - "url": "init-function", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Variables and types", - "url": "variables-and-types", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Identifiers", - "url": "identifiers", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Simple basic types", - "column": 0, - "category": "Language concepts", - "samples": [ - { - "name": "Integers", - "url": "integers", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Floating point numbers", - "url": "floating-point-numbers", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Decimal type", - "url": "decimal-type", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Nil", - "url": "nil", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Boolean", - "url": "boolean", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Strings", - "column": 0, - "category": "Language concepts", - "samples": [ - { - "name": "Strings", - "url": "strings", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Conditional statements", - "column": 0, - "category": "Language concepts", - "samples": [ - { - "name": "If statement", - "url": "if-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Match statement", - "url": "match-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Match guard in match statement", - "url": "match-guard-in-match-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Binding patterns in match statement", - "url": "binding-patterns-in-match-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Functions", - "column": 0, - "category": "Language concepts", - "samples": [ - { - "name": "Functions", - "url": "functions", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Included record parameters", - "url": "included-record-parameters", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Rest parameters", - "url": "rest-parameters", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Default values for function parameters", - "url": "default-values-for-function-parameters", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Provide function arguments by name", - "url": "provide-function-arguments-by-name", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Function pointers", - "url": "function-pointers", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Function values", - "url": "function-values", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Function types", - "url": "function-types", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Anonymous function", - "url": "anonymous-function", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Function closure", - "url": "function-closure", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Iteration", - "column": 0, - "category": "Language concepts", - "samples": [ - { - "name": "Foreach statement", - "url": "foreach-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "While statement", - "url": "while-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Break statement", - "url": "break-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Continue statement", - "url": "continue-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Range function", - "url": "int-range", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Lang library", - "column": 0, - "category": "Language concepts", - "samples": [ - { - "name": "Langlib functions", - "url": "langlib-functions", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Types and typing", - "column": 0, - "category": "Language concepts", - "samples": [ - { - "name": "Structural typing", - "url": "structural-typing", - "verifyBuild": true, - "verifyOutput": true, - "disablePlayground": true, - "isLearnByExample": true - }, - { - "name": "Unions", - "url": "unions", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Errors", - "url": "error-reporting", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Anydata type", - "url": "anydata-type", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Any type", - "url": "any-type", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Type definitions", - "url": "type-definitions", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Typedesc type", - "url": "typedesc-type", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Covariance", - "url": "covariance", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Type inference", - "url": "type-inference", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Built-in integer subtypes", - "url": "built-in-integer-subtypes", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Built-in string subtype", - "url": "built-in-string-subtype", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "ensureType function", - "url": "ensureType-function", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Dependent types", - "url": "dependent-types", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Stream type", - "url": "stream-type", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Never type", - "url": "never-type", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Expression-oriented style", - "column": 0, - "category": "Language concepts", - "samples": [ - { - "name": "Expression-oriented style", - "url": "expression-oriented-style", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Lists", - "column": 1, - "category": "Language concepts", - "samples": [ - { - "name": "Arrays", - "url": "arrays", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Nested arrays", - "url": "nested-arrays", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Tuples", - "url": "tuples", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Rest type in tuples", - "url": "rest-type-in-tuples", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Filler values of a list", - "url": "filler-values-of-a-list", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "List subtyping", - "url": "list-subtyping", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": true - }, - { - "name": "List equality", - "url": "list-equality", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Binary data", - "url": "binary-data", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Mappings", - "column": 1, - "category": "Language concepts", - "samples": [ - { - "name": "Maps", - "url": "maps", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Records", - "url": "records", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Computed field key", - "url": "computed-field-key", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Records", - "column": 1, - "category": "Language concepts", - "samples": [ - { - "name": "Optional fields", - "url": "optional-fields", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Open records", - "url": "open-records", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Controlling openness", - "url": "controlling-openness", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Type inclusion for records", - "url": "type-inclusion-for-records", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Default values for record fields", - "url": "default-values-for-record-fields", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Array/Map symmetry", - "column": 1, - "category": "Language concepts", - "samples": [ - { - "name": "Array/Map symmetry", - "url": "array-map-symmetry", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Objects", - "column": 1, - "category": "Language concepts", - "samples": [ - { - "name": "Object", - "url": "object", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Defining classes", - "url": "defining-classes", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Object constructor", - "url": "object-constructor", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Object value from class definition", - "url": "object-value-from-class-definition", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Visibility of object fields and methods", - "url": "visibility-of-object-fields-and-methods", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Init return type", - "url": "init-return-type", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Object types", - "url": "object-types", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Object type inclusion", - "url": "object-type-inclusion", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Distinct object types", - "url": "distinct-object-types", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Object closure", - "url": "object-closure", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Client class", - "url": "client-class", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Start service from service class definition", - "url": "start-service-from-service-class-definition", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Binding patterns", - "column": 1, - "category": "Language concepts", - "samples": [ - { - "name": "Binding patterns", - "url": "binding-patterns", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Typed binding pattern", - "url": "typed-binding-pattern", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Wildcard binding pattern", - "url": "wildcard-binding-pattern", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "List binding patterns", - "url": "list-binding-pattern", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Rest binding pattern in list binding pattern", - "url": "rest-binding-pattern-in-list-binding-pattern", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Mapping binding pattern", - "url": "mapping-binding-pattern", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Rest binding pattern in mapping binding pattern", - "url": "rest-binding-pattern-in-mapping-binding-pattern", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Error binding pattern", - "url": "error-binding-pattern", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Rest binding pattern in error binding pattern", - "url": "rest-binding-pattern-in-error-binding-pattern", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Single use of typed binding patterns", - "url": "single-use-of-typed-binding", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Single use of typed binding patterns with on fail clause", - "url": "single-use-with-on-fail-clause", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Iterative use of typed binding patterns", - "url": "iterative-use-of-typed-binding", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "List binding pattern in match statement", - "url": "list-binding-pattern-in-match-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Mapping binding pattern in match statement", - "url": "mapping-binding-pattern-in-match-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Error binding pattern in match statement", - "url": "error-binding-pattern-in-match-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Regular Expressions", - "column": 1, - "category": "Language concepts", - "samples": [ - { - "name": "RegExp type", - "url": "regexp-type", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "RegExp operations", - "url": "regexp-operations", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Tables", - "column": 2, - "category": "Language concepts", - "samples": [ - { - "name": "Table", - "url": "table", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Table types", - "url": "table-types", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Multiple key fields", - "url": "multiple-key-fields", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Structured keys", - "url": "structured-keys", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Query expressions", - "column": 2, - "category": "Language concepts", - "samples": [ - { - "name": "Query expressions", - "url": "query-expressions", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Sort iterable objects", - "url": "sort-iterable-objects", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Let clause", - "url": "let-clause", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Limit clause", - "url": "limit-clause", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Join iterable objects", - "url": "joining-iterable-objects", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Outer Join clause", - "url": "outer-join-clause", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Query tables", - "url": "querying-tables", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Create tables with a query", - "url": "create-tables-with-query", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Create maps with a query", - "url": "create-maps-with-query", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Create streams with a query", - "url": "create-streams-with-query", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "On conflict clause", - "url": "on-conflict-clause", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Iterate over XML with a query", - "url": "iterating-over-xml-with-query", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Nested query expressions", - "url": "nested-query-expressions", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Destructure records using a query", - "url": "destructure-records-using-query", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Querying streams", - "url": "querying-with-streams", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Aggregation", - "url": "aggregation", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Query actions", - "column": 2, - "category": "Language concepts", - "samples": [ - { - "name": "Query actions", - "url": "query-actions", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": true - } - ] - }, - { - "title": "JSON", - "column": 2, - "category": "Language concepts", - "samples": [ - { - "name": "JSON type", - "url": "json-type", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Access JSON elements", - "url": "access-json-elements", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Access optional JSON elements", - "url": "access-optional-json-elements", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Match statement with maps", - "url": "match-statement-with-maps", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Convert from user-defined type to JSON", - "url": "converting-from-user-defined-type-to-json", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Convert from table and XML to JSON", - "url": "converting-from-table-and-xml-to-json", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Convert from JSON to user-defined type", - "url": "convert-from-json-to-user-defined-type", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Cast JSON to user-defined type", - "url": "casting-json-to-user-defined-type", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Resource method typing", - "url": "resource-method-typing", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": true - }, - { - "name": "JSON numbers", - "url": "json-numbers", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Backtick templates", - "column": 2, - "category": "Language concepts", - "samples": [ - { - "name": "Raw templates", - "url": "raw-templates", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": true - }, - { - "name": "Backtick templates", - "url": "backtick-templates", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "XML templates", - "url": "xml-templates", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "XML", - "column": 2, - "category": "Language concepts", - "samples": [ - { - "name": "XML data model", - "url": "xml-data-model", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "XML operations", - "url": "xml-operations", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "XML iteration", - "url": "xml-iteration", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "XML access", - "url": "xml-access", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "XML mutation", - "url": "xml-mutation", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "XML subtyping", - "url": "xml-subtyping", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "XML navigation ", - "url": "xml-navigation", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "XML templates and query", - "url": "xml-templates-and-query", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "XML namespaces", - "url": "xml-namespaces", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "XMLNS declarations", - "url": "xmlns-declarations", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Metadata", - "column": 2, - "category": "Language concepts", - "samples": [ - { - "name": "Documentation", - "url": "documentation", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Annotations", - "url": "annotations", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Network interaction", - "column": 2, - "category": "Language concepts", - "samples": [ - { - "name": "Consume services: client objects", - "url": "consuming-services", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Failing intermittently due to GitHub rate limiting", - "isLearnByExample": true - }, - { - "name": "Provide services", - "url": "providing-services", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Service cannot be stopped", - "disablePlayground": true, - "isLearnByExample": true - }, - { - "name": "Module lifecycle", - "url": "module-lifecycle", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Service declaration", - "url": "service-declaration", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Does not include udp client", - "disablePlayground": true, - "isLearnByExample": true - }, - { - "name": "Resource methods", - "url": "resource-methods", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": true - }, - { - "name": "Hierarchical resources", - "url": "hierarchical-resources", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": true - }, - { - "name": "Resource path parameters", - "url": "resource-path-parameters", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Configurability", - "column": 2, - "category": "Language concepts", - "samples": [ - { - "name": "Configurable variables", - "url": "configurable-variables", - "verifyBuild": true, - "verifyOutput": true, - "disablePlayground": true, - "isLearnByExample": true - }, - { - "name": "Configure via TOML files", - "url": "configuring-via-toml", - "verifyBuild": true, - "verifyOutput": true, - "disablePlayground": true, - "isLearnByExample": true - }, - { - "name": "Configure via CLI arguments", - "url": "configuring-via-cli", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "disablePlayground": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Error handling", - "column": 3, - "category": "Language concepts", - "samples": [ - { - "name": "Error handling", - "url": "error-handling", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Check expression", - "url": "check-expression", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Error subtyping", - "url": "error-subtyping", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Panics", - "url": "panics", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Type intersection for error types", - "url": "error-type-intersection", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Error detail", - "url": "error-detail", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Error cause", - "url": "error-cause", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Ignore return values and errors", - "column": 3, - "category": "Language concepts", - "samples": [ - { - "name": "Ignore return values and errors", - "url": "ignoring-return-values-and-errors", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Mutability and identity", - "column": 3, - "category": "Language concepts", - "samples": [ - { - "name": "Identity", - "url": "identity", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Const and final ", - "url": "const-and-final", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Enumerations", - "url": "enumerations", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Immutability", - "url": "immutability", - "verifyBuild": true, - "verifyOutput": true, - "disablePlayground": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Concurrency", - "column": 3, - "category": "Language concepts", - "samples": [ - { - "name": "Asynchronous function calls", - "url": "asynchronous-function-calls", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Named workers", - "url": "named-workers", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Sequence diagrams", - "url": "sequence-diagrams", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Wait for workers", - "url": "waiting-for-workers", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Strands", - "url": "strands", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": true - }, - { - "name": "Named worker return values", - "url": "named-worker-return-values", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Alternate wait", - "url": "alternate-wait", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "isLearnByExample": true - }, - { - "name": "Multiple wait", - "url": "multiple-wait", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Named workers and futures", - "url": "named-workers-and-futures", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Inter-worker message passing", - "url": "inter-worker-message-passing", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Inter-worker failure propagation", - "url": "inter-worker-failure-propagation", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Synchronize message passing", - "url": "synchronize-message-passing", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Asynchronize message passing", - "url": "asynchronize-message-passing", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Flush", - "url": "flush", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Transactions", - "column": 3, - "category": "Language concepts", - "samples": [ - { - "name": "Transaction statement", - "url": "transaction-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Check semantics", - "url": "check-semantics", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Rollback", - "url": "rollback", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Retry transaction statement", - "url": "retry-transaction-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Transactional qualifier", - "url": "transactional-qualifier", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Transactional named workers", - "url": "transactional-named-workers", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Commit/rollback handlers", - "url": "commit-rollback-handlers", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Concurrency safety", - "column": 3, - "category": "Language concepts", - "samples": [ - { - "name": "Lock statement", - "url": "lock-statement", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Isolated functions", - "url": "isolated-functions", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Readonly type", - "url": "readonly-type", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Readonly and isolated", - "url": "readonly-and-isolated", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Readonly objects and classes", - "url": "readonly-objects-and-classes", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Combining isolated functions and lock", - "url": "combining-isolated-functions-and-lock", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Isolated variables", - "url": "isolated-variables", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Isolated methods", - "url": "isolated-methods", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Isolated objects", - "url": "isolated-objects", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Inferring isolated", - "url": "inferring-isolated", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - }, - { - "name": "Run strands safely on separate threads", - "url": "run-strands-safely-on-separate-threads", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Interface to external code", - "column": 3, - "category": "Language concepts", - "samples": [ - { - "name": "Interface to external code", - "url": "interface-to-external-code", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": true - } - ] - }, - { - "title": "Testing", - "column": 3, - "category": "Language concepts", - "samples": [ - { - "name": "Assertions", - "url": "testerina-assertions", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Before and after test", - "url": "testerina-before-and-after-test", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Before and after each", - "url": "testerina-before-and-after-each", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Before and after groups", - "url": "testerina-before-and-after-groups", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Before and after suite", - "url": "testerina-before-and-after-suite", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Data-driven tests", - "url": "testerina-data-driven-tests", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Guarantee test execution order", - "url": "testerina-guarantee-test-execution-order", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Group tests", - "url": "testerina-group-tests", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Function mocking", - "url": "testerina-mocking-functions", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Object mocking", - "url": "testerina-mocking-objects", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "REST service", - "column": 0, - "category": "Network libraries", - "samples": [ - { - "name": "Basic REST service", - "url": "http-basic-rest-service", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Service and resource paths", - "url": "http-service-and-resource-paths", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Payload data binding", - "url": "http-service-data-binding", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Payload constraint validation", - "url": "http-service-payload-constraint-validation", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Path parameter", - "url": "http-path-param", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Query parameter", - "url": "http-query-parameter", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Header parameter", - "url": "http-header-param", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Send response", - "url": "http-send-response", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Send different status codes", - "url": "http-send-different-status-codes", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Send different status codes with payload", - "url": "http-send-different-status-codes-with-payload", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Error handling", - "url": "http-default-error-handling", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Send cache response", - "url": "http-service-cache-response", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - } - ] - }, - { - "title": "HTTP client", - "column": 0, - "category": "Network libraries", - "samples": [ - { - "name": "Send request/Receive response", - "url": "http-client-send-request-receive-response", - "verifyBuild": false, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Payload data binding", - "url": "http-client-data-binding", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Payload constraint validation", - "url": "http-client-payload-constraint-validation", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Path parameter", - "url": "http-client-path-parameter", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Query parameter", - "url": "http-client-query-parameter", - "verifyBuild": false, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Header parameter", - "url": "http-client-header-parameter", - "verifyBuild": false, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Enable caching", - "url": "http-caching-client", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - } - ] - }, - { - "title": "REST service security", - "column": 0, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "http-service-ssl-tls", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Mutual SSL", - "url": "http-service-mutual-ssl", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication file user store", - "url": "http-service-basic-authentication-file-user-store", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication LDAP user store", - "url": "http-service-basic-authentication-ldap-user-store", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "JWT authentication", - "url": "http-service-jwt-authentication", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "OAuth2", - "url": "http-service-oauth2", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "HTTP client security", - "column": 0, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "http-client-ssl-tls", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Mutual SSL", - "url": "http-client-mutual-ssl", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Basic authentication", - "url": "http-client-basic-authentication", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Bearer token authentication", - "url": "http-client-bearer-token-authentication", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Self-signed JWT authentication", - "url": "http-client-self-signed-jwt-authentication", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "OAuth2 client credentials grant type", - "url": "http-client-oauth2-client-credentials-grant-type", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "OAuth2 password grant type", - "url": "http-client-oauth2-password-grant-type", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "OAuth2 refresh token grant type", - "url": "http-client-oauth2-refresh-token-grant-type", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "OAuth2 JWT bearer grant type", - "url": "http-client-oauth2-jwt-bearer-grant-type", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - } - ] - }, - { - "title": "HTTP client resiliency", - "column": 0, - "category": "Network libraries", - "samples": [ - { - "name": "Timeout", - "url": "http-timeout", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Retry", - "url": "http-retry", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Circuit breaker", - "url": "http-circuit-breaker", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Load balancer", - "url": "http-load-balancer", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Failover", - "url": "http-failover", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - } - ] - }, - { - "title": "HTTP service advanced", - "column": 0, - "category": "Network libraries", - "samples": [ - { - "name": "Default resource", - "url": "http-default-resource", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Request/Response object", - "url": "http-request-response", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Caller object", - "url": "http-caller", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Redirects", - "url": "http-service-redirects", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "CORS", - "url": "http-cors", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "100 continue", - "url": "http-100-continue", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Matrix parameter", - "url": "http-matrix-param", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Restrict by media type", - "url": "http-restrict-by-media-type", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "File upload", - "url": "http-service-file-upload", - "verifyBuild": false, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Compression", - "url": "http-compression", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Trace logs", - "url": "http-trace-logs", - "verifyBuild": false, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Access logs", - "url": "http-access-logs", - "verifyBuild": false, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Cookies", - "url": "http-cookies-service", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Chunking", - "url": "http-service-chunking", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Sending headers", - "url": "http-send-header", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Response with multiparts", - "url": "http-response-with-multiparts", - "verifyBuild": false, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Passthrough", - "url": "http-passthrough", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "HTTP/2 to HTTP/1.1 downgrade", - "url": "http-2-to-1-1-downgrade-service", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "HTTP/2 server push", - "url": "http-2-0-server-push", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - } - ] - }, - { - "title": "HTTP client advanced", - "column": 0, - "category": "Network libraries", - "samples": [ - { - "name": "Redirects", - "url": "http-client-redirects", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "File upload", - "url": "http-client-file-upload", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Cookies", - "url": "http-cookies-client", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Chunking", - "url": "http-client-chunking", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "Request with multiparts", - "url": "http-request-with-multiparts", - "verifyBuild": false, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "HTTP/2 to HTTP/1.1 downgrade", - "url": "http-2-to-1-1-downgrade-client", - "verifyBuild": false, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "HTTP/2 prior knowledge", - "url": "http-2-prior-knowledge-client", - "verifyBuild": false, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - }, - { - "name": "HTTP/2 server push", - "url": "http-2-0-client-server-push", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": false, - "isLearnByExample": false - } - ] - }, - { - "title": "HTTP service interceptors", - "column": 1, - "category": "Network libraries", - "samples": [ - { - "name": "Request interceptor", - "url": "http-request-interceptor", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Response interceptor", - "url": "http-response-interceptor", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Error handling", - "url": "http-error-handling", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - }, - { - "name": "Interceptor error handling", - "url": "http-interceptor-error-handling", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - } - ] - }, - { - "title": "GraphQL service", - "column": 1, - "category": "Network libraries", - "samples": [ - { - "name": "Hello world", - "url": "graphql-hello-world", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Service as output object", - "url": "graphql-returning-service-objects", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Record as output object", - "url": "graphql-returning-record-values", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Input types", - "url": "graphql-input-types", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Mutations", - "url": "graphql-mutations", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Subscriptions", - "url": "graphql-subscriptions", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Input objects", - "url": "graphql-input-objects", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Interfaces", - "url": "graphql-interfaces", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Interfaces implementing interfaces", - "url": "graphql-interfaces-implementing-interfaces", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Union types", - "url": "graphql-service-union-types", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Error handling", - "url": "graphql-service-error-handling", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "GraphiQL client", - "url": "graphql-graphiql", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Documentation", - "url": "graphql-documentation", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Directives", - "url": "graphql-directives", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Context object", - "url": "graphql-context", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Field object", - "url": "graphql-service-field-object", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Service interceptors", - "url": "graphql-service-interceptors", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Field interceptors", - "url": "graphql-field-interceptors", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Interceptor configurations", - "url": "graphql-interceptor-configurations", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Input constraint validation", - "url": "graphql-input-constraint-validation", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "File upload", - "url": "graphql-file-upload", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Hierarchical resource paths", - "url": "graphql-hierarchical-resource-paths", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "GraphQL client", - "column": 1, - "category": "Network libraries", - "samples": [ - { - "name": "Query GraphQL endpoint", - "url": "graphql-client-query-endpoint", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Handle partial response", - "url": "graphql-client-handle-partial-response", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Handle error response", - "url": "graphql-client-error-handling", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "GraphQL service security", - "column": 1, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "graphql-service-ssl-tls", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Mutual SSL", - "url": "graphql-service-mutual-ssl", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication file user store", - "url": "graphql-service-basic-auth-file-user-store", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication LDAP user store", - "url": "graphql-service-basic-auth-ldap-user-store", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "JWT authentication", - "url": "graphql-service-jwt-auth", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "OAuth2", - "url": "graphql-service-oauth2", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "GraphQL client security", - "column": 1, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "graphql-client-security-ssl-tls", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Mutual SSL", - "url": "graphql-client-security-mutual-ssl", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication", - "url": "graphql-client-security-basic-auth", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Self-signed JWT authentication", - "url": "graphql-client-security-self-signed-jwt-authentication", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "OAuth2 password grant type", - "url": "graphql-client-security-oauth2-password-grant-type", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "WebSocket service", - "column": 1, - "category": "Network libraries", - "samples": [ - { - "name": "Send/Receive message", - "url": "websocket-basic-sample", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Service cannot be stopped", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Payload constraint validation", - "url": "websocket-service-payload-constraint-validation", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Service cannot be stopped", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Error handling", - "url": "websocket-service-error-handling", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Service cannot be stopped", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "WebSocket client", - "column": 1, - "category": "Network libraries", - "samples": [ - { - "name": "Send/Receive message", - "url": "websocket-client", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Payload constraint validation", - "url": "websocket-client-payload-constraint-validation", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "WebSocket service security", - "column": 1, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "websocket-service-ssl-tls", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Mutual SSL", - "url": "websocket-service-mutual-ssl", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication file user store", - "url": "websocket-service-basic-auth-file-user-store", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication LDAP user store", - "url": "websocket-service-basic-auth-ldap-user-store", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "JWT authentication", - "url": "websocket-service-jwt-auth", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "OAuth2", - "url": "websocket-service-oauth2", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "WebSocket client security", - "column": 1, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "websocket-client-ssl-tls", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Mutual SSL", - "url": "websocket-client-mutual-ssl", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication", - "url": "websocket-client-basic-auth", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Bearer token authentication", - "url": "websocket-client-bearer-token-auth", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Self-signed JWT authentication", - "url": "websocket-client-self-signed-jwt-auth", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "OAuth2 client credentials grant type", - "url": "websocket-client-oauth2-client-cred-grant-type", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "OAuth2 password grant type", - "url": "websocket-client-oauth2-password-grant-type", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "OAuth2 refresh token grant type", - "url": "websocket-client-oauth2-refresh-token-grant-type", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "OAuth2 JWT bearer grant type", - "url": "websocket-client-oauth2-jwt-bearer-grant-type", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "WebSocket client resiliency", - "column": 1, - "category": "Network libraries", - "samples": [ - { - "name": "Timeout", - "url": "websocket-timeout-client", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Retry", - "url": "websocket-retry-client", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "WebSub service", - "column": 1, - "category": "Network libraries", - "samples": [ - { - "name": "Consume github events", - "url": "websub-webhook-sample", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Listeners and StopHandlers", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "Dynamic listener", - "url": "dynamic-listener", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "StopHandler", - "url": "stop-handler", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "gRPC service", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "Simple RPC", - "url": "grpc-service-simple", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Server-side streaming RPC", - "url": "grpc-service-server-streaming", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Client-side streaming RPC", - "url": "grpc-service-client-streaming", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Bidirectional streaming RPC", - "url": "grpc-service-bidirectional-streaming", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Send/Receive headers", - "url": "grpc-service-headers", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Server reflection", - "url": "grpc-server-reflection", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Check deadline", - "url": "grpc-service-check-deadline", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "gRPC client", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "Simple RPC", - "url": "grpc-client-simple", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Server-side streaming RPC", - "url": "grpc-client-server-streaming", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Client-side streaming RPC", - "url": "grpc-client-client-streaming", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Bidirectional streaming RPC", - "url": "grpc-client-bidirectional-streaming", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Send/Receive headers", - "url": "grpc-client-headers", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Set deadline", - "url": "grpc-client-set-deadline", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Has different naming convention", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "gRPC service security", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "grpc-service-ssl-tls", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Mutual SSL", - "url": "grpc-service-mutual-ssl", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication file user store", - "url": "grpc-service-basic-auth-file-user-store", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication LDAP user store", - "url": "grpc-service-basic-auth-ldap-user-store", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "JWT authentication", - "url": "grpc-service-jwt-auth", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "OAuth2", - "url": "grpc-service-oauth2", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "gRPC client security", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "grpc-client-ssl-tls", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Mutual SSL", - "url": "grpc-client-mutual-ssl", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication", - "url": "grpc-client-basic-auth", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Bearer token authentication", - "url": "grpc-client-bearer-token-auth", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Self-signed JWT authentication", - "url": "grpc-client-self-signed-jwt-auth", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "OAuth2 client credentials grant type", - "url": "grpc-client-oauth2-client-credentials-grant-type", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "OAuth2 password grant type", - "url": "grpc-client-oauth2-password-grant-type", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "OAuth2 refresh token grant type", - "url": "grpc-client-oauth2-refresh-token-grant-type", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "OAuth2 JWT bearer grant type", - "url": "grpc-client-oauth2-jwt-bearer-grant-type", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "NATS service", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "Consume message", - "url": "nats-basic-sub", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Send reply to request message", - "url": "nats-basic-reply", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Constraint validations", - "url": "nats-service-constraint-validation", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Consume JetStream message", - "url": "nats-jetstream-sub", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "NATS client", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "Publish message", - "url": "nats-basic-pub", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Send request message", - "url": "nats-basic-request", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Publish message", - "url": "nats-jetstream-pub", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "NATS service security", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "nats-service-secure-connection", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication", - "url": "nats-service-basic-auth", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "NATS client security", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "nats-client-secure-connection", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication", - "url": "nats-client-basic-auth", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Kafka service", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "Consume message", - "url": "kafka-service-consume-message", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Constraint validation", - "url": "kafka-service-constraint-validation", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Error handling", - "url": "kafka-service-error-handling", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Kafka producer", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "Produce message", - "url": "kafka-producer-produce-message", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Kafka consumer", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "Payload data binding", - "url": "kafka-consumer-payload-data-binding", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Consumer record data binding", - "url": "kafka-consumer-consumer-record-data-binding", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Constraint validation", - "url": "kafka-consumer-constraint-validation", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Kafka service security", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "kafka-service-ssl", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "SASL authentication", - "url": "kafka-service-sasl", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Kafka producer security", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "kafka-producer-ssl", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "SASL authentication", - "url": "kafka-producer-sasl", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Kafka consumer security", - "column": 2, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "kafka-consumer-ssl", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "SASL authentication", - "url": "kafka-consumer-sasl", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "RabbitMQ service", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "Consume message", - "url": "rabbitmq-consumer", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Consume message with acknowledgement", - "url": "rabbitmq-consumer-with-client-acknowledgement", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Transactional consumer", - "url": "rabbitmq-transaction-consumer", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Constraint validation", - "url": "rabbitmq-service-constraint-validation", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "RabbitMQ client", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "Declare a queue", - "url": "rabbitmq-queue-declare", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Produce message", - "url": "rabbitmq-producer", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Consume message", - "url": "rabbitmq-sync-consumer", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Transactional producer", - "url": "rabbitmq-transaction-producer", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Constraint validation", - "url": "rabbitmq-client-constraint-validation", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "RabbitMQ service security", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "rabbitmq-service-secure-connection", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication", - "url": "rabbitmq-service-basic-auth", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "RabbitMQ client security", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "rabbitmq-client-secure-connection", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Basic authentication", - "url": "rabbitmq-client-basic-auth", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "TCP service", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "Send/Receive bytes", - "url": "tcp-listener", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Service cannot be stopped", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "TCP client", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "Send/Receive bytes", - "url": "tcp-client", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Service not present", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "TCP service security", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "tcp-service-ssl-tls", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "TCP client security", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "tcp-client-ssl-tls", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "UDP service", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "Send/Receive datagram", - "url": "udp-listener", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Service cannot be stopped", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "UDP client", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "Send/Receive datagram", - "url": "udp-client", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Service cannot be reached", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Send/Receive datagram with connection", - "url": "udp-connect-client", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Service cannot be reached", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Email service", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "Receive email", - "url": "receive-email-using-service", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Email client", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "Send email", - "url": "send-email", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Receive email", - "url": "receive-email-using-client", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Email service security", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "email-service-ssl-tls", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Email client security", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "SSL/TLS", - "url": "email-client-ssl-tls", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "FTP Service", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "Receive file", - "url": "ftp-service-receive-file", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Send file", - "url": "ftp-service-send-file", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "FTP client", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "Receive file", - "url": "ftp-client-receive-file", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Send file", - "url": "ftp-client-send-file", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "SFTP Service", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "Receive file", - "url": "sftp-service-receive-file", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Send file", - "url": "sftp-service-send-file", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "SFTP client", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "Receive file", - "url": "sftp-client-receive-file", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Send file", - "url": "sftp-client-send-file", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Database access", - "column": 3, - "category": "Network libraries", - "samples": [ - { - "name": "Simple query", - "url": "mysql-query-operation", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Query with one result", - "url": "mysql-query-row-operation", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Query with advanced mapping", - "url": "mysql-query-column-mapping", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "DML and DDL operations", - "url": "mysql-execute-operation", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Batch execution", - "url": "mysql-batch-execute-operation", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Atomic transactions", - "url": "mysql-atomic-transaction", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Call stored procedures", - "url": "mysql-call-stored-procedures", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "IO", - "column": 0, - "category": "Common libraries", - "samples": [ - { - "name": "Read/write bytes", - "url": "io-bytes", - "verifyBuild": true, - "verifyOutput": true, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Read/write strings", - "url": "io-strings", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - }, - { - "name": "Read/write CSV", - "url": "io-csv", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - }, - { - "name": "Read/write CSV with data mapping", - "url": "io-csv-datamapping", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - }, - { - "name": "Read/write JSON", - "url": "io-json", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - }, - { - "name": "Read/write XML", - "url": "io-xml", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Security", - "column": 0, - "category": "Common libraries", - "samples": [ - { - "name": "Cryptographic operations", - "url": "security-crypto", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "JWT issue/validate", - "url": "security-jwt-issue-validate", - "verifyBuild": true, - "verifyOutput": false, - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "URL", - "column": 0, - "category": "Common libraries", - "samples": [ - { - "name": "URL encode/decode operations", - "url": "url-encode-decode", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Time", - "column": 1, - "category": "Common libraries", - "samples": [ - { - "name": "UTC time", - "url": "time-utc", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "isLearnByExample": false - }, - { - "name": "Time with zone offset", - "url": "time-utc-and-civil", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "isLearnByExample": false - }, - { - "name": "Time formatting/parsing", - "url": "time-formatting-and-parsing", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Cache", - "column": 1, - "category": "Common libraries", - "samples": [ - { - "name": "Cache basics", - "url": "cache-basics", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - }, - { - "name": "Cache invalidation", - "url": "cache-invalidation", - "verifyBuild": true, - "verifyOutput": true, - "disableVerificationReason": "Intermittently failing with github api rate limiting", - "isLearnByExample": false - } - ] - }, - { - "title": "Log", - "column": 1, - "category": "Common libraries", - "samples": [ - { - "name": "Logging", - "url": "logging", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "isLearnByExample": false - }, - { - "name": "Logging with context", - "url": "logging-with-context", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "isLearnByExample": false - }, - { - "name": "Configure logging", - "url": "logging-configuration", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "EDI", - "column": 1, - "category": "Common libraries", - "samples": [ - { - "name": "EDI to record conversion", - "url": "edi-to-record", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes generated code", - "isLearnByExample": false - }, - { - "name": "Record to EDI conversion", - "url": "record-to-edi", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes generated code", - "isLearnByExample": false - } - ] - }, - { - "title": "File", - "column": 2, - "category": "Common libraries", - "samples": [ - { - "name": "File paths", - "url": "filepaths", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "isLearnByExample": false - }, - { - "name": "Directories", - "url": "directories", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "isLearnByExample": false - }, - { - "name": "Files", - "url": "files", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "isLearnByExample": false - }, - { - "name": "Temp files and directories", - "url": "temp-files-directories", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "isLearnByExample": false - }, - { - "name": "Directory listener", - "url": "directory-listener", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Needs prerequisite condition", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Random", - "column": 2, - "category": "Common libraries", - "samples": [ - { - "name": "Random numbers", - "url": "random-numbers", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "isLearnByExample": false - } - ] - }, - { - "title": "Task", - "column": 2, - "category": "Common libraries", - "samples": [ - { - "name": "Schedule job recurrence by frequency", - "url": "task-frequency-job-execution", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - }, - { - "name": "Schedule one time job", - "url": "task-one-time-job-execution", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - }, - { - "name": "Manage scheduled jobs", - "url": "manage-scheduled-jobs", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - } - ] - }, - { - "title": "UUID", - "column": 3, - "category": "Common libraries", - "samples": [ - { - "name": "Generate UUID", - "url": "uuid-generation", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "isLearnByExample": false - }, - { - "name": "UUID operations", - "url": "uuid-operations", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - } - ] - }, - { - "title": "XSLT", - "column": 3, - "category": "Common libraries", - "samples": [ - { - "name": "XSLT transformation", - "url": "xslt-transformation", - "verifyBuild": true, - "verifyOutput": false, - "isLearnByExample": false - } - ] - }, - { - "title": "Regex", - "column": 3, - "category": "Common libraries", - "samples": [ - { - "name": "Regular expressions", - "url": "regular-expressions", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - } - ] - }, - { - "title": "OS", - "column": 3, - "category": "Common libraries", - "samples": [ - { - "name": "Environment variables", - "url": "environment-variables", - "verifyBuild": true, - "verifyOutput": false, - "disableVerificationReason": "Includes varying output", - "isLearnByExample": false - } - ] - }, - { - "title": "XML data", - "column": 3, - "category": "Common libraries", - "samples": [ - { - "name": "XML to JSON conversion", - "url": "xml-to-json-conversion", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - }, - { - "name": "JSON to XML conversion", - "url": "xml-from-json-conversion", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - }, - { - "name": "XML to record conversion", - "url": "xml-to-record-conversion", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - }, - { - "name": "Record to XML conversion", - "url": "xml-from-record-conversion", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Constraint", - "column": 3, - "category": "Common libraries", - "samples": [ - { - "name": "Constraint validations", - "url": "constraint-validations", - "verifyBuild": true, - "verifyOutput": true, - "isLearnByExample": false - } - ] - }, { "title": "Docker", "column": 0, @@ -4522,46 +202,5 @@ "isLearnByExample": false } ] - }, - { - "title": "Tracing", - "column": 0, - "category": "Observability", - "samples": [ - { - "name": "Distributed tracing", - "url": "tracing", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - }, - { - "name": "Counter-based metrics", - "url": "counter-metrics", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] - }, - { - "title": "Metrics", - "column": 1, - "category": "Observability", - "samples": [ - { - "name": "Gauge-based metrics", - "url": "gauge-metrics", - "verifyBuild": false, - "verifyOutput": false, - "disableVerificationReason": "Includes ballerinax components", - "disablePlayground": true, - "isLearnByExample": false - } - ] } ] From af7f7132661270378c01df613b57a5e6143bca58 Mon Sep 17 00:00:00 2001 From: praneesha Date: Mon, 17 Jul 2023 14:59:05 +0530 Subject: [PATCH 78/94] Remove index.json commit --- examples/index.json | 4363 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 4362 insertions(+), 1 deletion(-) diff --git a/examples/index.json b/examples/index.json index ad9f22b371..b04cf7af5d 100644 --- a/examples/index.json +++ b/examples/index.json @@ -1,4 +1,4324 @@ [ + { + "title": "Hello World", + "column": 0, + "category": "Language concepts", + "samples": [ + { + "name": "Hello world main", + "url": "hello-world", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Hello world service", + "url": "hello-world-service", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Basics", + "column": 0, + "category": "Language concepts", + "samples": [ + { + "name": "Programs and modules", + "url": "programs-and-modules", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Main function", + "url": "main-function", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": true + }, + { + "name": "Init function", + "url": "init-function", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Variables and types", + "url": "variables-and-types", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Identifiers", + "url": "identifiers", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Simple basic types", + "column": 0, + "category": "Language concepts", + "samples": [ + { + "name": "Integers", + "url": "integers", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Floating point numbers", + "url": "floating-point-numbers", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Decimal type", + "url": "decimal-type", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Nil", + "url": "nil", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Boolean", + "url": "boolean", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Strings", + "column": 0, + "category": "Language concepts", + "samples": [ + { + "name": "Strings", + "url": "strings", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Conditional statements", + "column": 0, + "category": "Language concepts", + "samples": [ + { + "name": "If statement", + "url": "if-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Match statement", + "url": "match-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Match guard in match statement", + "url": "match-guard-in-match-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Binding patterns in match statement", + "url": "binding-patterns-in-match-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Functions", + "column": 0, + "category": "Language concepts", + "samples": [ + { + "name": "Functions", + "url": "functions", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Included record parameters", + "url": "included-record-parameters", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Rest parameters", + "url": "rest-parameters", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Default values for function parameters", + "url": "default-values-for-function-parameters", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Provide function arguments by name", + "url": "provide-function-arguments-by-name", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Function pointers", + "url": "function-pointers", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Function values", + "url": "function-values", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Function types", + "url": "function-types", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Anonymous function", + "url": "anonymous-function", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Function closure", + "url": "function-closure", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Iteration", + "column": 0, + "category": "Language concepts", + "samples": [ + { + "name": "Foreach statement", + "url": "foreach-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "While statement", + "url": "while-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Break statement", + "url": "break-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Continue statement", + "url": "continue-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Range function", + "url": "int-range", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Lang library", + "column": 0, + "category": "Language concepts", + "samples": [ + { + "name": "Langlib functions", + "url": "langlib-functions", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Types and typing", + "column": 0, + "category": "Language concepts", + "samples": [ + { + "name": "Structural typing", + "url": "structural-typing", + "verifyBuild": true, + "verifyOutput": true, + "disablePlayground": true, + "isLearnByExample": true + }, + { + "name": "Unions", + "url": "unions", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Errors", + "url": "error-reporting", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Anydata type", + "url": "anydata-type", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Any type", + "url": "any-type", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Type definitions", + "url": "type-definitions", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Typedesc type", + "url": "typedesc-type", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Covariance", + "url": "covariance", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Type inference", + "url": "type-inference", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Built-in integer subtypes", + "url": "built-in-integer-subtypes", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Built-in string subtype", + "url": "built-in-string-subtype", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "ensureType function", + "url": "ensureType-function", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Dependent types", + "url": "dependent-types", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Stream type", + "url": "stream-type", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Never type", + "url": "never-type", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Expression-oriented style", + "column": 0, + "category": "Language concepts", + "samples": [ + { + "name": "Expression-oriented style", + "url": "expression-oriented-style", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Lists", + "column": 1, + "category": "Language concepts", + "samples": [ + { + "name": "Arrays", + "url": "arrays", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Nested arrays", + "url": "nested-arrays", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Tuples", + "url": "tuples", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Rest type in tuples", + "url": "rest-type-in-tuples", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Filler values of a list", + "url": "filler-values-of-a-list", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "List subtyping", + "url": "list-subtyping", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": true + }, + { + "name": "List equality", + "url": "list-equality", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Binary data", + "url": "binary-data", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Mappings", + "column": 1, + "category": "Language concepts", + "samples": [ + { + "name": "Maps", + "url": "maps", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Records", + "url": "records", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Computed field key", + "url": "computed-field-key", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Records", + "column": 1, + "category": "Language concepts", + "samples": [ + { + "name": "Optional fields", + "url": "optional-fields", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Open records", + "url": "open-records", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Controlling openness", + "url": "controlling-openness", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Type inclusion for records", + "url": "type-inclusion-for-records", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Default values for record fields", + "url": "default-values-for-record-fields", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Array/Map symmetry", + "column": 1, + "category": "Language concepts", + "samples": [ + { + "name": "Array/Map symmetry", + "url": "array-map-symmetry", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Objects", + "column": 1, + "category": "Language concepts", + "samples": [ + { + "name": "Object", + "url": "object", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Defining classes", + "url": "defining-classes", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Object constructor", + "url": "object-constructor", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Object value from class definition", + "url": "object-value-from-class-definition", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Visibility of object fields and methods", + "url": "visibility-of-object-fields-and-methods", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Init return type", + "url": "init-return-type", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Object types", + "url": "object-types", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Object type inclusion", + "url": "object-type-inclusion", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Distinct object types", + "url": "distinct-object-types", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Object closure", + "url": "object-closure", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Client class", + "url": "client-class", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Start service from service class definition", + "url": "start-service-from-service-class-definition", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Binding patterns", + "column": 1, + "category": "Language concepts", + "samples": [ + { + "name": "Binding patterns", + "url": "binding-patterns", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Typed binding pattern", + "url": "typed-binding-pattern", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Wildcard binding pattern", + "url": "wildcard-binding-pattern", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "List binding patterns", + "url": "list-binding-pattern", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Rest binding pattern in list binding pattern", + "url": "rest-binding-pattern-in-list-binding-pattern", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Mapping binding pattern", + "url": "mapping-binding-pattern", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Rest binding pattern in mapping binding pattern", + "url": "rest-binding-pattern-in-mapping-binding-pattern", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Error binding pattern", + "url": "error-binding-pattern", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Rest binding pattern in error binding pattern", + "url": "rest-binding-pattern-in-error-binding-pattern", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Single use of typed binding patterns", + "url": "single-use-of-typed-binding", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Single use of typed binding patterns with on fail clause", + "url": "single-use-with-on-fail-clause", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Iterative use of typed binding patterns", + "url": "iterative-use-of-typed-binding", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "List binding pattern in match statement", + "url": "list-binding-pattern-in-match-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Mapping binding pattern in match statement", + "url": "mapping-binding-pattern-in-match-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Error binding pattern in match statement", + "url": "error-binding-pattern-in-match-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Regular Expressions", + "column": 1, + "category": "Language concepts", + "samples": [ + { + "name": "RegExp type", + "url": "regexp-type", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "RegExp operations", + "url": "regexp-operations", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Tables", + "column": 2, + "category": "Language concepts", + "samples": [ + { + "name": "Table", + "url": "table", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Table types", + "url": "table-types", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Multiple key fields", + "url": "multiple-key-fields", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Structured keys", + "url": "structured-keys", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Query expressions", + "column": 2, + "category": "Language concepts", + "samples": [ + { + "name": "Query expressions", + "url": "query-expressions", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Sort iterable objects", + "url": "sort-iterable-objects", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Let clause", + "url": "let-clause", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Limit clause", + "url": "limit-clause", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Join iterable objects", + "url": "joining-iterable-objects", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Outer Join clause", + "url": "outer-join-clause", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Query tables", + "url": "querying-tables", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Create tables with a query", + "url": "create-tables-with-query", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Create maps with a query", + "url": "create-maps-with-query", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Create streams with a query", + "url": "create-streams-with-query", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "On conflict clause", + "url": "on-conflict-clause", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Iterate over XML with a query", + "url": "iterating-over-xml-with-query", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Nested query expressions", + "url": "nested-query-expressions", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Destructure records using a query", + "url": "destructure-records-using-query", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Querying streams", + "url": "querying-with-streams", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Aggregation", + "url": "aggregation", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Query actions", + "column": 2, + "category": "Language concepts", + "samples": [ + { + "name": "Query actions", + "url": "query-actions", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": true + } + ] + }, + { + "title": "JSON", + "column": 2, + "category": "Language concepts", + "samples": [ + { + "name": "JSON type", + "url": "json-type", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Access JSON elements", + "url": "access-json-elements", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Access optional JSON elements", + "url": "access-optional-json-elements", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Match statement with maps", + "url": "match-statement-with-maps", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Convert from user-defined type to JSON", + "url": "converting-from-user-defined-type-to-json", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Convert from table and XML to JSON", + "url": "converting-from-table-and-xml-to-json", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Convert from JSON to user-defined type", + "url": "convert-from-json-to-user-defined-type", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Cast JSON to user-defined type", + "url": "casting-json-to-user-defined-type", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Resource method typing", + "url": "resource-method-typing", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": true + }, + { + "name": "JSON numbers", + "url": "json-numbers", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Backtick templates", + "column": 2, + "category": "Language concepts", + "samples": [ + { + "name": "Raw templates", + "url": "raw-templates", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": true + }, + { + "name": "Backtick templates", + "url": "backtick-templates", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "XML templates", + "url": "xml-templates", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "XML", + "column": 2, + "category": "Language concepts", + "samples": [ + { + "name": "XML data model", + "url": "xml-data-model", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "XML operations", + "url": "xml-operations", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "XML iteration", + "url": "xml-iteration", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "XML access", + "url": "xml-access", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "XML mutation", + "url": "xml-mutation", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "XML subtyping", + "url": "xml-subtyping", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "XML navigation ", + "url": "xml-navigation", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "XML templates and query", + "url": "xml-templates-and-query", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "XML namespaces", + "url": "xml-namespaces", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "XMLNS declarations", + "url": "xmlns-declarations", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Metadata", + "column": 2, + "category": "Language concepts", + "samples": [ + { + "name": "Documentation", + "url": "documentation", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Annotations", + "url": "annotations", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Network interaction", + "column": 2, + "category": "Language concepts", + "samples": [ + { + "name": "Consume services: client objects", + "url": "consuming-services", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Failing intermittently due to GitHub rate limiting", + "isLearnByExample": true + }, + { + "name": "Provide services", + "url": "providing-services", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Service cannot be stopped", + "disablePlayground": true, + "isLearnByExample": true + }, + { + "name": "Module lifecycle", + "url": "module-lifecycle", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Service declaration", + "url": "service-declaration", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Does not include udp client", + "disablePlayground": true, + "isLearnByExample": true + }, + { + "name": "Resource methods", + "url": "resource-methods", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": true + }, + { + "name": "Hierarchical resources", + "url": "hierarchical-resources", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": true + }, + { + "name": "Resource path parameters", + "url": "resource-path-parameters", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Configurability", + "column": 2, + "category": "Language concepts", + "samples": [ + { + "name": "Configurable variables", + "url": "configurable-variables", + "verifyBuild": true, + "verifyOutput": true, + "disablePlayground": true, + "isLearnByExample": true + }, + { + "name": "Configure via TOML files", + "url": "configuring-via-toml", + "verifyBuild": true, + "verifyOutput": true, + "disablePlayground": true, + "isLearnByExample": true + }, + { + "name": "Configure via CLI arguments", + "url": "configuring-via-cli", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "disablePlayground": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Error handling", + "column": 3, + "category": "Language concepts", + "samples": [ + { + "name": "Error handling", + "url": "error-handling", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Check expression", + "url": "check-expression", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Error subtyping", + "url": "error-subtyping", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Panics", + "url": "panics", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Type intersection for error types", + "url": "error-type-intersection", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Error detail", + "url": "error-detail", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Error cause", + "url": "error-cause", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Ignore return values and errors", + "column": 3, + "category": "Language concepts", + "samples": [ + { + "name": "Ignore return values and errors", + "url": "ignoring-return-values-and-errors", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Mutability and identity", + "column": 3, + "category": "Language concepts", + "samples": [ + { + "name": "Identity", + "url": "identity", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Const and final ", + "url": "const-and-final", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Enumerations", + "url": "enumerations", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Immutability", + "url": "immutability", + "verifyBuild": true, + "verifyOutput": true, + "disablePlayground": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Concurrency", + "column": 3, + "category": "Language concepts", + "samples": [ + { + "name": "Asynchronous function calls", + "url": "asynchronous-function-calls", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Named workers", + "url": "named-workers", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Sequence diagrams", + "url": "sequence-diagrams", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Wait for workers", + "url": "waiting-for-workers", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Strands", + "url": "strands", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": true + }, + { + "name": "Named worker return values", + "url": "named-worker-return-values", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Alternate wait", + "url": "alternate-wait", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "isLearnByExample": true + }, + { + "name": "Multiple wait", + "url": "multiple-wait", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Named workers and futures", + "url": "named-workers-and-futures", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Inter-worker message passing", + "url": "inter-worker-message-passing", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Inter-worker failure propagation", + "url": "inter-worker-failure-propagation", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Synchronize message passing", + "url": "synchronize-message-passing", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Asynchronize message passing", + "url": "asynchronize-message-passing", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Flush", + "url": "flush", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Transactions", + "column": 3, + "category": "Language concepts", + "samples": [ + { + "name": "Transaction statement", + "url": "transaction-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Check semantics", + "url": "check-semantics", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Rollback", + "url": "rollback", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Retry transaction statement", + "url": "retry-transaction-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Transactional qualifier", + "url": "transactional-qualifier", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Transactional named workers", + "url": "transactional-named-workers", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Commit/rollback handlers", + "url": "commit-rollback-handlers", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Concurrency safety", + "column": 3, + "category": "Language concepts", + "samples": [ + { + "name": "Lock statement", + "url": "lock-statement", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Isolated functions", + "url": "isolated-functions", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Readonly type", + "url": "readonly-type", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Readonly and isolated", + "url": "readonly-and-isolated", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Readonly objects and classes", + "url": "readonly-objects-and-classes", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Combining isolated functions and lock", + "url": "combining-isolated-functions-and-lock", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Isolated variables", + "url": "isolated-variables", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Isolated methods", + "url": "isolated-methods", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Isolated objects", + "url": "isolated-objects", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Inferring isolated", + "url": "inferring-isolated", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + }, + { + "name": "Run strands safely on separate threads", + "url": "run-strands-safely-on-separate-threads", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Interface to external code", + "column": 3, + "category": "Language concepts", + "samples": [ + { + "name": "Interface to external code", + "url": "interface-to-external-code", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": true + } + ] + }, + { + "title": "Testing", + "column": 3, + "category": "Language concepts", + "samples": [ + { + "name": "Assertions", + "url": "testerina-assertions", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Before and after test", + "url": "testerina-before-and-after-test", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Before and after each", + "url": "testerina-before-and-after-each", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Before and after groups", + "url": "testerina-before-and-after-groups", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Before and after suite", + "url": "testerina-before-and-after-suite", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Data-driven tests", + "url": "testerina-data-driven-tests", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Guarantee test execution order", + "url": "testerina-guarantee-test-execution-order", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Group tests", + "url": "testerina-group-tests", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Function mocking", + "url": "testerina-mocking-functions", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Object mocking", + "url": "testerina-mocking-objects", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "REST service", + "column": 0, + "category": "Network libraries", + "samples": [ + { + "name": "Basic REST service", + "url": "http-basic-rest-service", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Service and resource paths", + "url": "http-service-and-resource-paths", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Payload data binding", + "url": "http-service-data-binding", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Payload constraint validation", + "url": "http-service-payload-constraint-validation", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Path parameter", + "url": "http-path-param", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Query parameter", + "url": "http-query-parameter", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Header parameter", + "url": "http-header-param", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Send response", + "url": "http-send-response", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Send different status codes", + "url": "http-send-different-status-codes", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Send different status codes with payload", + "url": "http-send-different-status-codes-with-payload", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Error handling", + "url": "http-default-error-handling", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Send cache response", + "url": "http-service-cache-response", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + } + ] + }, + { + "title": "HTTP client", + "column": 0, + "category": "Network libraries", + "samples": [ + { + "name": "Send request/Receive response", + "url": "http-client-send-request-receive-response", + "verifyBuild": false, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Payload data binding", + "url": "http-client-data-binding", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Payload constraint validation", + "url": "http-client-payload-constraint-validation", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Path parameter", + "url": "http-client-path-parameter", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Query parameter", + "url": "http-client-query-parameter", + "verifyBuild": false, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Header parameter", + "url": "http-client-header-parameter", + "verifyBuild": false, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Enable caching", + "url": "http-caching-client", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + } + ] + }, + { + "title": "REST service security", + "column": 0, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "http-service-ssl-tls", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Mutual SSL", + "url": "http-service-mutual-ssl", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication file user store", + "url": "http-service-basic-authentication-file-user-store", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication LDAP user store", + "url": "http-service-basic-authentication-ldap-user-store", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "JWT authentication", + "url": "http-service-jwt-authentication", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "OAuth2", + "url": "http-service-oauth2", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "HTTP client security", + "column": 0, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "http-client-ssl-tls", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Mutual SSL", + "url": "http-client-mutual-ssl", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Basic authentication", + "url": "http-client-basic-authentication", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Bearer token authentication", + "url": "http-client-bearer-token-authentication", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Self-signed JWT authentication", + "url": "http-client-self-signed-jwt-authentication", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "OAuth2 client credentials grant type", + "url": "http-client-oauth2-client-credentials-grant-type", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "OAuth2 password grant type", + "url": "http-client-oauth2-password-grant-type", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "OAuth2 refresh token grant type", + "url": "http-client-oauth2-refresh-token-grant-type", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "OAuth2 JWT bearer grant type", + "url": "http-client-oauth2-jwt-bearer-grant-type", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + } + ] + }, + { + "title": "HTTP client resiliency", + "column": 0, + "category": "Network libraries", + "samples": [ + { + "name": "Timeout", + "url": "http-timeout", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Retry", + "url": "http-retry", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Circuit breaker", + "url": "http-circuit-breaker", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Load balancer", + "url": "http-load-balancer", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Failover", + "url": "http-failover", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + } + ] + }, + { + "title": "HTTP service advanced", + "column": 0, + "category": "Network libraries", + "samples": [ + { + "name": "Default resource", + "url": "http-default-resource", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Request/Response object", + "url": "http-request-response", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Caller object", + "url": "http-caller", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Redirects", + "url": "http-service-redirects", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "CORS", + "url": "http-cors", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "100 continue", + "url": "http-100-continue", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Matrix parameter", + "url": "http-matrix-param", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Restrict by media type", + "url": "http-restrict-by-media-type", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "File upload", + "url": "http-service-file-upload", + "verifyBuild": false, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Compression", + "url": "http-compression", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Trace logs", + "url": "http-trace-logs", + "verifyBuild": false, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Access logs", + "url": "http-access-logs", + "verifyBuild": false, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Cookies", + "url": "http-cookies-service", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Chunking", + "url": "http-service-chunking", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Sending headers", + "url": "http-send-header", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Response with multiparts", + "url": "http-response-with-multiparts", + "verifyBuild": false, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Passthrough", + "url": "http-passthrough", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "HTTP/2 to HTTP/1.1 downgrade", + "url": "http-2-to-1-1-downgrade-service", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "HTTP/2 server push", + "url": "http-2-0-server-push", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + } + ] + }, + { + "title": "HTTP client advanced", + "column": 0, + "category": "Network libraries", + "samples": [ + { + "name": "Redirects", + "url": "http-client-redirects", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "File upload", + "url": "http-client-file-upload", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Cookies", + "url": "http-cookies-client", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Chunking", + "url": "http-client-chunking", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "Request with multiparts", + "url": "http-request-with-multiparts", + "verifyBuild": false, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "HTTP/2 to HTTP/1.1 downgrade", + "url": "http-2-to-1-1-downgrade-client", + "verifyBuild": false, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "HTTP/2 prior knowledge", + "url": "http-2-prior-knowledge-client", + "verifyBuild": false, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + }, + { + "name": "HTTP/2 server push", + "url": "http-2-0-client-server-push", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": false, + "isLearnByExample": false + } + ] + }, + { + "title": "HTTP service interceptors", + "column": 1, + "category": "Network libraries", + "samples": [ + { + "name": "Request interceptor", + "url": "http-request-interceptor", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Response interceptor", + "url": "http-response-interceptor", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Error handling", + "url": "http-error-handling", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + }, + { + "name": "Interceptor error handling", + "url": "http-interceptor-error-handling", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + } + ] + }, + { + "title": "GraphQL service", + "column": 1, + "category": "Network libraries", + "samples": [ + { + "name": "Hello world", + "url": "graphql-hello-world", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Service as output object", + "url": "graphql-returning-service-objects", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Record as output object", + "url": "graphql-returning-record-values", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Input types", + "url": "graphql-input-types", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Mutations", + "url": "graphql-mutations", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Subscriptions", + "url": "graphql-subscriptions", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Input objects", + "url": "graphql-input-objects", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Interfaces", + "url": "graphql-interfaces", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Interfaces implementing interfaces", + "url": "graphql-interfaces-implementing-interfaces", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Union types", + "url": "graphql-service-union-types", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Error handling", + "url": "graphql-service-error-handling", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "GraphiQL client", + "url": "graphql-graphiql", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Documentation", + "url": "graphql-documentation", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Directives", + "url": "graphql-directives", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Context object", + "url": "graphql-context", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Field object", + "url": "graphql-service-field-object", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Service interceptors", + "url": "graphql-service-interceptors", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Field interceptors", + "url": "graphql-field-interceptors", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Interceptor configurations", + "url": "graphql-interceptor-configurations", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Input constraint validation", + "url": "graphql-input-constraint-validation", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "File upload", + "url": "graphql-file-upload", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Hierarchical resource paths", + "url": "graphql-hierarchical-resource-paths", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "GraphQL client", + "column": 1, + "category": "Network libraries", + "samples": [ + { + "name": "Query GraphQL endpoint", + "url": "graphql-client-query-endpoint", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Handle partial response", + "url": "graphql-client-handle-partial-response", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Handle error response", + "url": "graphql-client-error-handling", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "GraphQL service security", + "column": 1, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "graphql-service-ssl-tls", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Mutual SSL", + "url": "graphql-service-mutual-ssl", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication file user store", + "url": "graphql-service-basic-auth-file-user-store", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication LDAP user store", + "url": "graphql-service-basic-auth-ldap-user-store", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "JWT authentication", + "url": "graphql-service-jwt-auth", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "OAuth2", + "url": "graphql-service-oauth2", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "GraphQL client security", + "column": 1, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "graphql-client-security-ssl-tls", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Mutual SSL", + "url": "graphql-client-security-mutual-ssl", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication", + "url": "graphql-client-security-basic-auth", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Self-signed JWT authentication", + "url": "graphql-client-security-self-signed-jwt-authentication", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "OAuth2 password grant type", + "url": "graphql-client-security-oauth2-password-grant-type", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "WebSocket service", + "column": 1, + "category": "Network libraries", + "samples": [ + { + "name": "Send/Receive message", + "url": "websocket-basic-sample", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Service cannot be stopped", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Payload constraint validation", + "url": "websocket-service-payload-constraint-validation", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Service cannot be stopped", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Error handling", + "url": "websocket-service-error-handling", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Service cannot be stopped", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "WebSocket client", + "column": 1, + "category": "Network libraries", + "samples": [ + { + "name": "Send/Receive message", + "url": "websocket-client", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Payload constraint validation", + "url": "websocket-client-payload-constraint-validation", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "WebSocket service security", + "column": 1, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "websocket-service-ssl-tls", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Mutual SSL", + "url": "websocket-service-mutual-ssl", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication file user store", + "url": "websocket-service-basic-auth-file-user-store", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication LDAP user store", + "url": "websocket-service-basic-auth-ldap-user-store", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "JWT authentication", + "url": "websocket-service-jwt-auth", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "OAuth2", + "url": "websocket-service-oauth2", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "WebSocket client security", + "column": 1, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "websocket-client-ssl-tls", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Mutual SSL", + "url": "websocket-client-mutual-ssl", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication", + "url": "websocket-client-basic-auth", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Bearer token authentication", + "url": "websocket-client-bearer-token-auth", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Self-signed JWT authentication", + "url": "websocket-client-self-signed-jwt-auth", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "OAuth2 client credentials grant type", + "url": "websocket-client-oauth2-client-cred-grant-type", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "OAuth2 password grant type", + "url": "websocket-client-oauth2-password-grant-type", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "OAuth2 refresh token grant type", + "url": "websocket-client-oauth2-refresh-token-grant-type", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "OAuth2 JWT bearer grant type", + "url": "websocket-client-oauth2-jwt-bearer-grant-type", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "WebSocket client resiliency", + "column": 1, + "category": "Network libraries", + "samples": [ + { + "name": "Timeout", + "url": "websocket-timeout-client", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Retry", + "url": "websocket-retry-client", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "WebSub service", + "column": 1, + "category": "Network libraries", + "samples": [ + { + "name": "Consume github events", + "url": "websub-webhook-sample", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Listeners and StopHandlers", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "Dynamic listener", + "url": "dynamic-listener", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "StopHandler", + "url": "stop-handler", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "gRPC service", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "Simple RPC", + "url": "grpc-service-simple", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Server-side streaming RPC", + "url": "grpc-service-server-streaming", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Client-side streaming RPC", + "url": "grpc-service-client-streaming", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Bidirectional streaming RPC", + "url": "grpc-service-bidirectional-streaming", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Send/Receive headers", + "url": "grpc-service-headers", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Server reflection", + "url": "grpc-server-reflection", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Check deadline", + "url": "grpc-service-check-deadline", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "gRPC client", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "Simple RPC", + "url": "grpc-client-simple", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Server-side streaming RPC", + "url": "grpc-client-server-streaming", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Client-side streaming RPC", + "url": "grpc-client-client-streaming", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Bidirectional streaming RPC", + "url": "grpc-client-bidirectional-streaming", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Send/Receive headers", + "url": "grpc-client-headers", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Set deadline", + "url": "grpc-client-set-deadline", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Has different naming convention", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "gRPC service security", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "grpc-service-ssl-tls", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Mutual SSL", + "url": "grpc-service-mutual-ssl", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication file user store", + "url": "grpc-service-basic-auth-file-user-store", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication LDAP user store", + "url": "grpc-service-basic-auth-ldap-user-store", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "JWT authentication", + "url": "grpc-service-jwt-auth", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "OAuth2", + "url": "grpc-service-oauth2", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "gRPC client security", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "grpc-client-ssl-tls", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Mutual SSL", + "url": "grpc-client-mutual-ssl", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication", + "url": "grpc-client-basic-auth", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Bearer token authentication", + "url": "grpc-client-bearer-token-auth", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Self-signed JWT authentication", + "url": "grpc-client-self-signed-jwt-auth", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "OAuth2 client credentials grant type", + "url": "grpc-client-oauth2-client-credentials-grant-type", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "OAuth2 password grant type", + "url": "grpc-client-oauth2-password-grant-type", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "OAuth2 refresh token grant type", + "url": "grpc-client-oauth2-refresh-token-grant-type", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "OAuth2 JWT bearer grant type", + "url": "grpc-client-oauth2-jwt-bearer-grant-type", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "NATS service", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "Consume message", + "url": "nats-basic-sub", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Send reply to request message", + "url": "nats-basic-reply", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Constraint validations", + "url": "nats-service-constraint-validation", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Consume JetStream message", + "url": "nats-jetstream-sub", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "NATS client", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "Publish message", + "url": "nats-basic-pub", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Send request message", + "url": "nats-basic-request", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Publish message", + "url": "nats-jetstream-pub", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "NATS service security", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "nats-service-secure-connection", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication", + "url": "nats-service-basic-auth", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "NATS client security", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "nats-client-secure-connection", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication", + "url": "nats-client-basic-auth", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Kafka service", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "Consume message", + "url": "kafka-service-consume-message", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Constraint validation", + "url": "kafka-service-constraint-validation", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Error handling", + "url": "kafka-service-error-handling", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Kafka producer", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "Produce message", + "url": "kafka-producer-produce-message", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Kafka consumer", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "Payload data binding", + "url": "kafka-consumer-payload-data-binding", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Consumer record data binding", + "url": "kafka-consumer-consumer-record-data-binding", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Constraint validation", + "url": "kafka-consumer-constraint-validation", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Kafka service security", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "kafka-service-ssl", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "SASL authentication", + "url": "kafka-service-sasl", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Kafka producer security", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "kafka-producer-ssl", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "SASL authentication", + "url": "kafka-producer-sasl", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Kafka consumer security", + "column": 2, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "kafka-consumer-ssl", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "SASL authentication", + "url": "kafka-consumer-sasl", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "RabbitMQ service", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "Consume message", + "url": "rabbitmq-consumer", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Consume message with acknowledgement", + "url": "rabbitmq-consumer-with-client-acknowledgement", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Transactional consumer", + "url": "rabbitmq-transaction-consumer", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Constraint validation", + "url": "rabbitmq-service-constraint-validation", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "RabbitMQ client", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "Declare a queue", + "url": "rabbitmq-queue-declare", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Produce message", + "url": "rabbitmq-producer", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Consume message", + "url": "rabbitmq-sync-consumer", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Transactional producer", + "url": "rabbitmq-transaction-producer", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Constraint validation", + "url": "rabbitmq-client-constraint-validation", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "RabbitMQ service security", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "rabbitmq-service-secure-connection", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication", + "url": "rabbitmq-service-basic-auth", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "RabbitMQ client security", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "rabbitmq-client-secure-connection", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Basic authentication", + "url": "rabbitmq-client-basic-auth", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "TCP service", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "Send/Receive bytes", + "url": "tcp-listener", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Service cannot be stopped", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "TCP client", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "Send/Receive bytes", + "url": "tcp-client", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Service not present", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "TCP service security", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "tcp-service-ssl-tls", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "TCP client security", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "tcp-client-ssl-tls", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "UDP service", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "Send/Receive datagram", + "url": "udp-listener", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Service cannot be stopped", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "UDP client", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "Send/Receive datagram", + "url": "udp-client", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Service cannot be reached", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Send/Receive datagram with connection", + "url": "udp-connect-client", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Service cannot be reached", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Email service", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "Receive email", + "url": "receive-email-using-service", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Email client", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "Send email", + "url": "send-email", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Receive email", + "url": "receive-email-using-client", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Email service security", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "email-service-ssl-tls", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Email client security", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "SSL/TLS", + "url": "email-client-ssl-tls", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "FTP Service", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "Receive file", + "url": "ftp-service-receive-file", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Send file", + "url": "ftp-service-send-file", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "FTP client", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "Receive file", + "url": "ftp-client-receive-file", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Send file", + "url": "ftp-client-send-file", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "SFTP Service", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "Receive file", + "url": "sftp-service-receive-file", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Send file", + "url": "sftp-service-send-file", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "SFTP client", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "Receive file", + "url": "sftp-client-receive-file", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Send file", + "url": "sftp-client-send-file", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Database access", + "column": 3, + "category": "Network libraries", + "samples": [ + { + "name": "Simple query", + "url": "mysql-query-operation", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Query with one result", + "url": "mysql-query-row-operation", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Query with advanced mapping", + "url": "mysql-query-column-mapping", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "DML and DDL operations", + "url": "mysql-execute-operation", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Batch execution", + "url": "mysql-batch-execute-operation", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Atomic transactions", + "url": "mysql-atomic-transaction", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Call stored procedures", + "url": "mysql-call-stored-procedures", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "IO", + "column": 0, + "category": "Common libraries", + "samples": [ + { + "name": "Read/write bytes", + "url": "io-bytes", + "verifyBuild": true, + "verifyOutput": true, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Read/write strings", + "url": "io-strings", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + }, + { + "name": "Read/write CSV", + "url": "io-csv", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + }, + { + "name": "Read/write CSV with data mapping", + "url": "io-csv-datamapping", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + }, + { + "name": "Read/write JSON", + "url": "io-json", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + }, + { + "name": "Read/write XML", + "url": "io-xml", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Security", + "column": 0, + "category": "Common libraries", + "samples": [ + { + "name": "Cryptographic operations", + "url": "security-crypto", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "JWT issue/validate", + "url": "security-jwt-issue-validate", + "verifyBuild": true, + "verifyOutput": false, + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "URL", + "column": 0, + "category": "Common libraries", + "samples": [ + { + "name": "URL encode/decode operations", + "url": "url-encode-decode", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Time", + "column": 1, + "category": "Common libraries", + "samples": [ + { + "name": "UTC time", + "url": "time-utc", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "isLearnByExample": false + }, + { + "name": "Time with zone offset", + "url": "time-utc-and-civil", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "isLearnByExample": false + }, + { + "name": "Time formatting/parsing", + "url": "time-formatting-and-parsing", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Cache", + "column": 1, + "category": "Common libraries", + "samples": [ + { + "name": "Cache basics", + "url": "cache-basics", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + }, + { + "name": "Cache invalidation", + "url": "cache-invalidation", + "verifyBuild": true, + "verifyOutput": true, + "disableVerificationReason": "Intermittently failing with github api rate limiting", + "isLearnByExample": false + } + ] + }, + { + "title": "Log", + "column": 1, + "category": "Common libraries", + "samples": [ + { + "name": "Logging", + "url": "logging", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "isLearnByExample": false + }, + { + "name": "Logging with context", + "url": "logging-with-context", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "isLearnByExample": false + }, + { + "name": "Configure logging", + "url": "logging-configuration", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "EDI", + "column": 1, + "category": "Common libraries", + "samples": [ + { + "name": "EDI to record conversion", + "url": "edi-to-record", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes generated code", + "isLearnByExample": false + }, + { + "name": "Record to EDI conversion", + "url": "record-to-edi", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes generated code", + "isLearnByExample": false + } + ] + }, + { + "title": "File", + "column": 2, + "category": "Common libraries", + "samples": [ + { + "name": "File paths", + "url": "filepaths", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "isLearnByExample": false + }, + { + "name": "Directories", + "url": "directories", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "isLearnByExample": false + }, + { + "name": "Files", + "url": "files", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "isLearnByExample": false + }, + { + "name": "Temp files and directories", + "url": "temp-files-directories", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "isLearnByExample": false + }, + { + "name": "Directory listener", + "url": "directory-listener", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Needs prerequisite condition", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Random", + "column": 2, + "category": "Common libraries", + "samples": [ + { + "name": "Random numbers", + "url": "random-numbers", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "isLearnByExample": false + } + ] + }, + { + "title": "Task", + "column": 2, + "category": "Common libraries", + "samples": [ + { + "name": "Schedule job recurrence by frequency", + "url": "task-frequency-job-execution", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + }, + { + "name": "Schedule one time job", + "url": "task-one-time-job-execution", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + }, + { + "name": "Manage scheduled jobs", + "url": "manage-scheduled-jobs", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + } + ] + }, + { + "title": "UUID", + "column": 3, + "category": "Common libraries", + "samples": [ + { + "name": "Generate UUID", + "url": "uuid-generation", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "isLearnByExample": false + }, + { + "name": "UUID operations", + "url": "uuid-operations", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + } + ] + }, + { + "title": "XSLT", + "column": 3, + "category": "Common libraries", + "samples": [ + { + "name": "XSLT transformation", + "url": "xslt-transformation", + "verifyBuild": true, + "verifyOutput": false, + "isLearnByExample": false + } + ] + }, + { + "title": "Regex", + "column": 3, + "category": "Common libraries", + "samples": [ + { + "name": "Regular expressions", + "url": "regular-expressions", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + } + ] + }, + { + "title": "OS", + "column": 3, + "category": "Common libraries", + "samples": [ + { + "name": "Environment variables", + "url": "environment-variables", + "verifyBuild": true, + "verifyOutput": false, + "disableVerificationReason": "Includes varying output", + "isLearnByExample": false + } + ] + }, + { + "title": "XML data", + "column": 3, + "category": "Common libraries", + "samples": [ + { + "name": "XML to JSON conversion", + "url": "xml-to-json-conversion", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + }, + { + "name": "JSON to XML conversion", + "url": "xml-from-json-conversion", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + }, + { + "name": "XML to record conversion", + "url": "xml-to-record-conversion", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + }, + { + "name": "Record to XML conversion", + "url": "xml-from-record-conversion", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Constraint", + "column": 3, + "category": "Common libraries", + "samples": [ + { + "name": "Constraint validations", + "url": "constraint-validations", + "verifyBuild": true, + "verifyOutput": true, + "isLearnByExample": false + } + ] + }, { "title": "Docker", "column": 0, @@ -202,5 +4522,46 @@ "isLearnByExample": false } ] + }, + { + "title": "Tracing", + "column": 0, + "category": "Observability", + "samples": [ + { + "name": "Distributed tracing", + "url": "tracing", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + }, + { + "name": "Counter-based metrics", + "url": "counter-metrics", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] + }, + { + "title": "Metrics", + "column": 1, + "category": "Observability", + "samples": [ + { + "name": "Gauge-based metrics", + "url": "gauge-metrics", + "verifyBuild": false, + "verifyOutput": false, + "disableVerificationReason": "Includes ballerinax components", + "disablePlayground": true, + "isLearnByExample": false + } + ] } -] +] \ No newline at end of file From 80695f9331a58ead1730c684fb93c29fb57e7110 Mon Sep 17 00:00:00 2001 From: praneesha Date: Mon, 17 Jul 2023 15:02:37 +0530 Subject: [PATCH 79/94] Add new line at the end of index.json --- examples/index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/index.json b/examples/index.json index b04cf7af5d..2d3a6270fa 100644 --- a/examples/index.json +++ b/examples/index.json @@ -4564,4 +4564,4 @@ } ] } -] \ No newline at end of file +] From c559e88f7982639f9a1ea02fe93b64c123e91d09 Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 3 Aug 2023 18:17:15 +0530 Subject: [PATCH 80/94] Address FaaS BBEs review comments --- examples/aws-lambda-dynamodb-trigger/bal_new.out | 2 +- examples/aws-lambda-execution-context/bal_new.out | 2 +- examples/aws-lambda-hello-world/bal_new.out | 2 +- examples/aws-lambda-s3-trigger/bal_new.out | 2 +- examples/azure-functions-cosmosdb-trigger/bal_new.out | 2 +- examples/azure-functions-hello-world/bal_new.out | 2 +- examples/azure-functions-http-trigger-with-queue/bal_new.out | 2 +- examples/azure-functions-timer-trigger/bal_new.out | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/aws-lambda-dynamodb-trigger/bal_new.out b/examples/aws-lambda-dynamodb-trigger/bal_new.out index 6061dbdef8..b25c8fd949 100644 --- a/examples/aws-lambda-dynamodb-trigger/bal_new.out +++ b/examples/aws-lambda-dynamodb-trigger/bal_new.out @@ -1 +1 @@ -$ bal new aws-lambda-dynamodb-trigger +$ bal new aws_lambda_dynamodb_trigger diff --git a/examples/aws-lambda-execution-context/bal_new.out b/examples/aws-lambda-execution-context/bal_new.out index fdb884a78a..1e3eda4019 100644 --- a/examples/aws-lambda-execution-context/bal_new.out +++ b/examples/aws-lambda-execution-context/bal_new.out @@ -1 +1 @@ -$ bal new aws-lambda-execution-context +$ bal new aws_lambda_execution_context diff --git a/examples/aws-lambda-hello-world/bal_new.out b/examples/aws-lambda-hello-world/bal_new.out index 3fd4ff56d0..b4759b0c43 100644 --- a/examples/aws-lambda-hello-world/bal_new.out +++ b/examples/aws-lambda-hello-world/bal_new.out @@ -1 +1 @@ -$ bal new aws-lambda-hello-world +$ bal new aws_lambda_hello_world diff --git a/examples/aws-lambda-s3-trigger/bal_new.out b/examples/aws-lambda-s3-trigger/bal_new.out index cd23cd38c3..aaee4db8cb 100644 --- a/examples/aws-lambda-s3-trigger/bal_new.out +++ b/examples/aws-lambda-s3-trigger/bal_new.out @@ -1 +1 @@ -$ bal new aws-lambda-s3-trigger +$ bal new aws_lambda_s3_trigger diff --git a/examples/azure-functions-cosmosdb-trigger/bal_new.out b/examples/azure-functions-cosmosdb-trigger/bal_new.out index e79bf8f658..e288f40284 100644 --- a/examples/azure-functions-cosmosdb-trigger/bal_new.out +++ b/examples/azure-functions-cosmosdb-trigger/bal_new.out @@ -1 +1 @@ -$ bal new azure-functions-cosmosdb-trigger +$ bal new azure_functions_cosmosdb_trigger diff --git a/examples/azure-functions-hello-world/bal_new.out b/examples/azure-functions-hello-world/bal_new.out index 27be8e9b36..158009cfbe 100644 --- a/examples/azure-functions-hello-world/bal_new.out +++ b/examples/azure-functions-hello-world/bal_new.out @@ -1 +1 @@ -$ bal new azure-functions-hello-world +$ bal new azure_functions_hello_world diff --git a/examples/azure-functions-http-trigger-with-queue/bal_new.out b/examples/azure-functions-http-trigger-with-queue/bal_new.out index 3425a3298e..ec64ea7ffd 100644 --- a/examples/azure-functions-http-trigger-with-queue/bal_new.out +++ b/examples/azure-functions-http-trigger-with-queue/bal_new.out @@ -1 +1 @@ -$ bal new azure-functions-http-trigger-with-queue +$ bal new azure_functions_http_trigger_with_queue diff --git a/examples/azure-functions-timer-trigger/bal_new.out b/examples/azure-functions-timer-trigger/bal_new.out index a58faf07b6..4dd537e997 100644 --- a/examples/azure-functions-timer-trigger/bal_new.out +++ b/examples/azure-functions-timer-trigger/bal_new.out @@ -1 +1 @@ -$ bal new azure-functions-timer-trigger +$ bal new azure_functions_timer_trigger From 1f386c5e223288475b8aa302bb495ee5a00d89a8 Mon Sep 17 00:00:00 2001 From: praneesha Date: Thu, 3 Aug 2023 18:19:44 +0530 Subject: [PATCH 81/94] Fix the AZ helloworld BBE deploy output --- examples/azure-functions-hello-world/az_deploy.out | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/azure-functions-hello-world/az_deploy.out b/examples/azure-functions-hello-world/az_deploy.out index 968f927b8e..cdd093ffbd 100644 --- a/examples/azure-functions-hello-world/az_deploy.out +++ b/examples/azure-functions-hello-world/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] From fe3ea126a68ae6d943c80228c609819d7c5b3847 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 4 Aug 2023 13:21:46 +0530 Subject: [PATCH 82/94] Update examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md Co-authored-by: Anupama Pathirage --- .../aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1c9e271971..f2219d707b 100644 --- a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md @@ -42,7 +42,7 @@ Follow the instructions below to create a DynamoDB table for invoking this funct 4. Click **Create Table**, enter a table name and a partition key, and create the table (if you already have a table created, you can skip this step). 5. Click on the DynamoDB table you created, and then click the **Exports and streams** tab. 6. Click **Turn on** under **DynamoDB stream details**, select **Key attributes only** for the event type, and click **Turn on stream**. -8. Under the **Trigger** section, click **Create trigger**, select the `dynamoDBTrigger` from the dropdown, and click **Create trigger**. +8. Under the **Trigger** section, click **Create trigger**, select the `dynamoDBTrigger` from the drop-down, and click **Create trigger**. 9. Click **Explore table items**, and click **Create items** under the **Items returned** section. 10. Enter a value under the **Attributes** section to add an entry to the DynamoDB table to invoke the Lambda function, and click **Create item**. 11. Click the **Monitor** tab of the Lambda function in the AWS Management Console, and click **View CloudWatch logs** to check the logs via CloudWatch. From 954ea46baf88b1e9b06930790612233f09749419 Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 4 Aug 2023 13:27:38 +0530 Subject: [PATCH 83/94] Add the DynamoDB link in BBE --- .../aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 f2219d707b..c9f108779e 100644 --- a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md @@ -1,6 +1,6 @@ # AWS Lambda DynamoDB trigger -This example creates a function, which will be executed for each entry added to a database in the DynamoDB. +This example creates a function, which will be executed for each entry added to a database in the [DynamoDB](https://aws.amazon.com/dynamodb/). For more information, see the [AWS Lambda learn guide](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/aws-lambda/). From 3613ba95b792067cb4f405a8bb618545d04e403b Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 4 Aug 2023 13:37:11 +0530 Subject: [PATCH 84/94] Add underscore in build command output of FaaS BBEs --- .../aws-lambda-dynamodb-trigger/bal_build.out | 2 +- .../aws-lambda-execution-context/bal_build.out | 2 +- examples/aws-lambda-hello-world/bal_build.out | 2 +- examples/aws-lambda-s3-trigger/bal_build.out | 2 +- .../bal_build.out | 15 ++++++++------- .../azure-functions-hello-world/bal_build.out | 2 +- .../bal_build.out | 2 +- .../azure-functions-timer-trigger/bal_build.out | 2 +- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/examples/aws-lambda-dynamodb-trigger/bal_build.out b/examples/aws-lambda-dynamodb-trigger/bal_build.out index 8fd10e70c7..8d1335858f 100644 --- a/examples/aws-lambda-dynamodb-trigger/bal_build.out +++ b/examples/aws-lambda-dynamodb-trigger/bal_build.out @@ -1,6 +1,6 @@ $ bal build Compiling source - wso2/aws-lambda-dynamodb-trigger:0.1.0 + wso2/aws_lambda_dynamodb_trigger:0.1.0 Generating executable @awslambda:Function: dynamoDBTrigger diff --git a/examples/aws-lambda-execution-context/bal_build.out b/examples/aws-lambda-execution-context/bal_build.out index c007fa3a34..2abd4d890e 100644 --- a/examples/aws-lambda-execution-context/bal_build.out +++ b/examples/aws-lambda-execution-context/bal_build.out @@ -1,6 +1,6 @@ $ bal build Compiling source - wso2/aws-lambda-execution-context:0.1.0 + wso2/aws_lambda_execution_context:0.1.0 Generating executable @awslambda:Function: ctxinfo diff --git a/examples/aws-lambda-hello-world/bal_build.out b/examples/aws-lambda-hello-world/bal_build.out index 7a176907a4..ccb4bc0004 100644 --- a/examples/aws-lambda-hello-world/bal_build.out +++ b/examples/aws-lambda-hello-world/bal_build.out @@ -1,6 +1,6 @@ $ bal build Compiling source - wso2/aws-lambda-hello-world:0.1.0 + wso2/aws_lambda_hello_world:0.1.0 Generating executable @awslambda:Function: echo diff --git a/examples/aws-lambda-s3-trigger/bal_build.out b/examples/aws-lambda-s3-trigger/bal_build.out index 192b860d1f..71a62ffa3c 100644 --- a/examples/aws-lambda-s3-trigger/bal_build.out +++ b/examples/aws-lambda-s3-trigger/bal_build.out @@ -1,6 +1,6 @@ $ bal build Compiling source - wso2/aws-lambda-s3-trigger:0.1.0 + wso2/aws_lambda_s3_trigger:0.1.0 Generating executable @awslambda:Function: s3Trigger diff --git a/examples/azure-functions-cosmosdb-trigger/bal_build.out b/examples/azure-functions-cosmosdb-trigger/bal_build.out index 3b36378a03..c7efe8869d 100644 --- a/examples/azure-functions-cosmosdb-trigger/bal_build.out +++ b/examples/azure-functions-cosmosdb-trigger/bal_build.out @@ -1,14 +1,15 @@ $ bal build --cloud="azure_functions" Compiling source - wso2/azure-functions-cosmosdb-trigger:0.1.0 + wso2/azure_functions_cosmosdb_trigger:0.1.0 Generating executable - @azure_functions:Function: cosmos - Execute the command below to deploy the function locally. - func start --script-root target/azure_functions --java + @azure.functions:Function: cosmos - Execute the command below to deploy Ballerina Azure Functions. - func azure functionapp publish --script-root target/azure_functions + Execute the command below to deploy the function locally: + $ func start --script-root target/azure_functions --java - target/bin/azure_functions_deployment.jar + Execute the command below to deploy Ballerina Azure Functions: + $ func azure functionapp publish --script-root target/azure_functions + + target/bin/azure_functions_cosmosdb_trigger.jar diff --git a/examples/azure-functions-hello-world/bal_build.out b/examples/azure-functions-hello-world/bal_build.out index bfb0dbc3d6..d72c8438bb 100644 --- a/examples/azure-functions-hello-world/bal_build.out +++ b/examples/azure-functions-hello-world/bal_build.out @@ -1,6 +1,6 @@ $ bal build --cloud="azure_functions" Compiling source - wso2/azure-functions-hello-world:0.1.0 + wso2/azure_functions_hello_world:0.1.0 Generating executable @azure_functions:Function: get-hello diff --git a/examples/azure-functions-http-trigger-with-queue/bal_build.out b/examples/azure-functions-http-trigger-with-queue/bal_build.out index 2680763fc1..eccf003470 100644 --- a/examples/azure-functions-http-trigger-with-queue/bal_build.out +++ b/examples/azure-functions-http-trigger-with-queue/bal_build.out @@ -1,6 +1,6 @@ $ bal build --cloud="azure_functions" Compiling source - wso2/azure-functions-timer-trigger:0.1.0 + wso2/azure_functions_timer_trigger:0.1.0 Generating executable @azure_functions:Function: timer, get-hello diff --git a/examples/azure-functions-timer-trigger/bal_build.out b/examples/azure-functions-timer-trigger/bal_build.out index b11ce9a914..3e45b2ab1f 100644 --- a/examples/azure-functions-timer-trigger/bal_build.out +++ b/examples/azure-functions-timer-trigger/bal_build.out @@ -1,6 +1,6 @@ $ bal build --cloud="azure_functions" Compiling source - wso2/azure-functions-http-trigger:0.1.0 + wso2/azure_functions_http_trigger:0.1.0 Generating executable @azure_functions:Function: timer From 9949bda5b2db4d0d802e9865fcba1342ccb57dcc Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 4 Aug 2023 15:32:13 +0530 Subject: [PATCH 85/94] Verify Azure Functions BBEs output --- .../az_deploy.out | 7 ++----- .../azure-functions-hello-world/az_deploy.out | 4 ++-- .../azure-functions-hello-world/bal_build.out | 15 ++++++++------- .../az_deploy.out | 6 +++--- .../bal_build.out | 15 ++++++++------- .../azure-functions-timer-trigger/az_deploy.out | 5 +---- .../azure-functions-timer-trigger.bal | 4 ++-- .../azure-functions-timer-trigger/bal_build.out | 15 ++++++++------- 8 files changed, 34 insertions(+), 37 deletions(-) diff --git a/examples/azure-functions-cosmosdb-trigger/az_deploy.out b/examples/azure-functions-cosmosdb-trigger/az_deploy.out index 968f927b8e..db61722bcb 100644 --- a/examples/azure-functions-cosmosdb-trigger/az_deploy.out +++ b/examples/azure-functions-cosmosdb-trigger/az_deploy.out @@ -1,12 +1,9 @@ $ func azure functionapp publish bal-bbe --script-root target/azure_functions Getting site publishing info... Creating archive for current directory... -Uploading 28.67 MB [##############################################################################] +Uploading 32.71 MB [##############################################################################] Upload completed successfully. Deployment completed successfully. Syncing triggers... Functions in bal-bbe: - get-hello - [httpTrigger] - Invoke url: https://bal-bbe.azurewebsites.net/hello - - timer - [timerTrigger] + cosmos - [cosmosDBTrigger] diff --git a/examples/azure-functions-hello-world/az_deploy.out b/examples/azure-functions-hello-world/az_deploy.out index cdd093ffbd..849e04e8c1 100644 --- a/examples/azure-functions-hello-world/az_deploy.out +++ b/examples/azure-functions-hello-world/az_deploy.out @@ -1,10 +1,10 @@ $ func azure functionapp publish bal-bbe --script-root target/azure_functions Getting site publishing info... Creating archive for current directory... -Uploading 28.67 MB [##############################################################################] +Uploading 32.69 MB [##############################################################################] Upload completed successfully. Deployment completed successfully. Syncing triggers... Functions in bal-bbe: get-hello - [httpTrigger] - Invoke url: https://bal-bbe.azurewebsites.net/hello + Invoke url: https://azurecosmosdbfunctionapp.azurewebsites.net/hello diff --git a/examples/azure-functions-hello-world/bal_build.out b/examples/azure-functions-hello-world/bal_build.out index d72c8438bb..c0ae9bfb3a 100644 --- a/examples/azure-functions-hello-world/bal_build.out +++ b/examples/azure-functions-hello-world/bal_build.out @@ -1,14 +1,15 @@ $ bal build --cloud="azure_functions" Compiling source - wso2/azure_functions_hello_world:0.1.0 + wso2/azure_functions_hello_world:0.1.0 Generating executable - @azure_functions:Function: get-hello - Execute the command below to deploy the function locally. - func start --script-root target/azure_functions --java + @azure.functions:Function: get-hello - Execute the command below to deploy Ballerina Azure Functions. - func azure functionapp publish --script-root target/azure_functions + Execute the command below to deploy the function locally: + $ func start --script-root target/azure_functions --java - target/bin/azure_functions_deployment.jar + Execute the command below to deploy Ballerina Azure Functions: + $ func azure functionapp publish --script-root target/azure_functions + + target/bin/azure_functions_hello_world.jar diff --git a/examples/azure-functions-http-trigger-with-queue/az_deploy.out b/examples/azure-functions-http-trigger-with-queue/az_deploy.out index cdd093ffbd..4e0b427350 100644 --- a/examples/azure-functions-http-trigger-with-queue/az_deploy.out +++ b/examples/azure-functions-http-trigger-with-queue/az_deploy.out @@ -1,10 +1,10 @@ $ func azure functionapp publish bal-bbe --script-root target/azure_functions Getting site publishing info... Creating archive for current directory... -Uploading 28.67 MB [##############################################################################] +Uploading 32.71 MB [##############################################################################] Upload completed successfully. Deployment completed successfully. Syncing triggers... Functions in bal-bbe: - get-hello - [httpTrigger] - Invoke url: https://bal-bbe.azurewebsites.net/hello + post-queue - [httpTrigger] + Invoke url: https://azurecosmosdbfunctionapp.azurewebsites.net/queue \ No newline at end of file diff --git a/examples/azure-functions-http-trigger-with-queue/bal_build.out b/examples/azure-functions-http-trigger-with-queue/bal_build.out index eccf003470..c6374c68c9 100644 --- a/examples/azure-functions-http-trigger-with-queue/bal_build.out +++ b/examples/azure-functions-http-trigger-with-queue/bal_build.out @@ -1,14 +1,15 @@ $ bal build --cloud="azure_functions" Compiling source - wso2/azure_functions_timer_trigger:0.1.0 + wso2/azure_functions_http_trigger_with_queue:0.1.0 Generating executable - @azure_functions:Function: timer, get-hello - Execute the command below to deploy the function locally. - func start --script-root target/azure_functions --java + @azure.functions:Function: post-queue - Execute the command below to deploy Ballerina Azure Functions. - func azure functionapp publish --script-root target/azure_functions + Execute the command below to deploy the function locally: + $ func start --script-root target/azure_functions --java - target/bin/azure_functions_deployment.jar + Execute the command below to deploy Ballerina Azure Functions: + $ func azure functionapp publish --script-root target/azure_functions + + target/bin/azure_functions_http_trigger_with_queue.jar diff --git a/examples/azure-functions-timer-trigger/az_deploy.out b/examples/azure-functions-timer-trigger/az_deploy.out index 968f927b8e..644c26ddeb 100644 --- a/examples/azure-functions-timer-trigger/az_deploy.out +++ b/examples/azure-functions-timer-trigger/az_deploy.out @@ -1,12 +1,9 @@ $ func azure functionapp publish bal-bbe --script-root target/azure_functions Getting site publishing info... Creating archive for current directory... -Uploading 28.67 MB [##############################################################################] +Uploading 32.7 MB [###############################################################################] Upload completed successfully. Deployment completed successfully. 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-timer-trigger/azure-functions-timer-trigger.bal b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal index 4cfa51c15d..e66992cac1 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal @@ -4,10 +4,10 @@ import ballerina/time; // This function gets executed every 10 seconds by the Azure Functions app. Once the function is executed, the timer // details will be stored in the selected queue storage for every invocation. @functions:TimerTrigger {schedule: "*/10 * * * * *"} -listener af:TimerListener timerListener = new af:TimerListener(); +listener functions:TimerListener timerListener = new functions:TimerListener(); service "timer" on timerListener { - remote function onTrigger(af:TimerMetadata metadata) returns @af:QueueOutput {queueName: "timer-queue"} string|error { + remote function onTrigger(functions:TimerMetadata metadata) returns @functions:QueueOutput {queueName: "timer-queue"} string|error { time:Utc utc = time:utcNow(); return "Hello from timer: " + time:utcToEmailString(utc); } diff --git a/examples/azure-functions-timer-trigger/bal_build.out b/examples/azure-functions-timer-trigger/bal_build.out index 3e45b2ab1f..b6244e8963 100644 --- a/examples/azure-functions-timer-trigger/bal_build.out +++ b/examples/azure-functions-timer-trigger/bal_build.out @@ -1,14 +1,15 @@ $ bal build --cloud="azure_functions" Compiling source - wso2/azure_functions_http_trigger:0.1.0 + wso2/azure_functions_timer_trigger:0.1.0 Generating executable - @azure_functions:Function: timer - Execute the command below to deploy the function locally. - func start --script-root target/azure_functions --java + @azure.functions:Function: timer - Execute the command below to deploy Ballerina Azure Functions. - func azure functionapp publish --script-root target/azure_functions + Execute the command below to deploy the function locally: + $ func start --script-root target/azure_functions --java - target/bin/azure_functions_deployment.jar + Execute the command below to deploy Ballerina Azure Functions: + $ func azure functionapp publish --script-root target/azure_functions + + target/bin/azure_functions_timer_trigger.jar From 01237a95a90da0992eada1b0710cfb335fe0f8bb Mon Sep 17 00:00:00 2001 From: praneesha Date: Fri, 4 Aug 2023 15:40:15 +0530 Subject: [PATCH 86/94] Add the bal new command outputs --- examples/aws-lambda-dynamodb-trigger/bal_new.out | 1 + examples/aws-lambda-execution-context/bal_new.out | 1 + examples/aws-lambda-hello-world/bal_new.out | 1 + examples/aws-lambda-s3-trigger/bal_new.out | 1 + examples/azure-functions-cosmosdb-trigger/bal_new.out | 1 + examples/azure-functions-hello-world/bal_new.out | 1 + examples/azure-functions-http-trigger-with-queue/bal_new.out | 1 + examples/azure-functions-timer-trigger/bal_new.out | 1 + 8 files changed, 8 insertions(+) diff --git a/examples/aws-lambda-dynamodb-trigger/bal_new.out b/examples/aws-lambda-dynamodb-trigger/bal_new.out index b25c8fd949..2bbc070e53 100644 --- a/examples/aws-lambda-dynamodb-trigger/bal_new.out +++ b/examples/aws-lambda-dynamodb-trigger/bal_new.out @@ -1 +1,2 @@ $ bal new aws_lambda_dynamodb_trigger +Created new package 'aws_lambda_dynamodb_trigger' at /Users/wso2/aws_lambda_dynamodb_trigger. diff --git a/examples/aws-lambda-execution-context/bal_new.out b/examples/aws-lambda-execution-context/bal_new.out index 1e3eda4019..e0b529d04b 100644 --- a/examples/aws-lambda-execution-context/bal_new.out +++ b/examples/aws-lambda-execution-context/bal_new.out @@ -1 +1,2 @@ $ bal new aws_lambda_execution_context +Created new package 'aws_lambda_execution_context' at /Users/wso2/aws_lambda_execution_context. \ No newline at end of file diff --git a/examples/aws-lambda-hello-world/bal_new.out b/examples/aws-lambda-hello-world/bal_new.out index b4759b0c43..554bccf13a 100644 --- a/examples/aws-lambda-hello-world/bal_new.out +++ b/examples/aws-lambda-hello-world/bal_new.out @@ -1 +1,2 @@ $ bal new aws_lambda_hello_world +Created new package 'aws_lambda_hello_world' at /Users/wso2/aws_lambda_hello_world. \ No newline at end of file diff --git a/examples/aws-lambda-s3-trigger/bal_new.out b/examples/aws-lambda-s3-trigger/bal_new.out index aaee4db8cb..37a38536b1 100644 --- a/examples/aws-lambda-s3-trigger/bal_new.out +++ b/examples/aws-lambda-s3-trigger/bal_new.out @@ -1 +1,2 @@ $ bal new aws_lambda_s3_trigger +Created new package 'aws_lambda_s3_trigger' at /Users/wso2/aws_lambda_s3_trigger. \ No newline at end of file diff --git a/examples/azure-functions-cosmosdb-trigger/bal_new.out b/examples/azure-functions-cosmosdb-trigger/bal_new.out index e288f40284..252c9860d4 100644 --- a/examples/azure-functions-cosmosdb-trigger/bal_new.out +++ b/examples/azure-functions-cosmosdb-trigger/bal_new.out @@ -1 +1,2 @@ $ bal new azure_functions_cosmosdb_trigger +Created new package 'azure_functions_cosmosdb_trigger' at /Users/wso2/azure_functions_cosmosdb_trigger. \ No newline at end of file diff --git a/examples/azure-functions-hello-world/bal_new.out b/examples/azure-functions-hello-world/bal_new.out index 158009cfbe..6cbca420b6 100644 --- a/examples/azure-functions-hello-world/bal_new.out +++ b/examples/azure-functions-hello-world/bal_new.out @@ -1 +1,2 @@ $ bal new azure_functions_hello_world +Created new package 'azure_functions_hello_world' at /Users/wso2/azure_functions_hello_world. \ No newline at end of file diff --git a/examples/azure-functions-http-trigger-with-queue/bal_new.out b/examples/azure-functions-http-trigger-with-queue/bal_new.out index ec64ea7ffd..84e01b29db 100644 --- a/examples/azure-functions-http-trigger-with-queue/bal_new.out +++ b/examples/azure-functions-http-trigger-with-queue/bal_new.out @@ -1 +1,2 @@ $ bal new azure_functions_http_trigger_with_queue +Created new package 'azure_functions_http_trigger_with_queue' at /Users/wso2/azure_functions_http_trigger_with_queue. \ No newline at end of file diff --git a/examples/azure-functions-timer-trigger/bal_new.out b/examples/azure-functions-timer-trigger/bal_new.out index 4dd537e997..a8dec863d0 100644 --- a/examples/azure-functions-timer-trigger/bal_new.out +++ b/examples/azure-functions-timer-trigger/bal_new.out @@ -1 +1,2 @@ $ bal new azure_functions_timer_trigger +Created new package 'azure_functions_timer_trigger' at /Users/wso2/azure_functions_timer_trigger. \ No newline at end of file From c220070e18bfd95ea5d4c8dd71387e01e740a0c2 Mon Sep 17 00:00:00 2001 From: praneesha Date: Tue, 8 Aug 2023 05:46:13 +0530 Subject: [PATCH 87/94] Update examples/kubernetes-hello-world/kubernetes-hello-world.md Co-authored-by: Anupama Pathirage --- examples/kubernetes-hello-world/kubernetes-hello-world.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/kubernetes-hello-world/kubernetes-hello-world.md b/examples/kubernetes-hello-world/kubernetes-hello-world.md index a42395397b..be0df89fa9 100644 --- a/examples/kubernetes-hello-world/kubernetes-hello-world.md +++ b/examples/kubernetes-hello-world/kubernetes-hello-world.md @@ -31,5 +31,5 @@ Get the External IP and port of the Kubernetes service. If the External IP of the `hello-svc-local` service is ``, you need to follow cluster-specific steps to obtain the external IP. If you are using Minikube, you can use the `minikube ip` command to obtain the IP. ::: out minikube_ip.out ::: -Access the deployed service via CURL. +Access the deployed service via cURL. ::: out execute_curl.out ::: From e0afab15435f076ae3a9ec9ae11400a34f9570f6 Mon Sep 17 00:00:00 2001 From: praneesha Date: Tue, 8 Aug 2023 05:46:24 +0530 Subject: [PATCH 88/94] Update examples/docker-hello-world/docker-hello-world.md Co-authored-by: Anupama Pathirage --- examples/docker-hello-world/docker-hello-world.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/docker-hello-world/docker-hello-world.md b/examples/docker-hello-world/docker-hello-world.md index 1ffabc6bbc..61ad054b02 100644 --- a/examples/docker-hello-world/docker-hello-world.md +++ b/examples/docker-hello-world/docker-hello-world.md @@ -5,7 +5,7 @@ For more information, see [Code to Cloud Deployment](/learn/run-in-the-cloud/cod ::: code docker-hello-world.bal ::: -Before you build the package, you need to override some default values taken by the compiler. To do this, create a filed named `Cloud.toml` in the package directory, and add the content below to it. +Before you build the package, you need to override some default values taken by the compiler. To do this, create a file named `Cloud.toml` in the package directory, and add the content below to it. For all the supported key value properties, see [Code to Cloud specification](https://github.com/ballerina-platform/ballerina-spec/blob/master/c2c/code-to-cloud-spec.md). ::: code Cloud.toml ::: From 53aed2d9f7a527e72000c38ed6e1d676ef4fbb5c Mon Sep 17 00:00:00 2001 From: praneesha Date: Tue, 8 Aug 2023 05:46:42 +0530 Subject: [PATCH 89/94] Update examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md Co-authored-by: Anupama Pathirage --- .../azure-functions-http-trigger-with-queue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md index 0bbbe61ddd..c048113db6 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -9,7 +9,7 @@ For more information, see the [Azure Functions deployment guide](https://balleri 1. Set up the [general prerequisites](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/#set-up-the-prerequisites). 2. In the AWS Portal, click **Storage accounts** to create a queue to hold the outputs of the function. 2. From the list, click on the storage account entry that corresponds with your function app. -3. Click **Queues*** in the sidebar, and click **+ Queue**. +3. Click **Queues** in the sidebar, and click **+ Queue**. 4. Enter a name in the **Add queue** pop-up, and click **Add**. >**Note:** For the **Queue name**, enter the same value of the `queueName` property in the `QueueOutput` annotation in the [Ballerina source below](https://ballerina.io/learn/by-example/azure-functions-trigger/#write-the-function) From 4e8e00495b54d2be731fba150eb0e1c25622354c Mon Sep 17 00:00:00 2001 From: praneesha Date: Tue, 8 Aug 2023 05:47:27 +0530 Subject: [PATCH 90/94] Update examples/azure-functions-hello-world/azure-functions-hello-world.bal Co-authored-by: Anupama Pathirage --- .../azure-functions-hello-world/azure-functions-hello-world.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/azure-functions-hello-world/azure-functions-hello-world.bal b/examples/azure-functions-hello-world/azure-functions-hello-world.bal index 4c50c5928d..cdbcd2da1f 100644 --- a/examples/azure-functions-hello-world/azure-functions-hello-world.bal +++ b/examples/azure-functions-hello-world/azure-functions-hello-world.bal @@ -4,6 +4,6 @@ import ballerinax/azure.functions; // returns a processed HTTP output to the caller. service / on new functions:HttpListener() { resource function get hello(string name) returns string { - return "Hello, " + name + "!"; + return string `Hello, ${name}!`; } } From 51e7462f6d01e1a54c4330c2df8c87ab6698ecab Mon Sep 17 00:00:00 2001 From: praneesha Date: Tue, 8 Aug 2023 05:53:13 +0530 Subject: [PATCH 91/94] Add new lines in missing FaaS BBE files --- examples/aws-lambda-execution-context/bal_new.out | 2 +- examples/aws-lambda-hello-world/bal_new.out | 2 +- examples/aws-lambda-s3-trigger/bal_new.out | 2 +- .../azure-functions-cosmosdb-trigger.md | 1 - examples/azure-functions-cosmosdb-trigger/bal_new.out | 2 +- examples/azure-functions-hello-world/bal_new.out | 2 +- examples/azure-functions-http-trigger-with-queue/az_deploy.out | 2 +- examples/azure-functions-http-trigger-with-queue/bal_new.out | 2 +- examples/azure-functions-timer-trigger/bal_new.out | 2 +- 9 files changed, 8 insertions(+), 9 deletions(-) diff --git a/examples/aws-lambda-execution-context/bal_new.out b/examples/aws-lambda-execution-context/bal_new.out index e0b529d04b..5e3fa2223c 100644 --- a/examples/aws-lambda-execution-context/bal_new.out +++ b/examples/aws-lambda-execution-context/bal_new.out @@ -1,2 +1,2 @@ $ bal new aws_lambda_execution_context -Created new package 'aws_lambda_execution_context' at /Users/wso2/aws_lambda_execution_context. \ No newline at end of file +Created new package 'aws_lambda_execution_context' at /Users/wso2/aws_lambda_execution_context. diff --git a/examples/aws-lambda-hello-world/bal_new.out b/examples/aws-lambda-hello-world/bal_new.out index 554bccf13a..cc5e2c7b20 100644 --- a/examples/aws-lambda-hello-world/bal_new.out +++ b/examples/aws-lambda-hello-world/bal_new.out @@ -1,2 +1,2 @@ $ bal new aws_lambda_hello_world -Created new package 'aws_lambda_hello_world' at /Users/wso2/aws_lambda_hello_world. \ No newline at end of file +Created new package 'aws_lambda_hello_world' at /Users/wso2/aws_lambda_hello_world. diff --git a/examples/aws-lambda-s3-trigger/bal_new.out b/examples/aws-lambda-s3-trigger/bal_new.out index 37a38536b1..034b5c68fc 100644 --- a/examples/aws-lambda-s3-trigger/bal_new.out +++ b/examples/aws-lambda-s3-trigger/bal_new.out @@ -1,2 +1,2 @@ $ bal new aws_lambda_s3_trigger -Created new package 'aws_lambda_s3_trigger' at /Users/wso2/aws_lambda_s3_trigger. \ No newline at end of file +Created new package 'aws_lambda_s3_trigger' at /Users/wso2/aws_lambda_s3_trigger. 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 9ca983dded..9fa86b4313 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md @@ -59,4 +59,3 @@ Once the function is deployed, add an item to the collection. 3. Go to the queue page and observe the added new entry. >**Info:** Additionally, for debugging purposes, view the logs under the **Logs stream** in the function app. - diff --git a/examples/azure-functions-cosmosdb-trigger/bal_new.out b/examples/azure-functions-cosmosdb-trigger/bal_new.out index 252c9860d4..cebe5b2e9e 100644 --- a/examples/azure-functions-cosmosdb-trigger/bal_new.out +++ b/examples/azure-functions-cosmosdb-trigger/bal_new.out @@ -1,2 +1,2 @@ $ bal new azure_functions_cosmosdb_trigger -Created new package 'azure_functions_cosmosdb_trigger' at /Users/wso2/azure_functions_cosmosdb_trigger. \ No newline at end of file +Created new package 'azure_functions_cosmosdb_trigger' at /Users/wso2/azure_functions_cosmosdb_trigger. diff --git a/examples/azure-functions-hello-world/bal_new.out b/examples/azure-functions-hello-world/bal_new.out index 6cbca420b6..8ae62e5014 100644 --- a/examples/azure-functions-hello-world/bal_new.out +++ b/examples/azure-functions-hello-world/bal_new.out @@ -1,2 +1,2 @@ $ bal new azure_functions_hello_world -Created new package 'azure_functions_hello_world' at /Users/wso2/azure_functions_hello_world. \ No newline at end of file +Created new package 'azure_functions_hello_world' at /Users/wso2/azure_functions_hello_world. diff --git a/examples/azure-functions-http-trigger-with-queue/az_deploy.out b/examples/azure-functions-http-trigger-with-queue/az_deploy.out index 4e0b427350..c00614799e 100644 --- a/examples/azure-functions-http-trigger-with-queue/az_deploy.out +++ b/examples/azure-functions-http-trigger-with-queue/az_deploy.out @@ -7,4 +7,4 @@ Deployment completed successfully. Syncing triggers... Functions in bal-bbe: post-queue - [httpTrigger] - Invoke url: https://azurecosmosdbfunctionapp.azurewebsites.net/queue \ No newline at end of file + Invoke url: https://azurecosmosdbfunctionapp.azurewebsites.net/queue diff --git a/examples/azure-functions-http-trigger-with-queue/bal_new.out b/examples/azure-functions-http-trigger-with-queue/bal_new.out index 84e01b29db..0e8bdbeaa7 100644 --- a/examples/azure-functions-http-trigger-with-queue/bal_new.out +++ b/examples/azure-functions-http-trigger-with-queue/bal_new.out @@ -1,2 +1,2 @@ $ bal new azure_functions_http_trigger_with_queue -Created new package 'azure_functions_http_trigger_with_queue' at /Users/wso2/azure_functions_http_trigger_with_queue. \ No newline at end of file +Created new package 'azure_functions_http_trigger_with_queue' at /Users/wso2/azure_functions_http_trigger_with_queue. diff --git a/examples/azure-functions-timer-trigger/bal_new.out b/examples/azure-functions-timer-trigger/bal_new.out index a8dec863d0..d6d81b0cd3 100644 --- a/examples/azure-functions-timer-trigger/bal_new.out +++ b/examples/azure-functions-timer-trigger/bal_new.out @@ -1,2 +1,2 @@ $ bal new azure_functions_timer_trigger -Created new package 'azure_functions_timer_trigger' at /Users/wso2/azure_functions_timer_trigger. \ No newline at end of file +Created new package 'azure_functions_timer_trigger' at /Users/wso2/azure_functions_timer_trigger. From b10e46d6394f859fc8dbf9c4d3cb00c6f54088c4 Mon Sep 17 00:00:00 2001 From: praneesha Date: Tue, 8 Aug 2023 05:57:49 +0530 Subject: [PATCH 92/94] Add the hyphens in titles --- .../aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md | 2 +- .../aws-lambda-execution-context.md | 2 +- examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md | 2 +- .../azure-functions-cosmosdb-trigger.md | 2 +- .../azure-functions-http-trigger-with-queue.md | 2 +- .../azure-functions-timer-trigger.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) 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 c9f108779e..ca335ed5ee 100644 --- a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md @@ -1,4 +1,4 @@ -# AWS Lambda DynamoDB trigger +# AWS Lambda - DynamoDB trigger This example creates a function, which will be executed for each entry added to a database in the [DynamoDB](https://aws.amazon.com/dynamodb/). 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 24fbc442fa..4e0ae30cbf 100644 --- a/examples/aws-lambda-execution-context/aws-lambda-execution-context.md +++ b/examples/aws-lambda-execution-context/aws-lambda-execution-context.md @@ -1,4 +1,4 @@ -# AWS Lambda execution context +# AWS Lambda - Execution context The example below demonstrates how the execution context information of an AWS function can be retrieved. 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 700ad62576..af78124bc2 100644 --- a/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md +++ b/examples/aws-lambda-s3-trigger/aws-lambda-s3-trigger.md @@ -1,4 +1,4 @@ -# AWS Lambda S3 trigger +# AWS Lambda - S3 trigger This example creates a function, which will be executed for each object creation in AWS S3. 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 9fa86b4313..07c1b4429f 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md @@ -1,4 +1,4 @@ -# Azure Functions Cosmos DB trigger +# Azure Functions - Cosmos DB trigger 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. diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md index c048113db6..d39beada7f 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -1,4 +1,4 @@ -# Azure Functions- HTTP trigger with queue +# 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. 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 a009b99af2..070f2810e7 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md @@ -1,4 +1,4 @@ -# Azure Functions timer trigger +# Azure Functions - Timer trigger This example demonstrates how a function can be scheduled to execute periodically by the Azure Functions app. Once the function is executed, the timer details will be stored in the selected queue storage for every invocation. From 596aabac2768d2c103d13374e44e3a9ad71b3fc3 Mon Sep 17 00:00:00 2001 From: praneesha Date: Tue, 8 Aug 2023 06:03:46 +0530 Subject: [PATCH 93/94] Fix more issues --- .../azure-functions-cosmosdb-trigger.md | 12 ++++++------ examples/docker-hello-world/docker-hello-world.md | 2 +- .../kubernetes-hello-world/kubernetes-hello-world.md | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) 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 07c1b4429f..d3120a1467 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md @@ -1,6 +1,6 @@ # Azure Functions - Cosmos DB trigger -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. +This example demonstrates using a Cosmos DB trigger to invoke an Azure function and a queue output binding to write an entry to a queue. For more information, see the [Azure Functions deployment guide](https://ballerina.io/learn/run-in-the-cloud/function-as-a-service/azure-functions/). @@ -14,17 +14,17 @@ Follow the steps below to create a Cosmos DB and a queue to make use of those se 4. Enter an account name and a resource group name, and click **Review + Create**, and then, click **Create**. 5. Once the database is created, go to the **Data Explorer**, and select **Create Container**. 6. Enter `db1` as the Database ID, `c1` as the collection ID, and click **Ok**. ->**Note:** If you want to change these values, change them in the code as well. + >**Note:** If you want to change these values, change them in the code as well. 6. Go to the **Keys** tab of the Cosmos DB page. 7. Copy the value of the `PRIMARY CONNECTION STRING`. 8. Click the **Configuration** tab on the function app page. 9. Select **New Application Setting**, and paste the data you copied above as the value. ->**Tip:** For the key, use the value of the `connectionStringSetting` key and save. + >**Tip:** For the key, use the value of the `connectionStringSetting` key and save. -Example application settings are as follows. + Example application settings are as follows. -- Name - `CosmosDBConnection` -- Value - `AccountEndpoint=https://db-cosmos.documents.azure.com:443/;AccountKey=12345asda;` + - Name - `CosmosDBConnection` + - Value - `AccountEndpoint=https://db-cosmos.documents.azure.com:443/;AccountKey=12345asda;` Now, as all the infrastructure required is up and running and configured, start building and deploying the Azure function. diff --git a/examples/docker-hello-world/docker-hello-world.md b/examples/docker-hello-world/docker-hello-world.md index 61ad054b02..8805068e08 100644 --- a/examples/docker-hello-world/docker-hello-world.md +++ b/examples/docker-hello-world/docker-hello-world.md @@ -1,4 +1,4 @@ -# Docker +# Docker - Hello world Ballerina supports generating Docker artifacts from code without any additional configuration. This simplifies the experience of developing and deploying Ballerina code in the cloud. Code to Cloud builds the containers and required artifacts by deriving the required values from the code. If you want to override the default values taken by the compiler, you can use a `Cloud.toml` file. For more information, see [Code to Cloud Deployment](/learn/run-in-the-cloud/code-to-cloud-deployment/). diff --git a/examples/kubernetes-hello-world/kubernetes-hello-world.md b/examples/kubernetes-hello-world/kubernetes-hello-world.md index be0df89fa9..c58adaca94 100644 --- a/examples/kubernetes-hello-world/kubernetes-hello-world.md +++ b/examples/kubernetes-hello-world/kubernetes-hello-world.md @@ -1,4 +1,4 @@ -# Kubernetes +# Kubernetes - Hello world Ballerina supports generating Kubernetes artifacts from code without any additional configuration. This simplifies the experience of developing and deploying Ballerina code in the cloud. Code to Cloud builds the containers and required artifacts by deriving the required values from the code. If you want to override the default values taken by the compiler, you can use a `Cloud.toml` file. For more information, see [Code to Cloud deployment](/learn/run-in-the-cloud/code-to-cloud-deployment/). From d9c6de1e500b0c9ec8622a47ffb86261ba74c809 Mon Sep 17 00:00:00 2001 From: praneesha Date: Tue, 8 Aug 2023 11:54:03 +0530 Subject: [PATCH 94/94] Address more feedback --- .../aws-lambda-dynamodb-trigger.md | 2 +- examples/azure-functions-cosmosdb-trigger/az_deploy.out | 4 ++-- .../azure-functions-cosmosdb-trigger.md | 2 +- examples/azure-functions-hello-world/az_deploy.out | 4 ++-- .../azure-functions-hello-world.md | 4 ++-- examples/azure-functions-hello-world/execute_function.out | 2 +- .../azure-functions-http-trigger-with-queue/az_deploy.out | 4 ++-- .../azure-functions-http-trigger-with-queue.bal | 6 ++++-- .../azure-functions-http-trigger-with-queue.md | 3 ++- examples/azure-functions-timer-trigger/az_deploy.out | 4 ++-- .../azure-functions-timer-trigger.bal | 5 +++-- .../azure-functions-timer-trigger.md | 2 +- examples/docker-hello-world/docker-hello-world.bal | 3 ++- examples/kubernetes-hello-world/kubernetes-hello-world.bal | 3 ++- 14 files changed, 27 insertions(+), 21 deletions(-) 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 ca335ed5ee..5476a0687e 100644 --- a/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md +++ b/examples/aws-lambda-dynamodb-trigger/aws-lambda-dynamodb-trigger.md @@ -38,7 +38,7 @@ Follow the instructions below to create a DynamoDB table for invoking this funct 1. In the IAM Console, click the corresponding role in the list, and click **Add permissions**. 2. Select **attach policies** from the drop-down menu, and add the **AWSLambdaDynamoDBExecutionRole** to the role. -3. Go to [DynamoDB](https://us-west-1.console.aws.amazon.com/dynamodbv2), and from the drop-down menu at the RHS of the screen, select the **AWS region** in which you created the user and role. +3. Go to [DynamoDB](https://console.aws.amazon.com/dynamodbv2), and from the drop-down menu at the top RHS of the screen, select the **AWS region** in which you created the user and role. 4. Click **Create Table**, enter a table name and a partition key, and create the table (if you already have a table created, you can skip this step). 5. Click on the DynamoDB table you created, and then click the **Exports and streams** tab. 6. Click **Turn on** under **DynamoDB stream details**, select **Key attributes only** for the event type, and click **Turn on stream**. diff --git a/examples/azure-functions-cosmosdb-trigger/az_deploy.out b/examples/azure-functions-cosmosdb-trigger/az_deploy.out index db61722bcb..5edea3c11e 100644 --- a/examples/azure-functions-cosmosdb-trigger/az_deploy.out +++ b/examples/azure-functions-cosmosdb-trigger/az_deploy.out @@ -1,9 +1,9 @@ -$ func azure functionapp publish bal-bbe --script-root target/azure_functions +$ func azure functionapp publish --script-root target/azure_functions Getting site publishing info... Creating archive for current directory... Uploading 32.71 MB [##############################################################################] Upload completed successfully. Deployment completed successfully. Syncing triggers... -Functions in bal-bbe: +Functions in : cosmos - [cosmosDBTrigger] 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 d3120a1467..391acddc63 100644 --- a/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md +++ b/examples/azure-functions-cosmosdb-trigger/azure-functions-cosmosdb-trigger.md @@ -48,7 +48,7 @@ Execute the command below to generate the Azure Functions artifacts. ## Deploy the function -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 ``. +Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `` with your respective function app name. ## Invoke the function diff --git a/examples/azure-functions-hello-world/az_deploy.out b/examples/azure-functions-hello-world/az_deploy.out index 849e04e8c1..f037f88bfb 100644 --- a/examples/azure-functions-hello-world/az_deploy.out +++ b/examples/azure-functions-hello-world/az_deploy.out @@ -1,10 +1,10 @@ -$ func azure functionapp publish bal-bbe --script-root target/azure_functions +$ func azure functionapp publish --script-root target/azure_functions Getting site publishing info... Creating archive for current directory... Uploading 32.69 MB [##############################################################################] Upload completed successfully. Deployment completed successfully. Syncing triggers... -Functions in bal-bbe: +Functions in : get-hello - [httpTrigger] Invoke url: https://azurecosmosdbfunctionapp.azurewebsites.net/hello 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 8ea8ec4b9d..4c170509e5 100644 --- a/examples/azure-functions-hello-world/azure-functions-hello-world.md +++ b/examples/azure-functions-hello-world/azure-functions-hello-world.md @@ -34,12 +34,12 @@ Execute the command below to generate the Azure Functions artifacts. ## Deploy the function -Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `bal-bbe` with your respective function app name. +Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `` with your respective function app name. ::: out az_deploy.out ::: ## Invoke the function -Execute the command below to invoke the function by replacing `bal-bbe` with your respective Azure ``. +Execute the command below to invoke the function by replacing `` with your respective function app name. ::: out execute_function.out ::: diff --git a/examples/azure-functions-hello-world/execute_function.out b/examples/azure-functions-hello-world/execute_function.out index 0da4052046..00c4c87894 100644 --- a/examples/azure-functions-hello-world/execute_function.out +++ b/examples/azure-functions-hello-world/execute_function.out @@ -1,2 +1,2 @@ -$ curl https://bal-bbe.azurewebsites.net/hello\?name\=Jack +$ curl https://.azurewebsites.net/hello\?name\=Jack Hello, Jack! diff --git a/examples/azure-functions-http-trigger-with-queue/az_deploy.out b/examples/azure-functions-http-trigger-with-queue/az_deploy.out index c00614799e..b70f73af37 100644 --- a/examples/azure-functions-http-trigger-with-queue/az_deploy.out +++ b/examples/azure-functions-http-trigger-with-queue/az_deploy.out @@ -1,10 +1,10 @@ -$ func azure functionapp publish bal-bbe --script-root target/azure_functions +$ func azure functionapp publish --script-root target/azure_functions Getting site publishing info... Creating archive for current directory... Uploading 32.71 MB [##############################################################################] Upload completed successfully. Deployment completed successfully. Syncing triggers... -Functions in bal-bbe: +Functions in : post-queue - [httpTrigger] Invoke url: https://azurecosmosdbfunctionapp.azurewebsites.net/queue diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal index b07d21ee3e..4a25222428 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.bal @@ -7,10 +7,12 @@ public type Person record { }; service / on new functions:HttpListener() { - resource function post queue(@http:Payload Person person) returns [@functions:HttpOutput http:Created, @functions:QueueOutput {queueName: "people"} string] { + resource function post queue(@http:Payload Person person) returns + [@functions:HttpOutput http:Created, @functions:QueueOutput {queueName: "people"} + string] { http:Created httpRes = { body: person.name + " Added to the Queue!" }; - return [httpRes, person.name + " is " + person.age.toString() + " years old."]; + return [httpRes, string `${person.name} is ${person.age.toString()} years old.`]; } } diff --git a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md index d39beada7f..d1f31cc35d 100644 --- a/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md +++ b/examples/azure-functions-http-trigger-with-queue/azure-functions-http-trigger-with-queue.md @@ -33,7 +33,8 @@ Execute the command below to generate the Azure Functions artifacts. ## Deploy the function -Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `bal-bbe` with your respective function app name. +Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `` with your respective function app name. + ## Invoke the function Execute the command below by replacing `` with your respective function app name to invoke the function. diff --git a/examples/azure-functions-timer-trigger/az_deploy.out b/examples/azure-functions-timer-trigger/az_deploy.out index 644c26ddeb..d23cb3204c 100644 --- a/examples/azure-functions-timer-trigger/az_deploy.out +++ b/examples/azure-functions-timer-trigger/az_deploy.out @@ -1,9 +1,9 @@ -$ func azure functionapp publish bal-bbe --script-root target/azure_functions +$ func azure functionapp publish --script-root target/azure_functions Getting site publishing info... Creating archive for current directory... Uploading 32.7 MB [###############################################################################] Upload completed successfully. Deployment completed successfully. Syncing triggers... -Functions in bal-bbe: +Functions in : timer - [timerTrigger] diff --git a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal index e66992cac1..a775938ba2 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.bal @@ -1,5 +1,5 @@ -import ballerinax/azure.functions; import ballerina/time; +import ballerinax/azure.functions; // This function gets executed every 10 seconds by the Azure Functions app. Once the function is executed, the timer // details will be stored in the selected queue storage for every invocation. @@ -7,7 +7,8 @@ import ballerina/time; listener functions:TimerListener timerListener = new functions:TimerListener(); service "timer" on timerListener { - remote function onTrigger(functions:TimerMetadata metadata) returns @functions:QueueOutput {queueName: "timer-queue"} string|error { + remote function onTrigger(functions:TimerMetadata metadata) returns + @functions:QueueOutput {queueName: "timer-queue"} string|error { time:Utc utc = time:utcNow(); return "Hello from timer: " + time:utcToEmailString(utc); } 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 070f2810e7..b417c1314c 100644 --- a/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md +++ b/examples/azure-functions-timer-trigger/azure-functions-timer-trigger.md @@ -28,7 +28,7 @@ Execute the command below to generate the Azure Functions artifacts. ## Deploy the function -Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `bal-bbe` with your respective function app name to invoke the function. +Execute the Azure CLI command given by the compiler to create and publish the functions by replacing `` with your respective function app name. ## Invoke the function diff --git a/examples/docker-hello-world/docker-hello-world.bal b/examples/docker-hello-world/docker-hello-world.bal index 67c8813ed3..d120a0d143 100644 --- a/examples/docker-hello-world/docker-hello-world.bal +++ b/examples/docker-hello-world/docker-hello-world.bal @@ -1,6 +1,7 @@ import ballerina/http; -// This code is completely focused on the business logic and it does not specify anything related to operations. +// This code is completely focused on the business logic and it does not depend on the deployment. + listener http:Listener helloEP = new(9090); service http:Service /helloWorld on helloEP { diff --git a/examples/kubernetes-hello-world/kubernetes-hello-world.bal b/examples/kubernetes-hello-world/kubernetes-hello-world.bal index aee765e023..739c8159e8 100644 --- a/examples/kubernetes-hello-world/kubernetes-hello-world.bal +++ b/examples/kubernetes-hello-world/kubernetes-hello-world.bal @@ -1,6 +1,7 @@ import ballerina/http; -// This code is completely focused on the business logic and it does not specify anything related to the operations. +// This code is completely focused on the business logic and it does not depend on the deployment. + listener http:Listener helloEP = new(9090); service http:Service /helloWorld on helloEP {