Skip to content

Commit 39b43b5

Browse files
author
BitsAdmin
committed
Merge branch 'vefaas-Python-2024-06-06-online-1381-2025_07_22_11_23_43' into 'integration_2025-07-24_1018981540354'
feat: [development task] vefaas-1381-Python (1482781) See merge request iaasng/volcengine-python-sdk!716
2 parents 3fdf84b + 67d233b commit 39b43b5

18 files changed

+1935
-7
lines changed

volcenginesdkvefaas/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@
5252
from volcenginesdkvefaas.models.env_for_list_revisions_output import EnvForListRevisionsOutput
5353
from volcenginesdkvefaas.models.env_for_update_function_input import EnvForUpdateFunctionInput
5454
from volcenginesdkvefaas.models.env_for_update_function_output import EnvForUpdateFunctionOutput
55+
from volcenginesdkvefaas.models.execution_record_for_list_async_tasks_output import ExecutionRecordForListAsyncTasksOutput
56+
from volcenginesdkvefaas.models.filter_for_list_async_tasks_input import FilterForListAsyncTasksInput
5557
from volcenginesdkvefaas.models.filter_for_list_functions_input import FilterForListFunctionsInput
5658
from volcenginesdkvefaas.models.filter_for_list_release_records_input import FilterForListReleaseRecordsInput
5759
from volcenginesdkvefaas.models.filter_for_list_revisions_input import FilterForListRevisionsInput
@@ -80,6 +82,7 @@
8082
from volcenginesdkvefaas.models.health_check_config_for_get_revision_output import HealthCheckConfigForGetRevisionOutput
8183
from volcenginesdkvefaas.models.health_check_config_for_list_revisions_output import HealthCheckConfigForListRevisionsOutput
8284
from volcenginesdkvefaas.models.instance_tos_mount_config_for_create_sandbox_input import InstanceTosMountConfigForCreateSandboxInput
85+
from volcenginesdkvefaas.models.item_for_list_async_tasks_output import ItemForListAsyncTasksOutput
8386
from volcenginesdkvefaas.models.item_for_list_function_instances_output import ItemForListFunctionInstancesOutput
8487
from volcenginesdkvefaas.models.item_for_list_functions_output import ItemForListFunctionsOutput
8588
from volcenginesdkvefaas.models.item_for_list_release_records_output import ItemForListReleaseRecordsOutput
@@ -88,6 +91,9 @@
8891
from volcenginesdkvefaas.models.kafka_credentials_for_create_kafka_trigger_input import KafkaCredentialsForCreateKafkaTriggerInput
8992
from volcenginesdkvefaas.models.kill_sandbox_request import KillSandboxRequest
9093
from volcenginesdkvefaas.models.kill_sandbox_response import KillSandboxResponse
94+
from volcenginesdkvefaas.models.labels_for_list_function_instances_output import LabelsForListFunctionInstancesOutput
95+
from volcenginesdkvefaas.models.list_async_tasks_request import ListAsyncTasksRequest
96+
from volcenginesdkvefaas.models.list_async_tasks_response import ListAsyncTasksResponse
9197
from volcenginesdkvefaas.models.list_function_elastic_scale_strategy_request import ListFunctionElasticScaleStrategyRequest
9298
from volcenginesdkvefaas.models.list_function_elastic_scale_strategy_response import ListFunctionElasticScaleStrategyResponse
9399
from volcenginesdkvefaas.models.list_function_instances_request import ListFunctionInstancesRequest
@@ -129,6 +135,7 @@
129135
from volcenginesdkvefaas.models.nas_storage_for_list_revisions_output import NasStorageForListRevisionsOutput
130136
from volcenginesdkvefaas.models.nas_storage_for_update_function_input import NasStorageForUpdateFunctionInput
131137
from volcenginesdkvefaas.models.nas_storage_for_update_function_output import NasStorageForUpdateFunctionOutput
138+
from volcenginesdkvefaas.models.order_by_for_list_async_tasks_input import OrderByForListAsyncTasksInput
132139
from volcenginesdkvefaas.models.order_by_for_list_release_records_input import OrderByForListReleaseRecordsInput
133140
from volcenginesdkvefaas.models.probe_handler_for_get_revision_output import ProbeHandlerForGetRevisionOutput
134141
from volcenginesdkvefaas.models.probe_handler_for_list_revisions_output import ProbeHandlerForListRevisionsOutput
@@ -148,6 +155,7 @@
148155
from volcenginesdkvefaas.models.tcp_socket_for_list_revisions_output import TCPSocketForListRevisionsOutput
149156
from volcenginesdkvefaas.models.tag_filter_for_list_functions_input import TagFilterForListFunctionsInput
150157
from volcenginesdkvefaas.models.tag_for_create_function_input import TagForCreateFunctionInput
158+
from volcenginesdkvefaas.models.tag_for_create_function_output import TagForCreateFunctionOutput
151159
from volcenginesdkvefaas.models.tag_for_list_functions_output import TagForListFunctionsOutput
152160
from volcenginesdkvefaas.models.tag_for_update_function_input import TagForUpdateFunctionInput
153161
from volcenginesdkvefaas.models.tag_for_update_function_output import TagForUpdateFunctionOutput

