alibabacloud-fc20230330 4.1.9__tar.gz → 4.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (17) hide show
  1. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/ChangeLog.md +6 -0
  2. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/PKG-INFO +1 -1
  3. alibabacloud_fc20230330-4.2.0/alibabacloud_fc20230330/__init__.py +1 -0
  4. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/alibabacloud_fc20230330/client.py +226 -0
  5. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/alibabacloud_fc20230330/models.py +217 -0
  6. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/alibabacloud_fc20230330.egg-info/PKG-INFO +1 -1
  7. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/setup.py +1 -1
  8. alibabacloud_fc20230330-4.1.9/alibabacloud_fc20230330/__init__.py +0 -1
  9. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/LICENSE +0 -0
  10. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/MANIFEST.in +0 -0
  11. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/README-CN.md +0 -0
  12. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/README.md +0 -0
  13. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/alibabacloud_fc20230330.egg-info/SOURCES.txt +0 -0
  14. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/alibabacloud_fc20230330.egg-info/dependency_links.txt +0 -0
  15. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/alibabacloud_fc20230330.egg-info/requires.txt +0 -0
  16. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/alibabacloud_fc20230330.egg-info/top_level.txt +0 -0
  17. {alibabacloud_fc20230330-4.1.9 → alibabacloud_fc20230330-4.2.0}/setup.cfg +0 -0
@@ -1,3 +1,9 @@
1
+ 2025-03-31 Version: 4.1.9
2
+ - Update API ListFunctions: add request parameters description.
3
+ - Update API ListFunctions: add request parameters gpuType.
4
+ - Update API ListFunctions: add request parameters runtime.
5
+
6
+
1
7
  2025-03-19 Version: 4.1.8
2
8
  - Update API ListFunctions: add param tags.
3
9
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: alibabacloud_fc20230330
3
- Version: 4.1.9
3
+ Version: 4.2.0
4
4
  Summary: Alibaba Cloud Function Compute (20230330) SDK Library for Python
5
5
  Home-page: https://github.com/aliyun/alibabacloud-python-sdk
6
6
  Author: Alibaba Cloud SDK
@@ -0,0 +1 @@
1
+ __version__ = '4.2.0'
@@ -1809,6 +1809,232 @@ class Client(OpenApiClient):
1809
1809
  headers = {}
1810
1810
  return await self.delete_vpc_binding_with_options_async(function_name, vpc_id, headers, runtime)
1811
1811
 
