@@ -20,7 +20,7 @@ def list(self, queries = None, search = None):
20
20
'content-type' : 'application/json' ,
21
21
}, api_params )
22
22
23
- def create (self , function_id , name , runtime , execute = None , events = None , schedule = None , timeout = None , enabled = None , logging = None , entrypoint = None , commands = None , scopes = None , installation_id = None , provider_repository_id = None , provider_branch = None , provider_silent_mode = None , provider_root_directory = None , template_repository = None , template_owner = None , template_root_directory = None , template_version = None ):
23
+ def create (self , function_id , name , runtime , execute = None , events = None , schedule = None , timeout = None , enabled = None , logging = None , entrypoint = None , commands = None , scopes = None , installation_id = None , provider_repository_id = None , provider_branch = None , provider_silent_mode = None , provider_root_directory = None , template_repository = None , template_owner = None , template_root_directory = None , template_version = None , specification = None ):
24
24
"""Create function"""
25
25
26
26
@@ -57,6 +57,7 @@ def create(self, function_id, name, runtime, execute = None, events = None, sche
57
57
api_params ['templateOwner' ] = template_owner
58
58
api_params ['templateRootDirectory' ] = template_root_directory
59
59
api_params ['templateVersion' ] = template_version
60
+ api_params ['specification' ] = specification
60
61
61
62
return self .client .call ('post' , api_path , {
62
63
'content-type' : 'application/json' ,
@@ -73,6 +74,17 @@ def list_runtimes(self):
73
74
'content-type' : 'application/json' ,
74
75
}, api_params )
75
76
77
+ def list_specifications (self ):
78
+ """List available function runtime specifications"""
79
+
80
+
81
+ api_path = '/functions/specifications'
82
+ api_params = {}
83
+
84
+ return self .client .call ('get' , api_path , {
85
+ 'content-type' : 'application/json' ,
86
+ }, api_params )
87
+
76
88
def list_templates (self , runtimes = None , use_cases = None , limit = None , offset = None ):
77
89
"""List function templates"""
78
90
@@ -121,7 +133,7 @@ def get(self, function_id):
121
133
'content-type' : 'application/json' ,
122
134
}, api_params )
123
135
124
- def update (self , function_id , name , runtime = None , execute = None , events = None , schedule = None , timeout = None , enabled = None , logging = None , entrypoint = None , commands = None , scopes = None , installation_id = None , provider_repository_id = None , provider_branch = None , provider_silent_mode = None , provider_root_directory = None ):
136
+ def update (self , function_id , name , runtime = None , execute = None , events = None , schedule = None , timeout = None , enabled = None , logging = None , entrypoint = None , commands = None , scopes = None , installation_id = None , provider_repository_id = None , provider_branch = None , provider_silent_mode = None , provider_root_directory = None , specification = None ):
125
137
"""Update function"""
126
138
127
139
@@ -151,6 +163,7 @@ def update(self, function_id, name, runtime = None, execute = None, events = Non
151
163
api_params ['providerBranch' ] = provider_branch
152
164
api_params ['providerSilentMode' ] = provider_silent_mode
153
165
api_params ['providerRootDirectory' ] = provider_root_directory
166
+ api_params ['specification' ] = specification
154
167
155
168
return self .client .call ('put' , api_path , {
156
169
'content-type' : 'application/json' ,
@@ -360,7 +373,7 @@ def list_executions(self, function_id, queries = None, search = None):
360
373
'content-type' : 'application/json' ,
361
374
}, api_params )
362
375
363
- def create_execution (self , function_id , body = None , xasync = None , path = None , method = None , headers = None , scheduled_at = None , on_progress = None ):
376
+ def create_execution (self , function_id , body = None , xasync = None , path = None , method = None , headers = None , scheduled_at = None ):
364
377
"""Create execution"""
365
378
366
379
@@ -372,18 +385,15 @@ def create_execution(self, function_id, body = None, xasync = None, path = None,
372
385
api_path = api_path .replace ('{functionId}' , function_id )
373
386
374
387
api_params ['body' ] = body
375
- api_params ['async' ] = str ( xasync ). lower () if type ( xasync ) is bool else xasync
388
+ api_params ['async' ] = xasync
376
389
api_params ['path' ] = path
377
390
api_params ['method' ] = method
378
- api_params ['headers' ] = str ( headers ). lower () if type ( headers ) is bool else headers
391
+ api_params ['headers' ] = headers
379
392
api_params ['scheduledAt' ] = scheduled_at
380
393
381
-
382
- upload_id = ''
383
-
384
- return self .client .chunked_upload (api_path , {
385
- 'content-type' : 'multipart/form-data' ,
386
- }, api_params , param_name , on_progress , upload_id )
394
+ return self .client .call ('post' , api_path , {
395
+ 'content-type' : 'application/json' ,
396
+ }, api_params )
387
397
388
398
def get_execution (self , function_id , execution_id ):
389
399
"""Get execution"""
0 commit comments