你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Binding Class
Abstract binding class which captures common attributes and functions. get_dict_repr can auto generate the function.json for every binding, the only restriction is ENSURE init parameter names of any binding class are snake case form of corresponding attribute in function.json when new binding classes are created. Ref: https://aka.ms/azure-function-binding-http
Constructor
Binding(name: str, direction: BindingDirection, data_type: DataType | None = None, type: str | None = None)
Parameters
Name | Description |
---|---|
name
Required
|
|
direction
Required
|
|
data_type
|
Default value: None
|
type
|
Default value: None
|
Methods
get_binding_name | |
get_dict_repr |
Build a dictionary of a particular binding. The keys are camel cased binding field names defined in init_params list and Binding class. This method is invoked in function <xref:azure.functions.decorators.core.Binding.get_raw_bindings> of class <xref:azure.functions.decorators.core.Function> to generate json dict for each binding. |
get_binding_name
abstract static get_binding_name() -> str
get_dict_repr
Build a dictionary of a particular binding. The keys are camel cased binding field names defined in init_params list and Binding class.
This method is invoked in function <xref:azure.functions.decorators.core.Binding.get_raw_bindings> of class <xref:azure.functions.decorators.core.Function> to generate json dict for each binding.
get_dict_repr() -> Dict
Returns
Type | Description |
---|---|
Dictionary representation of the binding. |
Attributes
data_type
direction
EXCLUDED_INIT_PARAMS
EXCLUDED_INIT_PARAMS = {'data_type', 'direction', 'kwargs', 'self', 'type'}