1812
+ def disable_function_invocation_with_options(
1813
+ self,
1814
+ function_name: str,
1815
+ request: fc20230330_models.DisableFunctionInvocationRequest,
1816
+ headers: Dict[str, str],
1817
+ runtime: util_models.RuntimeOptions,
1818
+ ) -> fc20230330_models.DisableFunctionInvocationResponse:
1819
+ """
1820
+ @summary 禁止函数调用
1821
+
1822
+ @param request: DisableFunctionInvocationRequest
1823
+ @param headers: map
1824
+ @param runtime: runtime options for this request RuntimeOptions
1825
+ @return: DisableFunctionInvocationResponse
1826
+ """
1827
+ UtilClient.validate_model(request)
1828
+ body = {}
1829
+ if not UtilClient.is_unset(request.abort_ongoing_request):
1830
+ body['abortOngoingRequest'] = request.abort_ongoing_request
1831
+ if not UtilClient.is_unset(request.reason):
1832
+ body['reason'] = request.reason
1833
+ req = open_api_models.OpenApiRequest(
1834
+ headers=headers,
1835
+ body=OpenApiUtilClient.parse_to_map(body)
1836
+ )
1837
+ params = open_api_models.Params(
1838
+ action='DisableFunctionInvocation',
1839
+ version='2023-03-30',
1840
+ protocol='HTTPS',
1841
+ pathname=f'/2023-03-30/functions/{OpenApiUtilClient.get_encode_param(function_name)}/invoke/disable',
1842
+ method='POST',
1843
+ auth_type='AK',
1844
+ style='ROA',
1845
+ req_body_type='json',
1846
+ body_type='json'
1847
+ )
1848
+ if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
1849
+ return TeaCore.from_map(
1850
+ fc20230330_models.DisableFunctionInvocationResponse(),
1851
+ self.call_api(params, req, runtime)
1852
+ )
1853
+ else:
1854
+ return TeaCore.from_map(
1855
+ fc20230330_models.DisableFunctionInvocationResponse(),
1856
+ self.execute(params, req, runtime)
1857
+ )
1858
+
1859
+ async def disable_function_invocation_with_options_async(
1860
+ self,
1861
+ function_name: str,
1862
+ request: fc20230330_models.DisableFunctionInvocationRequest,
1863
+ headers: Dict[str, str],
1864
+ runtime: util_models.RuntimeOptions,
1865
+ ) -> fc20230330_models.DisableFunctionInvocationResponse:
1866
+ """
1867
+ @summary 禁止函数调用
1868
+
1869
+ @param request: DisableFunctionInvocationRequest
1870
+ @param headers: map
1871
+ @param runtime: runtime options for this request RuntimeOptions
1872
+ @return: DisableFunctionInvocationResponse
1873
+ """
1874
+ UtilClient.validate_model(request)
1875
+ body = {}
1876
+ if not UtilClient.is_unset(request.abort_ongoing_request):
1877
+ body['abortOngoingRequest'] = request.abort_ongoing_request
1878
+ if not UtilClient.is_unset(request.reason):
1879
+ body['reason'] = request.reason
1880
+ req = open_api_models.OpenApiRequest(
1881
+ headers=headers,
1882
+ body=OpenApiUtilClient.parse_to_map(body)
1883
+ )
1884
+ params = open_api_models.Params(
1885
+ action='DisableFunctionInvocation',
1886
+ version='2023-03-30',
1887
+ protocol='HTTPS',
1888
+ pathname=f'/2023-03-30/functions/{OpenApiUtilClient.get_encode_param(function_name)}/invoke/disable',
1889
+ method='POST',
1890
+ auth_type='AK',
1891
+ style='ROA',
1892
+ req_body_type='json',
1893
+ body_type='json'
1894
+ )
1895
+ if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
1896
+ return TeaCore.from_map(
1897
+ fc20230330_models.DisableFunctionInvocationResponse(),
1898
+ await self.call_api_async(params, req, runtime)
1899
+ )
1900
+ else:
1901
+ return TeaCore.from_map(
1902
+ fc20230330_models.DisableFunctionInvocationResponse(),
1903
+ await self.execute_async(params, req, runtime)
1904
+ )
1905
+
1906
+ def disable_function_invocation(
1907
+ self,
1908
+ function_name: str,
1909
+ request: fc20230330_models.DisableFunctionInvocationRequest,
1910
+ ) -> fc20230330_models.DisableFunctionInvocationResponse:
1911
+ """
1912
+ @summary 禁止函数调用
1913
+
1914
+ @param request: DisableFunctionInvocationRequest
1915
+ @return: DisableFunctionInvocationResponse
1916
+ """
1917
+ runtime = util_models.RuntimeOptions()
1918
+ headers = {}
1919
+ return self.disable_function_invocation_with_options(function_name, request, headers, runtime)
1920
+
1921
+ async def disable_function_invocation_async(
1922
+ self,
1923
+ function_name: str,
1924
+ request: fc20230330_models.DisableFunctionInvocationRequest,
1925
+ ) -> fc20230330_models.DisableFunctionInvocationResponse:
1926
+ """
1927
+ @summary 禁止函数调用
1928
+
1929
+ @param request: DisableFunctionInvocationRequest
1930
+ @return: DisableFunctionInvocationResponse
1931
+ """
1932
+ runtime = util_models.RuntimeOptions()
1933
+ headers = {}
1934
+ return await self.disable_function_invocation_with_options_async(function_name, request, headers, runtime)
1935
+
1936
+ def enable_function_invocation_with_options(
1937
+ self,
1938
+ function_name: str,
1939
+ headers: Dict[str, str],
1940
+ runtime: util_models.RuntimeOptions,
1941
+ ) -> fc20230330_models.EnableFunctionInvocationResponse:
1942
+ """
1943
+ @summary 允许函数调用
1944
+
1945
+ @param headers: map
1946
+ @param runtime: runtime options for this request RuntimeOptions
1947
+ @return: EnableFunctionInvocationResponse
1948
+ """
1949
+ req = open_api_models.OpenApiRequest(
1950
+ headers=headers
1951
+ )
1952
+ params = open_api_models.Params(
1953
+ action='EnableFunctionInvocation',
1954
+ version='2023-03-30',
1955
+ protocol='HTTPS',
1956
+ pathname=f'/2023-03-30/functions/{OpenApiUtilClient.get_encode_param(function_name)}/invoke/enable',
1957
+ method='POST',
1958
+ auth_type='AK',
1959
+ style='ROA',
1960
+ req_body_type='json',
1961
+ body_type='json'
1962
+ )
1963
+ if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
1964
+ return TeaCore.from_map(
1965
+ fc20230330_models.EnableFunctionInvocationResponse(),
1966
+ self.call_api(params, req, runtime)
1967
+ )
1968
+ else:
1969
+ return TeaCore.from_map(
1970
+ fc20230330_models.EnableFunctionInvocationResponse(),
1971
+ self.execute(params, req, runtime)
1972
+ )
1973
+
1974
+ async def enable_function_invocation_with_options_async(
1975
+ self,
1976
+ function_name: str,
1977
+ headers: Dict[str, str],
1978
+ runtime: util_models.RuntimeOptions,
1979
+ ) -> fc20230330_models.EnableFunctionInvocationResponse:
1980
+ """
1981
+ @summary 允许函数调用
1982
+
1983
+ @param headers: map
1984
+ @param runtime: runtime options for this request RuntimeOptions
1985
+ @return: EnableFunctionInvocationResponse
1986
+ """
1987
+ req = open_api_models.OpenApiRequest(
1988
+ headers=headers
1989
+ )
1990
+ params = open_api_models.Params(
1991
+ action='EnableFunctionInvocation',
1992
+ version='2023-03-30',
1993
+ protocol='HTTPS',
1994
+ pathname=f'/2023-03-30/functions/{OpenApiUtilClient.get_encode_param(function_name)}/invoke/enable',
1995
+ method='POST',
1996
+ auth_type='AK',
1997
+ style='ROA',
1998
+ req_body_type='json',
1999
+ body_type='json'
2000
+ )
2001
+ if UtilClient.is_unset(self._signature_version) or not UtilClient.equal_string(self._signature_version, 'v4'):
2002
+ return TeaCore.from_map(
2003
+ fc20230330_models.EnableFunctionInvocationResponse(),
2004
+ await self.call_api_async(params, req, runtime)
2005
+ )
2006
+ else:
2007
+ return TeaCore.from_map(
2008
+ fc20230330_models.EnableFunctionInvocationResponse(),
2009
+ await self.execute_async(params, req, runtime)
2010
+ )
2011
+
2012
+ def enable_function_invocation(
2013
+ self,
2014
+ function_name: str,
2015
+ ) -> fc20230330_models.EnableFunctionInvocationResponse:
2016
+ """
2017
+ @summary 允许函数调用
2018
+
2019
+ @return: EnableFunctionInvocationResponse
2020
+ """
2021
+ runtime = util_models.RuntimeOptions()
2022
+ headers = {}
2023
+ return self.enable_function_invocation_with_options(function_name, headers, runtime)
2024
+
2025
+ async def enable_function_invocation_async(
2026
+ self,
2027
+ function_name: str,
2028
+ ) -> fc20230330_models.EnableFunctionInvocationResponse:
2029
+ """
2030
+ @summary 允许函数调用
2031
+
2032
+ @return: EnableFunctionInvocationResponse
2033
+ """
2034
+ runtime = util_models.RuntimeOptions()
2035
+ headers = {}
2036
+ return await self.enable_function_invocation_with_options_async(function_name, headers, runtime)
2037
+
1812
2038
  def get_alias_with_options(
1813
2039
  self,
1814
2040
  function_name: str,
@@ -3238,6 +3238,45 @@ class Filter(TeaModel):
3238
3238
  return self
3239
3239
 
3240
3240
 
3241
+ class OpenStructFunctionRestriction(TeaModel):
3242
+ def __init__(
3243
+ self,
3244
+ disable: bool = None,
3245
+ last_modified_time: str = None,
3246
+ reason: str = None,
3247
+ ):
3248
+ self.disable = disable
3249
+ self.last_modified_time = last_modified_time
3250
+ self.reason = reason
3251
+
3252
+ def validate(self):
3253
+ pass
3254
+
3255
+ def to_map(self):
3256
+ _map = super().to_map()
3257
+ if _map is not None:
3258
+ return _map
3259
+
3260
+ result = dict()
3261
+ if self.disable is not None:
3262
+ result['disable'] = self.disable
3263
+ if self.last_modified_time is not None:
3264
+ result['lastModifiedTime'] = self.last_modified_time
3265
+ if self.reason is not None:
3266
+ result['reason'] = self.reason
3267
+ return result
3268
+
3269
+ def from_map(self, m: dict = None):
3270
+ m = m or dict()
3271
+ if m.get('disable') is not None:
3272
+ self.disable = m.get('disable')
3273
+ if m.get('lastModifiedTime') is not None:
3274
+ self.last_modified_time = m.get('lastModifiedTime')
3275
+ if m.get('reason') is not None:
3276
+ self.reason = m.get('reason')
3277
+ return self
3278
+
3279
+
3241
3280
  class FunctionLayer(TeaModel):
3242
3281
  def __init__(
3243
3282
  self,
@@ -3293,6 +3332,7 @@ class Function(TeaModel):
3293
3332
  instance_concurrency: int = None,
3294
3333
  instance_lifecycle_config: InstanceLifecycleConfig = None,
3295
3334
  internet_access: bool = None,
3335
+ invocation_restriction: OpenStructFunctionRestriction = None,
3296
3336
  last_modified_time: str = None,
3297
3337
  last_update_status: str = None,
3298
3338
  last_update_status_reason: str = None,
@@ -3331,6 +3371,7 @@ class Function(TeaModel):
3331
3371
  self.instance_concurrency = instance_concurrency
3332
3372
  self.instance_lifecycle_config = instance_lifecycle_config
3333
3373
  self.internet_access = internet_access
3374
+ self.invocation_restriction = invocation_restriction
3334
3375
  self.last_modified_time = last_modified_time
3335
3376
  self.last_update_status = last_update_status
3336
3377
  self.last_update_status_reason = last_update_status_reason
@@ -3361,6 +3402,8 @@ class Function(TeaModel):
3361
3402
  self.gpu_config.validate()
3362
3403
  if self.instance_lifecycle_config:
3363
3404
  self.instance_lifecycle_config.validate()
3405
+ if self.invocation_restriction:
3406
+ self.invocation_restriction.validate()
3364
3407
  if self.layers:
3365
3408
  for k in self.layers:
3366
3409
  if k:
@@ -3424,6 +3467,8 @@ class Function(TeaModel):
3424
3467
  result['instanceLifecycleConfig'] = self.instance_lifecycle_config.to_map()
3425
3468
  if self.internet_access is not None:
3426
3469
  result['internetAccess'] = self.internet_access
3470
+ if self.invocation_restriction is not None:
3471
+ result['invocationRestriction'] = self.invocation_restriction.to_map()
3427
3472
  if self.last_modified_time is not None:
3428
3473
  result['lastModifiedTime'] = self.last_modified_time
3429
3474
  if self.last_update_status is not None:
@@ -3511,6 +3556,9 @@ class Function(TeaModel):
3511
3556
  self.instance_lifecycle_config = temp_model.from_map(m['instanceLifecycleConfig'])
3512
3557
  if m.get('internetAccess') is not None:
3513
3558
  self.internet_access = m.get('internetAccess')
3559
+ if m.get('invocationRestriction') is not None:
3560
+ temp_model = OpenStructFunctionRestriction()
3561
+ self.invocation_restriction = temp_model.from_map(m['invocationRestriction'])
3514
3562
  if m.get('lastModifiedTime') is not None:
3515
3563
  self.last_modified_time = m.get('lastModifiedTime')
3516
3564
  if m.get('lastUpdateStatus') is not None:
@@ -6857,6 +6905,175 @@ class DeleteVpcBindingResponse(TeaModel):
6857
6905
  return self
6858
6906
 
6859
6907
 
6908
+ class DisableFunctionInvocationRequest(TeaModel):
6909
+ def __init__(
6910
+ self,
6911
+ abort_ongoing_request: bool = None,
6912
+ reason: str = None,
6913
+ ):
6914
+ self.abort_ongoing_request = abort_ongoing_request
6915
+ self.reason = reason
6916
+
6917
+ def validate(self):
6918
+ pass
6919
+
6920
+ def to_map(self):
6921
+ _map = super().to_map()
6922
+ if _map is not None:
6923
+ return _map
6924
+
6925
+ result = dict()
6926
+ if self.abort_ongoing_request is not None:
6927
+ result['abortOngoingRequest'] = self.abort_ongoing_request
6928
+ if self.reason is not None:
6929
+ result['reason'] = self.reason
6930
+ return result
6931
+
6932
+ def from_map(self, m: dict = None):
6933
+ m = m or dict()
6934
+ if m.get('abortOngoingRequest') is not None:
6935
+ self.abort_ongoing_request = m.get('abortOngoingRequest')
6936
+ if m.get('reason') is not None:
6937
+ self.reason = m.get('reason')
6938
+ return self
6939
+
6940
+
6941
+ class DisableFunctionInvocationResponseBody(TeaModel):
6942
+ def __init__(
6943
+ self,
6944
+ success: bool = None,
6945
+ ):
6946
+ self.success = success
6947
+
6948
+ def validate(self):
6949
+ pass
6950
+
6951
+ def to_map(self):
6952
+ _map = super().to_map()
6953
+ if _map is not None:
6954
+ return _map
6955
+
6956
+ result = dict()
6957
+ if self.success is not None:
6958
+ result['success'] = self.success
6959
+ return result
6960
+
6961
+ def from_map(self, m: dict = None):
6962
+ m = m or dict()
6963
+ if m.get('success') is not None:
6964
+ self.success = m.get('success')
6965
+ return self
6966
+
6967
+
6968
+ class DisableFunctionInvocationResponse(TeaModel):
6969
+ def __init__(
6970
+ self,
6971
+ headers: Dict[str, str] = None,
6972
+ status_code: int = None,
6973
+ body: DisableFunctionInvocationResponseBody = None,
6974
+ ):
6975
+ self.headers = headers
6976
+ self.status_code = status_code
6977
+ self.body = body
6978
+
6979
+ def validate(self):
6980
+ if self.body:
6981
+ self.body.validate()
6982
+
6983
+ def to_map(self):
6984
+ _map = super().to_map()
6985
+ if _map is not None:
6986
+ return _map
6987
+
6988
+ result = dict()
6989
+ if self.headers is not None:
6990
+ result['headers'] = self.headers
6991
+ if self.status_code is not None:
6992
+ result['statusCode'] = self.status_code
6993
+ if self.body is not None:
6994
+ result['body'] = self.body.to_map()
6995
+ return result
6996
+
6997
+ def from_map(self, m: dict = None):
6998
+ m = m or dict()
6999
+ if m.get('headers') is not None:
7000
+ self.headers = m.get('headers')
7001
+ if m.get('statusCode') is not None:
7002
+ self.status_code = m.get('statusCode')
7003
+ if m.get('body') is not None:
7004
+ temp_model = DisableFunctionInvocationResponseBody()
7005
+ self.body = temp_model.from_map(m['body'])
7006
+ return self
7007
+
7008
+
7009
+ class EnableFunctionInvocationResponseBody(TeaModel):
7010
+ def __init__(
7011
+ self,
7012
+ success: bool = None,
7013
+ ):
7014
+ self.success = success
7015
+
7016
+ def validate(self):
7017
+ pass
7018
+
7019
+ def to_map(self):
7020
+ _map = super().to_map()
7021
+ if _map is not None:
7022
+ return _map
7023
+
7024
+ result = dict()
7025
+ if self.success is not None:
7026
+ result['success'] = self.success
7027
+ return result
7028
+
7029
+ def from_map(self, m: dict = None):
7030
+ m = m or dict()
7031
+ if m.get('success') is not None:
7032
+ self.success = m.get('success')
7033
+ return self
7034
+
7035
+
7036
+ class EnableFunctionInvocationResponse(TeaModel):
7037
+ def __init__(
7038
+ self,
7039
+ headers: Dict[str, str] = None,
7040
+ status_code: int = None,
7041
+ body: EnableFunctionInvocationResponseBody = None,
7042
+ ):
7043
+ self.headers = headers
7044
+ self.status_code = status_code
7045
+ self.body = body
7046
+
7047
+ def validate(self):
7048
+ if self.body:
7049
+ self.body.validate()
7050
+
7051
+ def to_map(self):
7052
+ _map = super().to_map()
7053
+ if _map is not None:
7054
+ return _map
7055
+
7056
+ result = dict()
7057
+ if self.headers is not None:
7058
+ result['headers'] = self.headers
7059
+ if self.status_code is not None:
7060
+ result['statusCode'] = self.status_code
7061
+ if self.body is not None:
7062
+ result['body'] = self.body.to_map()
7063
+ return result
7064
+
7065
+ def from_map(self, m: dict = None):
7066
+ m = m or dict()
7067
+ if m.get('headers') is not None:
7068
+ self.headers = m.get('headers')
7069
+ if m.get('statusCode') is not None:
7070
+ self.status_code = m.get('statusCode')
7071
+ if m.get('body') is not None:
7072
+ temp_model = EnableFunctionInvocationResponseBody()
7073
+ self.body = temp_model.from_map(m['body'])
7074
+ return self
7075
+
7076
+
6860
7077
  class GetAliasResponse(TeaModel):
6861
7078
  def __init__(
6862
7079
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: alibabacloud-fc20230330
3
- Version: 4.1.9
3
+ Version: 4.2.0
4
4
  Summary: Alibaba Cloud Function Compute (20230330) SDK Library for Python
5
5
  Home-page: https://github.com/aliyun/alibabacloud-python-sdk
6
6
  Author: Alibaba Cloud SDK
@@ -24,7 +24,7 @@ from setuptools import setup, find_packages
24
24
  """
25
25
  setup module for alibabacloud_fc20230330.
26
26
 
27
- Created on 31/03/2025
27
+ Created on 01/04/2025
28
28
 
29
29
  @author: Alibaba Cloud SDK
30
30
  """
@@ -1 +0,0 @@
1
- __version__ = '4.1.9'