你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

CustomBinding Interface

Implements

java.lang.annotation.Annotation

public interface CustomBinding
implements java.lang.annotation.Annotation

Place this on a parameter to define a custom binding

  • Any native Java types such as int, String, byte[]
  • Nullable values using Optional
  • 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);
 }

Method Summary

Modifier and Type Method and Description
abstract java.lang.String direction()

The variable name used in function.json to specify the direction of the binding: in or out

abstract java.lang.String name()

The variable name used in function.json.

abstract java.lang.String type()

The variable name used in function.json to specify the type of the binding.

Method Details

direction

public abstract 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.

name

public abstract String name()

The variable name used in function.json.

Returns:

The variable name used in function.json.

type

public abstract String type()

The variable name used in function.json to specify the type of the binding.

Returns:

The type of the binding.

Applies to