@Retention(value=RUNTIME) @Target(value=PARAMETER) public @interface TableInput
Place this on a parameter whose value would come from storage table. The parameter type can be one of the following:
The following example shows an HTTP trigger which returned the total count of the items in a table storage:
@FunctionName("getallcount")
public int run(
@HttpTrigger(name = "req",
methods = {"get"},
authLevel = AuthorizationLevel.ANONYMOUS) Object dummyShouldNotBeUsed,
@TableInput(name = "items",
tableName = "mytablename",
partitionKey = "myparkey",
connection = "myconnvarname") MyItem[] items
) {
return items.length;
}HttpTrigger| Modifier and Type | Required Element and Description |
|---|---|
String |
name
The variable name used in function.json.
|
String |
tableName
Defines the name of the storage table to which to bind.
|
| Modifier and Type | Optional Element and Description |
|---|---|
String |
connection
Defines the app setting name that contains the Azure Storage connection string.
|
String |
dataType
Defines how Functions runtime should treat the parameter value.
|
String |
filter
Defines the filter of the storage table to which to bind.
|
String |
partitionKey
Defines the partition key of the storage table to which to bind.
|
String |
rowKey
Defines the row key of the storage table to which to bind.
|
String |
take
Defines the number of rows to be retrieved from the storage table to which to bind.
|
public abstract String name
public abstract String tableName
public abstract String dataType
Defines how Functions runtime should treat the parameter value. Possible values are:
public abstract String partitionKey
public abstract String rowKey
public abstract String filter
public abstract String take
public abstract String connection
Copyright © 2022. All rights reserved.