Skip to content

Commit d2eab5c

Browse files
authored
Binding name updates (#139)
1 parent eb70e09 commit d2eab5c

File tree

3 files changed

+325
-325
lines changed

3 files changed

+325
-325
lines changed

azure/functions/decorators/function_app.py

Lines changed: 106 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -923,17 +923,17 @@ def decorator():
923923
class BindingApi(DecoratorApi, ABC):
924924
"""Interface to extend for using existing binding decorator functions."""
925925

926-
def write_service_bus_queue(self,
927-
arg_name: str,
928-
connection: str,
929-
queue_name: str,
930-
data_type: Optional[
931-
Union[DataType, str]] = None,
932-
access_rights: Optional[Union[
933-
AccessRights, str]] = None,
934-
**kwargs) -> \
926+
def service_bus_queue_output(self,
927+
arg_name: str,
928+
connection: str,
929+
queue_name: str,
930+
data_type: Optional[
931+
Union[DataType, str]] = None,
932+
access_rights: Optional[Union[
933+
AccessRights, str]] = None,
934+
**kwargs) -> \
935935
Callable:
936-
"""The write_service_bus_queue decorator adds
936+
"""The service_bus_queue_output decorator adds
937937
:class:`ServiceBusQueueOutput` to the :class:`FunctionBuilder` object
938938
for building :class:`Function` object used in worker function
939939
indexing model. This is equivalent to defining ServiceBusQueueOutput
@@ -974,18 +974,18 @@ def decorator():
974974

975975
return wrap
976976

977-
def write_service_bus_topic(self,
978-
arg_name: str,
979-
connection: str,
980-
topic_name: str,
981-
subscription_name: Optional[str] = None,
982-
data_type: Optional[
983-
Union[DataType, str]] = None,
984-
access_rights: Optional[Union[
985-
AccessRights, str]] = None,
986-
**kwargs) -> \
977+
def service_bus_topic_output(self,
978+
arg_name: str,
979+
connection: str,
980+
topic_name: str,
981+
subscription_name: Optional[str] = None,
982+
data_type: Optional[
983+
Union[DataType, str]] = None,
984+
access_rights: Optional[Union[
985+
AccessRights, str]] = None,
986+
**kwargs) -> \
987987
Callable:
988-
"""The write_service_bus_topic decorator adds
988+
"""The service_bus_topic_output decorator adds
989989
:class:`ServiceBusTopicOutput` to the :class:`FunctionBuilder` object
990990
for building :class:`Function` object used in worker function
991991
indexing model. This is equivalent to defining ServiceBusTopicOutput
@@ -1029,13 +1029,13 @@ def decorator():
10291029

10301030
return wrap
10311031

1032-
def write_queue(self,
1033-
arg_name: str,
1034-
queue_name: str,
1035-
connection: str,
1036-
data_type: Optional[DataType] = None,
1037-
**kwargs) -> Callable:
1038-
"""The write_queue decorator adds :class:`QueueOutput` to the
1032+
def queue_output(self,
1033+
arg_name: str,
1034+
queue_name: str,
1035+
connection: str,
1036+
data_type: Optional[DataType] = None,
1037+
**kwargs) -> Callable:
1038+
"""The queue_output decorator adds :class:`QueueOutput` to the
10391039
:class:`FunctionBuilder` object
10401040
for building :class:`Function` object used in worker function
10411041
indexing model. This is equivalent to defining QueueOutput
@@ -1075,15 +1075,15 @@ def decorator():
10751075

10761076
return wrap
10771077

1078-
def write_event_hub_message(self,
1079-
arg_name: str,
1080-
connection: str,
1081-
event_hub_name: str,
1082-
data_type: Optional[
1083-
Union[DataType, str]] = None,
1084-
**kwargs) -> \
1078+
def event_hub_output(self,
1079+
arg_name: str,
1080+
connection: str,
1081+
event_hub_name: str,
1082+
data_type: Optional[
1083+
Union[DataType, str]] = None,
1084+
**kwargs) -> \
10851085
Callable:
1086-
"""The write_event_hub_message decorator adds
1086+
"""The event_hub_output decorator adds
10871087
:class:`EventHubOutput` to the :class:`FunctionBuilder` object
10881088
for building :class:`Function` object used in worker function
10891089
indexing model. This is equivalent to defining EventHubOutput
@@ -1124,22 +1124,22 @@ def decorator():
11241124

11251125
return wrap
11261126

1127-
def write_cosmos_db_documents(self,
1128-
arg_name: str,
1129-
database_name: str,
1130-
collection_name: str,
1131-
connection_string_setting: str,
1132-
create_if_not_exists: Optional[bool] = None,
1133-
partition_key: Optional[str] = None,
1134-
collection_throughput: Optional[int] = None,
1135-
use_multiple_write_locations: Optional[
1136-
bool] = None,
1137-
preferred_locations: Optional[str] = None,
1138-
data_type: Optional[
1139-
Union[DataType, str]] = None,
1140-
**kwargs) \
1127+
def cosmos_db_output(self,
1128+
arg_name: str,
1129+
database_name: str,
1130+
collection_name: str,
1131+
connection_string_setting: str,
1132+
create_if_not_exists: Optional[bool] = None,
1133+
partition_key: Optional[str] = None,
1134+
collection_throughput: Optional[int] = None,
1135+
use_multiple_write_locations: Optional[
1136+
bool] = None,
1137+
preferred_locations: Optional[str] = None,
1138+
data_type: Optional[
1139+
Union[DataType, str]] = None,
1140+
**kwargs) \
11411141
-> Callable:
1142-
"""The write_cosmos_db_documents decorator adds
1142+
"""The cosmos_db_output decorator adds
11431143
:class:`CosmosDBOutput` to the :class:`FunctionBuilder` object
11441144
for building :class:`Function` object used in worker function
11451145
indexing model. This is equivalent to defining CosmosDBOutput
@@ -1199,19 +1199,19 @@ def decorator():
11991199

12001200
return wrap
12011201

1202-
def read_cosmos_db_documents(self,
1203-
arg_name: str,
1204-
database_name: str,
1205-
collection_name: str,
1206-
connection_string_setting: str,
1207-
id: Optional[str] = None,
1208-
sql_query: Optional[str] = None,
1209-
partition_key: Optional[str] = None,
1210-
data_type: Optional[
1211-
Union[DataType, str]] = None,
1212-
**kwargs) \
1202+
def cosmos_db_input(self,
1203+
arg_name: str,
1204+
database_name: str,
1205+
collection_name: str,
1206+
connection_string_setting: str,
1207+
id: Optional[str] = None,
1208+
sql_query: Optional[str] = None,
1209+
partition_key: Optional[str] = None,
1210+
data_type: Optional[
1211+
Union[DataType, str]] = None,
1212+
**kwargs) \
12131213
-> Callable:
1214-
"""The read_cosmos_db_documents decorator adds
1214+
"""The cosmos_db_input decorator adds
12151215
:class:`CosmosDBInput` to the :class:`FunctionBuilder` object
12161216
for building :class:`Function` object used in worker function
12171217
indexing model. This is equivalent to defining CosmosDBInput
@@ -1262,14 +1262,14 @@ def decorator():
12621262

12631263
return wrap
12641264

1265-
def read_blob(self,
1266-
arg_name: str,
1267-
path: str,
1268-
connection: str,
1269-
data_type: Optional[DataType] = None,
1270-
**kwargs) -> Callable:
1265+
def blob_input(self,
1266+
arg_name: str,
1267+
path: str,
1268+
connection: str,
1269+
data_type: Optional[DataType] = None,
1270+
**kwargs) -> Callable:
12711271
"""
1272-
The read_blob decorator adds :class:`BlobInput` to the
1272+
The blob_input decorator adds :class:`BlobInput` to the
12731273
:class:`FunctionBuilder` object
12741274
for building :class:`Function` object used in worker function
12751275
indexing model. This is equivalent to defining BlobInput
@@ -1310,14 +1310,14 @@ def decorator():
13101310

13111311
return wrap
13121312

1313-
def write_blob(self,
1314-
arg_name: str,
1315-
path: str,
1316-
connection: str,
1317-
data_type: Optional[DataType] = None,
1318-
**kwargs) -> Callable:
1313+
def blob_output(self,
1314+
arg_name: str,
1315+
path: str,
1316+
connection: str,
1317+
data_type: Optional[DataType] = None,
1318+
**kwargs) -> Callable:
13191319
"""
1320-
The write_blob decorator adds :class:`BlobOutput` to the
1320+
The blob_output decorator adds :class:`BlobOutput` to the
13211321
:class:`FunctionBuilder` object
13221322
for building :class:`Function` object used in worker function
13231323
indexing model. This is equivalent to defining BlobOutput
@@ -1357,15 +1357,15 @@ def decorator():
13571357

13581358
return wrap
13591359

1360-
def write_event_grid(self,
1361-
arg_name: str,
1362-
topic_endpoint_uri: str,
1363-
topic_key_setting: str,
1364-
data_type: Optional[
1365-
Union[DataType, str]] = None,
1366-
**kwargs) -> Callable:
1360+
def event_grid_output(self,
1361+
arg_name: str,
1362+
topic_endpoint_uri: str,
1363+
topic_key_setting: str,
1364+
data_type: Optional[
1365+
Union[DataType, str]] = None,
1366+
**kwargs) -> Callable:
13671367
"""
1368-
The write_event_grid decorator adds
1368+
The event_grid_output decorator adds
13691369
:class:`EventGridOutput`
13701370
to the :class:`FunctionBuilder` object
13711371
for building :class:`Function` object used in worker function
@@ -1405,18 +1405,18 @@ def decorator():
14051405

14061406
return wrap
14071407

1408-
def read_table(self,
1409-
arg_name: str,
1410-
connection: str,
1411-
table_name: str,
1412-
row_key: Optional[str] = None,
1413-
partition_key: Optional[str] = None,
1414-
take: Optional[int] = None,
1415-
filter: Optional[str] = None,
1416-
data_type: Optional[
1417-
Union[DataType, str]] = None) -> Callable:
1408+
def table_input(self,
1409+
arg_name: str,
1410+
connection: str,
1411+
table_name: str,
1412+
row_key: Optional[str] = None,
1413+
partition_key: Optional[str] = None,
1414+
take: Optional[int] = None,
1415+
filter: Optional[str] = None,
1416+
data_type: Optional[
1417+
Union[DataType, str]] = None) -> Callable:
14181418
"""
1419-
The read_table decorator adds :class:`TableInput` to the
1419+
The table_input decorator adds :class:`TableInput` to the
14201420
:class:`FunctionBuilder` object
14211421
for building :class:`Function` object used in worker function
14221422
indexing model. This is equivalent to defining TableInput
@@ -1441,6 +1441,7 @@ def read_table(self,
14411441
parameter value.
14421442
:return: Decorator function.
14431443
"""
1444+
14441445
@self._configure_function_builder
14451446
def wrap(fb):
14461447
def decorator():
@@ -1461,17 +1462,16 @@ def decorator():
14611462

14621463
return wrap
14631464

1464-
def write_table(self,
1465-
arg_name: str,
1466-
connection: str,
1467-
table_name: str,
1468-
row_key: Optional[str] = None,
1469-
partition_key: Optional[str] = None,
1470-
data_type: Optional[
1471-
Union[DataType, str]] = None) -> Callable:
1472-
1465+
def table_output(self,
1466+
arg_name: str,
1467+
connection: str,
1468+
table_name: str,
1469+
row_key: Optional[str] = None,
1470+
partition_key: Optional[str] = None,
1471+
data_type: Optional[
1472+
Union[DataType, str]] = None) -> Callable:
14731473
"""
1474-
The write_table decorator adds :class:`TableOutput` to the
1474+
The table_output decorator adds :class:`TableOutput` to the
14751475
:class:`FunctionBuilder` object
14761476
for building :class:`Function` object used in worker function
14771477
indexing model. This is equivalent to defining TableOutput

0 commit comments

Comments
 (0)