volcenginesdkvefaas/api/vefaas_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,6 +1779,103 @@ def kill_sandbox_with_http_info(self, body, **kwargs): # noqa: E501
17791779
_request_timeout=params.get('_request_timeout'),
17801780
collection_formats=collection_formats)
17811781

1782+
def list_async_tasks(self, body, **kwargs): # noqa: E501
1783+
"""list_async_tasks # noqa: E501
1784+
1785+
This method makes a synchronous HTTP request by default. To make an
1786+
asynchronous HTTP request, please pass async_req=True
1787+
>>> thread = api.list_async_tasks(body, async_req=True)
1788+
>>> result = thread.get()
1789+
1790+
:param async_req bool
1791+
:param ListAsyncTasksRequest body: (required)
1792+
:return: ListAsyncTasksResponse
1793+
If the method is called asynchronously,
1794+
returns the request thread.
1795+
"""
1796+
kwargs['_return_http_data_only'] = True
1797+
if kwargs.get('async_req'):
1798+
return self.list_async_tasks_with_http_info(body, **kwargs) # noqa: E501
1799+
else:
1800+
(data) = self.list_async_tasks_with_http_info(body, **kwargs) # noqa: E501
1801+
return data
1802+
1803+
def list_async_tasks_with_http_info(self, body, **kwargs): # noqa: E501
1804+
"""list_async_tasks # noqa: E501
1805+
1806+
This method makes a synchronous HTTP request by default. To make an
1807+
asynchronous HTTP request, please pass async_req=True
1808+
>>> thread = api.list_async_tasks_with_http_info(body, async_req=True)
1809+
>>> result = thread.get()
1810+
1811+
:param async_req bool
1812+
:param ListAsyncTasksRequest body: (required)
1813+
:return: ListAsyncTasksResponse
1814+
If the method is called asynchronously,
1815+
returns the request thread.
1816+
"""
1817+
1818+
all_params = ['body'] # noqa: E501
1819+
all_params.append('async_req')
1820+
all_params.append('_return_http_data_only')
1821+
all_params.append('_preload_content')
1822+
all_params.append('_request_timeout')
1823+
1824+
params = locals()
1825+
for key, val in six.iteritems(params['kwargs']):
1826+
if key not in all_params:
1827+
raise TypeError(
1828+
"Got an unexpected keyword argument '%s'"
1829+
" to method list_async_tasks" % key
1830+
)
1831+
params[key] = val
1832+
del params['kwargs']
1833+
# verify the required parameter 'body' is set
1834+
if self.api_client.client_side_validation and ('body' not in params or
1835+
params['body'] is None): # noqa: E501
1836+
raise ValueError("Missing the required parameter `body` when calling `list_async_tasks`") # noqa: E501
1837+
1838+
collection_formats = {}
1839+
1840+
path_params = {}
1841+
1842+
query_params = []
1843+
1844+
header_params = {}
1845+
1846+
form_params = []
1847+
local_var_files = {}
1848+
1849+
body_params = None
1850+
if 'body' in params:
1851+
body_params = params['body']
1852+
# HTTP header `Accept`
1853+
header_params['Accept'] = self.api_client.select_header_accept(
1854+
['application/json']) # noqa: E501
1855+
1856+
# HTTP header `Content-Type`
1857+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1858+
['application/json']) # noqa: E501
1859+
1860+
# Authentication setting
1861+
auth_settings = ['volcengineSign'] # noqa: E501
1862+
1863+
return self.api_client.call_api(
1864+
'/ListAsyncTasks/2024-06-06/vefaas/post/application_json/', 'POST',
1865+
path_params,
1866+
query_params,
1867+
header_params,
1868+
body=body_params,
1869+
post_params=form_params,
1870+
files=local_var_files,
1871+
response_type='ListAsyncTasksResponse', # noqa: E501
1872+
auth_settings=auth_settings,
1873+
async_req=params.get('async_req'),
1874+
_return_http_data_only=params.get('_return_http_data_only'),
1875+
_preload_content=params.get('_preload_content', True),
1876+
_request_timeout=params.get('_request_timeout'),
1877+
collection_formats=collection_formats)
1878+
17821879
def list_function_elastic_scale_strategy(self, body, **kwargs): # noqa: E501
17831880
"""list_function_elastic_scale_strategy # noqa: E501
17841881

volcenginesdkvefaas/models/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
from volcenginesdkvefaas.models.env_for_list_revisions_output import EnvForListRevisionsOutput
4949
from volcenginesdkvefaas.models.env_for_update_function_input import EnvForUpdateFunctionInput
5050
from volcenginesdkvefaas.models.env_for_update_function_output import EnvForUpdateFunctionOutput
51+
from volcenginesdkvefaas.models.execution_record_for_list_async_tasks_output import ExecutionRecordForListAsyncTasksOutput
52+
from volcenginesdkvefaas.models.filter_for_list_async_tasks_input import FilterForListAsyncTasksInput
5153
from volcenginesdkvefaas.models.filter_for_list_functions_input import FilterForListFunctionsInput
5254
from volcenginesdkvefaas.models.filter_for_list_release_records_input import FilterForListReleaseRecordsInput
5355
from volcenginesdkvefaas.models.filter_for_list_revisions_input import FilterForListRevisionsInput
@@ -76,6 +78,7 @@
7678
from volcenginesdkvefaas.models.health_check_config_for_get_revision_output import HealthCheckConfigForGetRevisionOutput
7779
from volcenginesdkvefaas.models.health_check_config_for_list_revisions_output import HealthCheckConfigForListRevisionsOutput
7880
from volcenginesdkvefaas.models.instance_tos_mount_config_for_create_sandbox_input import InstanceTosMountConfigForCreateSandboxInput
81+
from volcenginesdkvefaas.models.item_for_list_async_tasks_output import ItemForListAsyncTasksOutput
7982
from volcenginesdkvefaas.models.item_for_list_function_instances_output import ItemForListFunctionInstancesOutput
8083
from volcenginesdkvefaas.models.item_for_list_functions_output import ItemForListFunctionsOutput
8184
from volcenginesdkvefaas.models.item_for_list_release_records_output import ItemForListReleaseRecordsOutput
@@ -84,6 +87,9 @@
8487
from volcenginesdkvefaas.models.kafka_credentials_for_create_kafka_trigger_input import KafkaCredentialsForCreateKafkaTriggerInput
8588
from volcenginesdkvefaas.models.kill_sandbox_request import KillSandboxRequest
8689
from volcenginesdkvefaas.models.kill_sandbox_response import KillSandboxResponse
90+
from volcenginesdkvefaas.models.labels_for_list_function_instances_output import LabelsForListFunctionInstancesOutput
91+
from volcenginesdkvefaas.models.list_async_tasks_request import ListAsyncTasksRequest
92+
from volcenginesdkvefaas.models.list_async_tasks_response import ListAsyncTasksResponse
8793
from volcenginesdkvefaas.models.list_function_elastic_scale_strategy_request import ListFunctionElasticScaleStrategyRequest
8894
from volcenginesdkvefaas.models.list_function_elastic_scale_strategy_response import ListFunctionElasticScaleStrategyResponse
8995
from volcenginesdkvefaas.models.list_function_instances_request import ListFunctionInstancesRequest
@@ -125,6 +131,7 @@
125131
from volcenginesdkvefaas.models.nas_storage_for_list_revisions_output import NasStorageForListRevisionsOutput
126132
from volcenginesdkvefaas.models.nas_storage_for_update_function_input import NasStorageForUpdateFunctionInput
127133
from volcenginesdkvefaas.models.nas_storage_for_update_function_output import NasStorageForUpdateFunctionOutput
134+
from volcenginesdkvefaas.models.order_by_for_list_async_tasks_input import OrderByForListAsyncTasksInput
128135
from volcenginesdkvefaas.models.order_by_for_list_release_records_input import OrderByForListReleaseRecordsInput
129136
from volcenginesdkvefaas.models.probe_handler_for_get_revision_output import ProbeHandlerForGetRevisionOutput
130137
from volcenginesdkvefaas.models.probe_handler_for_list_revisions_output import ProbeHandlerForListRevisionsOutput
@@ -144,6 +151,7 @@
144151
from volcenginesdkvefaas.models.tcp_socket_for_list_revisions_output import TCPSocketForListRevisionsOutput
145152
from volcenginesdkvefaas.models.tag_filter_for_list_functions_input import TagFilterForListFunctionsInput
146153
from volcenginesdkvefaas.models.tag_for_create_function_input import TagForCreateFunctionInput
154+
from volcenginesdkvefaas.models.tag_for_create_function_output import TagForCreateFunctionOutput
147155
from volcenginesdkvefaas.models.tag_for_list_functions_output import TagForListFunctionsOutput
148156
from volcenginesdkvefaas.models.tag_for_update_function_input import TagForUpdateFunctionInput
149157
from volcenginesdkvefaas.models.tag_for_update_function_output import TagForUpdateFunctionOutput

volcenginesdkvefaas/models/create_function_request.py

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ class CreateFunctionRequest(object):
3333
and the value is json key in definition.
3434
"""
3535
swagger_types = {
36+
'cell': 'str',
3637
'command': 'str',
38+
'cpu_milli': 'int',
3739
'cpu_strategy': 'str',
3840
'description': 'str',
3941
'envs': 'list[EnvForCreateFunctionInput]',
@@ -57,7 +59,9 @@ class CreateFunctionRequest(object):
5759
}
5860

