Annotation Type CustomBinding


  • @Retention(RUNTIME)
    public @interface CustomBinding

    Place this on a parameter to define a custom binding

    • Any native Java types such as int, String, byte[]
    • Nullable values using Optional<T>
    • Any POJO type

    The following example shows a Java function that uses a customBinding:

    @FunctionName("CustomBindingTriggerSample")
     public void logCustomTriggerInput(
        @CustomBinding(direction = "in", name = "inputParameterName", type = "customBindingTrigger") String customTriggerInput
        final ExecutionContext context
     ) {
         context.getLogger().info(customTriggerInput);
     }
    Since:
    1.0.0
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String direction
      The variable name used in function.json to specify the direction of the binding: in or out
      java.lang.String name
      The variable name used in function.json.
      java.lang.String type
      The variable name used in function.json to specify the type of the binding.
    • Element Detail

      • name

        java.lang.String name
        The variable name used in function.json.
        Returns:
        The variable name used in function.json.
      • type

        java.lang.String type
        The variable name used in function.json to specify the type of the binding.
        Returns:
        The type of the binding.
      • direction

        java.lang.String direction
        The variable name used in function.json to specify the direction of the binding: in or out
        Returns:
        The direction of the biding.