1

I want to create an Azure Functions with the Java SDK but I have some problem defining the trigger, my code to create the functions app is:

FunctionApp function = azure.appServices().functionApps().manager()
                                .functionApps()
                                .define(appName)
                                .withRegion(region)
                                .withExistingResourceGroup(resourceGroup)
                                .withNewLinuxConsumptionPlan()
                                .withBuiltInImage(FunctionRuntimeStack.JAVA_11)
                                .withLatestRuntimeVersion()
                                .create();

And I want to define an EventHub Trigger but I don't know how I can do that, I see that my function object have the following method:

function.triggerFunction(functionName, payload);

What is the payload format? There is another way to do this?

Regards Victor

Victor
  • 31
  • 3

1 Answers1

0

To make it easier to create Java functions, there are Maven-based tooling and archetypes that use predefined Java templates to help you create projects with a specific function trigger.

Here are some references for you.

Tutorial: Create a function in Java with an Event Hub trigger

Create Azure function with Java and IntelliJ.

Create Azure function with Java and Eclipse.

Create Azure function with Java and VS Code.

Tony Ju
  • 14,891
  • 3
  • 17
  • 31
  • Hi @Tony, I need to create a Python Azure Functions using the Azure Java SDK, my problem is that the SDK is not well documented and I don't know the parameters meaning. – Victor Jun 28 '20 at 08:58