5961
attribute_map = {
62+
'cell': 'Cell',
6063
'command': 'Command',
64+
'cpu_milli': 'CpuMilli',
6165
'cpu_strategy': 'CpuStrategy',
6266
'description': 'Description',
6367
'envs': 'Envs',
@@ -80,13 +84,15 @@ class CreateFunctionRequest(object):
8084
'vpc_config': 'VpcConfig'
8185
}
8286

83-
def __init__(self, command=None, cpu_strategy=None, description=None, envs=None, exclusive_mode=None, initializer_sec=None, instance_type=None, max_concurrency=None, memory_mb=None, name=None, nas_storage=None, project_name=None, request_timeout=None, runtime=None, source=None, source_access_config=None, source_type=None, tags=None, tls_config=None, tos_mount_config=None, vpc_config=None, _configuration=None): # noqa: E501
87+
def __init__(self, cell=None, command=None, cpu_milli=None, cpu_strategy=None, description=None, envs=None, exclusive_mode=None, initializer_sec=None, instance_type=None, max_concurrency=None, memory_mb=None, name=None, nas_storage=None, project_name=None, request_timeout=None, runtime=None, source=None, source_access_config=None, source_type=None, tags=None, tls_config=None, tos_mount_config=None, vpc_config=None, _configuration=None): # noqa: E501
8488
"""CreateFunctionRequest - a model defined in Swagger""" # noqa: E501
8589
if _configuration is None:
8690
_configuration = Configuration()
8791
self._configuration = _configuration
8892

