Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 926 Bytes

functions-add-storage-binding-java-code.md

File metadata and controls

17 lines (12 loc) · 926 Bytes
author ms.service ms.topic ms.date ms.author
ggailey777
azure-functions
include
03/18/2020
glenga

Now, you can use the new msg parameter to write to the output binding from your function code. Add the following line of code before the success response to add the value of name to the msg output binding.

:::code language="java" source="~/functions-quickstart-java/functions-add-output-binding-storage-queue/src/main/java/com/function/Function.java" range="33":::

When you use an output binding, you don't have to use the Azure Storage SDK code for authentication, getting a queue reference, or writing data. The Functions runtime and queue output binding do those tasks for you.

Your run method should now look like the following example:

:::code language="java" source="~/functions-quickstart-java/functions-add-output-binding-storage-queue/src/main/java/com/function/Function.java" range="16-37":::