93+
self._cell = None
8994
self._command = None
95+
self._cpu_milli = None
9096
self._cpu_strategy = None
9197
self._description = None
9298
self._envs = None
@@ -109,8 +115,12 @@ def __init__(self, command=None, cpu_strategy=None, description=None, envs=None,
109115
self._vpc_config = None
110116
self.discriminator = None
111117

118+
if cell is not None:
119+
self.cell = cell
112120
if command is not None:
113121
self.command = command
122+
if cpu_milli is not None:
123+
self.cpu_milli = cpu_milli
114124
if cpu_strategy is not None:
115125
self.cpu_strategy = cpu_strategy
116126
if description is not None:
@@ -150,6 +160,27 @@ def __init__(self, command=None, cpu_strategy=None, description=None, envs=None,
150160
if vpc_config is not None:
151161
self.vpc_config = vpc_config
152162

163+
@property
164+
def cell(self):
165+
"""Gets the cell of this CreateFunctionRequest. # noqa: E501
166+
167+
168+
:return: The cell of this CreateFunctionRequest. # noqa: E501
169+
:rtype: str
170+
"""
171+
return self._cell
172+
173+
@cell.setter
174+
def cell(self, cell):
175+
"""Sets the cell of this CreateFunctionRequest.
176+
177+
178+
:param cell: The cell of this CreateFunctionRequest. # noqa: E501
179+
:type: str
180+
"""
181+
182+
self._cell = cell
183+
153184
@property
154185
def command(self):
155186
"""Gets the command of this CreateFunctionRequest. # noqa: E501
@@ -171,6 +202,27 @@ def command(self, command):
171202

172203
self._command = command
173204

205+
@property
206+
def cpu_milli(self):
207+
"""Gets the cpu_milli of this CreateFunctionRequest. # noqa: E501
208+
209+
210+
:return: The cpu_milli of this CreateFunctionRequest. # noqa: E501
211+
:rtype: int
212+
"""
213+
return self._cpu_milli
214+
215+
@cpu_milli.setter
216+
def cpu_milli(self, cpu_milli):
217+
"""Sets the cpu_milli of this CreateFunctionRequest.
218+
219+
220+
:param cpu_milli: The cpu_milli of this CreateFunctionRequest. # noqa: E501
221+
:type: int
222+
"""
223+
224+
self._cpu_milli = cpu_milli
225+
174226
@property
175227
def cpu_strategy(self):
176228
"""Gets the cpu_strategy of this CreateFunctionRequest. # noqa: E501

0 commit comments

Comments
 (0)