tencentcloud-sdk-python-scf 3.0.855__py2.py3-none-any.whl → 3.1.4__py2.py3-none-any.whl

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.
@@ -0,0 +1,984 @@
1
+ # -*- coding: utf8 -*-
2
+ # Copyright (c) 2017-2025 Tencent. All Rights Reserved.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+
17
+
18
+ from tencentcloud.common.abstract_client_async import AbstractClient
19
+ from tencentcloud.scf.v20180416 import models
20
+ from typing import Dict
21
+
22
+
23
+ class ScfClient(AbstractClient):
24
+ _apiVersion = '2018-04-16'
25
+ _endpoint = 'scf.tencentcloudapi.com'
26
+ _service = 'scf'
27
+
28
+ async def CopyFunction(
29
+ self,
30
+ request: models.CopyFunctionRequest,
31
+ opts: Dict = None,
32
+ ) -> models.CopyFunctionResponse:
33
+ """
34
+ 复制一个函数,您可以选择将复制出的新函数放置在特定的Region和Namespace。
35
+ 注:本接口**不会**复制函数的以下对象或属性:
36
+ 1. 函数的触发器
37
+ 2. 除了$LATEST以外的其它版本
38
+ 3. 函数配置的日志投递到的CLS目标。
39
+
40
+ 如有需要,您可以在复制后手动配置新函数。
41
+ """
42
+
43
+ kwargs = {}
44
+ kwargs["action"] = "CopyFunction"
45
+ kwargs["params"] = request._serialize()
46
+ kwargs["resp_cls"] = models.CopyFunctionResponse
47
+ kwargs["headers"] = request.headers
48
+ kwargs["opts"] = opts or {}
49
+
50
+ return await self.call_and_deserialize(**kwargs)
51
+
52
+ async def CreateAlias(
53
+ self,
54
+ request: models.CreateAliasRequest,
55
+ opts: Dict = None,
56
+ ) -> models.CreateAliasResponse:
57
+ """
58
+ 为某个函数版本创建一个别名,您可以使用别名来标记特定的函数版本,如DEV/RELEASE版本,也可以随时修改别名指向的版本。
59
+ 一个别名必须指向一个主版本,此外还可以同时指向一个附加版本。调用函数时指定特定的别名,则请求会被发送到别名指向的版本上,您可以配置请求发送到主版本和附加版本的比例。
60
+ """
61
+
62
+ kwargs = {}
63
+ kwargs["action"] = "CreateAlias"
64
+ kwargs["params"] = request._serialize()
65
+ kwargs["resp_cls"] = models.CreateAliasResponse
66
+ kwargs["headers"] = request.headers
67
+ kwargs["opts"] = opts or {}
68
+
69
+ return await self.call_and_deserialize(**kwargs)
70
+
71
+ async def CreateCustomDomain(
72
+ self,
73
+ request: models.CreateCustomDomainRequest,
74
+ opts: Dict = None,
75
+ ) -> models.CreateCustomDomainResponse:
76
+ """
77
+ 创建自定义域名
78
+ """
79
+
80
+ kwargs = {}
81
+ kwargs["action"] = "CreateCustomDomain"
82
+ kwargs["params"] = request._serialize()
83
+ kwargs["resp_cls"] = models.CreateCustomDomainResponse
84
+ kwargs["headers"] = request.headers
85
+ kwargs["opts"] = opts or {}
86
+
87
+ return await self.call_and_deserialize(**kwargs)
88
+
89
+ async def CreateFunction(
90
+ self,
91
+ request: models.CreateFunctionRequest,
92
+ opts: Dict = None,
93
+ ) -> models.CreateFunctionResponse:
94
+ """
95
+ 该接口根据传入参数创建新的函数。
96
+ """
97
+
98
+ kwargs = {}
99
+ kwargs["action"] = "CreateFunction"
100
+ kwargs["params"] = request._serialize()
101
+ kwargs["resp_cls"] = models.CreateFunctionResponse
102
+ kwargs["headers"] = request.headers
103
+ kwargs["opts"] = opts or {}
104
+
105
+ return await self.call_and_deserialize(**kwargs)
106
+
107
+ async def CreateNamespace(
108
+ self,
109
+ request: models.CreateNamespaceRequest,
110
+ opts: Dict = None,
111
+ ) -> models.CreateNamespaceResponse:
112
+ """
113
+ 该接口根据传入的参数创建命名空间。
114
+ """
115
+
116
+ kwargs = {}
117
+ kwargs["action"] = "CreateNamespace"
118
+ kwargs["params"] = request._serialize()
119
+ kwargs["resp_cls"] = models.CreateNamespaceResponse
120
+ kwargs["headers"] = request.headers
121
+ kwargs["opts"] = opts or {}
122
+
123
+ return await self.call_and_deserialize(**kwargs)
124
+
125
+ async def CreateTrigger(
126
+ self,
127
+ request: models.CreateTriggerRequest,
128
+ opts: Dict = None,
129
+ ) -> models.CreateTriggerResponse:
130
+ """
131
+ 该接口根据参数输入设置新的触发方式。
132
+ """
133
+
134
+ kwargs = {}
135
+ kwargs["action"] = "CreateTrigger"
136
+ kwargs["params"] = request._serialize()
137
+ kwargs["resp_cls"] = models.CreateTriggerResponse
138
+ kwargs["headers"] = request.headers
139
+ kwargs["opts"] = opts or {}
140
+
141
+ return await self.call_and_deserialize(**kwargs)
142
+
143
+ async def DeleteAlias(
144
+ self,
145
+ request: models.DeleteAliasRequest,
146
+ opts: Dict = None,
147
+ ) -> models.DeleteAliasResponse:
148
+ """
149
+ 删除一个函数版本的别名
150
+ """
151
+
152
+ kwargs = {}
153
+ kwargs["action"] = "DeleteAlias"
154
+ kwargs["params"] = request._serialize()
155
+ kwargs["resp_cls"] = models.DeleteAliasResponse
156
+ kwargs["headers"] = request.headers
157
+ kwargs["opts"] = opts or {}
158
+
159
+ return await self.call_and_deserialize(**kwargs)
160
+
161
+ async def DeleteCustomDomain(
162
+ self,
163
+ request: models.DeleteCustomDomainRequest,
164
+ opts: Dict = None,
165
+ ) -> models.DeleteCustomDomainResponse:
166
+ """
167
+ 删除自定义域名
168
+ """
169
+
170
+ kwargs = {}
171
+ kwargs["action"] = "DeleteCustomDomain"
172
+ kwargs["params"] = request._serialize()
173
+ kwargs["resp_cls"] = models.DeleteCustomDomainResponse
174
+ kwargs["headers"] = request.headers
175
+ kwargs["opts"] = opts or {}
176
+
177
+ return await self.call_and_deserialize(**kwargs)
178
+
179
+ async def DeleteFunction(
180
+ self,
181
+ request: models.DeleteFunctionRequest,
182
+ opts: Dict = None,
183
+ ) -> models.DeleteFunctionResponse:
184
+ """
185
+ 该接口根据传入参数删除函数。
186
+ """
187
+
188
+ kwargs = {}
189
+ kwargs["action"] = "DeleteFunction"
190
+ kwargs["params"] = request._serialize()
191
+ kwargs["resp_cls"] = models.DeleteFunctionResponse
192
+ kwargs["headers"] = request.headers
193
+ kwargs["opts"] = opts or {}
194
+
195
+ return await self.call_and_deserialize(**kwargs)
196
+
197
+ async def DeleteFunctionVersion(
198
+ self,
199
+ request: models.DeleteFunctionVersionRequest,
200
+ opts: Dict = None,
201
+ ) -> models.DeleteFunctionVersionResponse:
202
+ """
203
+ 该接口根据传入参数删除函数的指定版本。
204
+ """
205
+
206
+ kwargs = {}
207
+ kwargs["action"] = "DeleteFunctionVersion"
208
+ kwargs["params"] = request._serialize()
209
+ kwargs["resp_cls"] = models.DeleteFunctionVersionResponse
210
+ kwargs["headers"] = request.headers
211
+ kwargs["opts"] = opts or {}
212
+
213
+ return await self.call_and_deserialize(**kwargs)
214
+
215
+ async def DeleteLayerVersion(
216
+ self,
217
+ request: models.DeleteLayerVersionRequest,
218
+ opts: Dict = None,
219
+ ) -> models.DeleteLayerVersionResponse:
220
+ """
221
+ 删除指定层的指定版本,被删除的版本无法再关联到函数上,但不会影响正在引用这个层的函数。
222
+ """
223
+
224
+ kwargs = {}
225
+ kwargs["action"] = "DeleteLayerVersion"
226
+ kwargs["params"] = request._serialize()
227
+ kwargs["resp_cls"] = models.DeleteLayerVersionResponse
228
+ kwargs["headers"] = request.headers
229
+ kwargs["opts"] = opts or {}
230
+
231
+ return await self.call_and_deserialize(**kwargs)
232
+
233
+ async def DeleteNamespace(
234
+ self,
235
+ request: models.DeleteNamespaceRequest,
236
+ opts: Dict = None,
237
+ ) -> models.DeleteNamespaceResponse:
238
+ """
239
+ 该接口根据传入的参数删除命名空间。
240
+ """
241
+
242
+ kwargs = {}
243
+ kwargs["action"] = "DeleteNamespace"
244
+ kwargs["params"] = request._serialize()
245
+ kwargs["resp_cls"] = models.DeleteNamespaceResponse
246
+ kwargs["headers"] = request.headers
247
+ kwargs["opts"] = opts or {}
248
+
249
+ return await self.call_and_deserialize(**kwargs)
250
+
251
+ async def DeleteProvisionedConcurrencyConfig(
252
+ self,
253
+ request: models.DeleteProvisionedConcurrencyConfigRequest,
254
+ opts: Dict = None,
255
+ ) -> models.DeleteProvisionedConcurrencyConfigResponse:
256
+ """
257
+ 删除函数版本的预置并发配置。
258
+ """
259
+
260
+ kwargs = {}
261
+ kwargs["action"] = "DeleteProvisionedConcurrencyConfig"
262
+ kwargs["params"] = request._serialize()
263
+ kwargs["resp_cls"] = models.DeleteProvisionedConcurrencyConfigResponse
264
+ kwargs["headers"] = request.headers
265
+ kwargs["opts"] = opts or {}
266
+
267
+ return await self.call_and_deserialize(**kwargs)
268
+
269
+ async def DeleteReservedConcurrencyConfig(
270
+ self,
271
+ request: models.DeleteReservedConcurrencyConfigRequest,
272
+ opts: Dict = None,
273
+ ) -> models.DeleteReservedConcurrencyConfigResponse:
274
+ """
275
+ 删除函数的最大独占配额配置。
276
+ """
277
+
278
+ kwargs = {}
279
+ kwargs["action"] = "DeleteReservedConcurrencyConfig"
280
+ kwargs["params"] = request._serialize()
281
+ kwargs["resp_cls"] = models.DeleteReservedConcurrencyConfigResponse
282
+ kwargs["headers"] = request.headers
283
+ kwargs["opts"] = opts or {}
284
+
285
+ return await self.call_and_deserialize(**kwargs)
286
+
287
+ async def DeleteTrigger(
288
+ self,
289
+ request: models.DeleteTriggerRequest,
290
+ opts: Dict = None,
291
+ ) -> models.DeleteTriggerResponse:
292
+ """
293
+ 该接口根据参数传入删除已有的触发方式。
294
+ """
295
+
296
+ kwargs = {}
297
+ kwargs["action"] = "DeleteTrigger"
298
+ kwargs["params"] = request._serialize()
299
+ kwargs["resp_cls"] = models.DeleteTriggerResponse
300
+ kwargs["headers"] = request.headers
301
+ kwargs["opts"] = opts or {}
302
+
303
+ return await self.call_and_deserialize(**kwargs)
304
+
305
+ async def GetAccount(
306
+ self,
307
+ request: models.GetAccountRequest,
308
+ opts: Dict = None,
309
+ ) -> models.GetAccountResponse:
310
+ """
311
+ 获取账户信息
312
+ """
313
+
314
+ kwargs = {}
315
+ kwargs["action"] = "GetAccount"
316
+ kwargs["params"] = request._serialize()
317
+ kwargs["resp_cls"] = models.GetAccountResponse
318
+ kwargs["headers"] = request.headers
319
+ kwargs["opts"] = opts or {}
320
+
321
+ return await self.call_and_deserialize(**kwargs)
322
+
323
+ async def GetAlias(
324
+ self,
325
+ request: models.GetAliasRequest,
326
+ opts: Dict = None,
327
+ ) -> models.GetAliasResponse:
328
+ """
329
+ 获取别名的详细信息,包括名称、描述、版本、路由信息等。
330
+ """
331
+
332
+ kwargs = {}
333
+ kwargs["action"] = "GetAlias"
334
+ kwargs["params"] = request._serialize()
335
+ kwargs["resp_cls"] = models.GetAliasResponse
336
+ kwargs["headers"] = request.headers
337
+ kwargs["opts"] = opts or {}
338
+
339
+ return await self.call_and_deserialize(**kwargs)
340
+
341
+ async def GetAsyncEventStatus(
342
+ self,
343
+ request: models.GetAsyncEventStatusRequest,
344
+ opts: Dict = None,
345
+ ) -> models.GetAsyncEventStatusResponse:
346
+ """
347
+ 获取函数异步执行事件状态,事件状态保留 3 * 24 小时(从事件完成开始计时)。
348
+ """
349
+
350
+ kwargs = {}
351
+ kwargs["action"] = "GetAsyncEventStatus"
352
+ kwargs["params"] = request._serialize()
353
+ kwargs["resp_cls"] = models.GetAsyncEventStatusResponse
354
+ kwargs["headers"] = request.headers
355
+ kwargs["opts"] = opts or {}
356
+
357
+ return await self.call_and_deserialize(**kwargs)
358
+
359
+ async def GetCustomDomain(
360
+ self,
361
+ request: models.GetCustomDomainRequest,
362
+ opts: Dict = None,
363
+ ) -> models.GetCustomDomainResponse:
364
+ """
365
+ 查看云函数自定义域名详情
366
+ """
367
+
368
+ kwargs = {}
369
+ kwargs["action"] = "GetCustomDomain"
370
+ kwargs["params"] = request._serialize()
371
+ kwargs["resp_cls"] = models.GetCustomDomainResponse
372
+ kwargs["headers"] = request.headers
373
+ kwargs["opts"] = opts or {}
374
+
375
+ return await self.call_and_deserialize(**kwargs)
376
+
377
+ async def GetFunction(
378
+ self,
379
+ request: models.GetFunctionRequest,
380
+ opts: Dict = None,
381
+ ) -> models.GetFunctionResponse:
382
+ """
383
+ 该接口获取某个函数的详细信息,包括名称、代码、处理方法、关联触发器和超时时间等字段。
384
+ """
385
+
386
+ kwargs = {}
387
+ kwargs["action"] = "GetFunction"
388
+ kwargs["params"] = request._serialize()
389
+ kwargs["resp_cls"] = models.GetFunctionResponse
390
+ kwargs["headers"] = request.headers
391
+ kwargs["opts"] = opts or {}
392
+
393
+ return await self.call_and_deserialize(**kwargs)
394
+
395
+ async def GetFunctionAddress(
396
+ self,
397
+ request: models.GetFunctionAddressRequest,
398
+ opts: Dict = None,
399
+ ) -> models.GetFunctionAddressResponse:
400
+ """
401
+ 该接口用于获取函数代码包的下载地址。
402
+ """
403
+
404
+ kwargs = {}
405
+ kwargs["action"] = "GetFunctionAddress"
406
+ kwargs["params"] = request._serialize()
407
+ kwargs["resp_cls"] = models.GetFunctionAddressResponse
408
+ kwargs["headers"] = request.headers
409
+ kwargs["opts"] = opts or {}
410
+
411
+ return await self.call_and_deserialize(**kwargs)
412
+
413
+ async def GetFunctionEventInvokeConfig(
414
+ self,
415
+ request: models.GetFunctionEventInvokeConfigRequest,
416
+ opts: Dict = None,
417
+ ) -> models.GetFunctionEventInvokeConfigResponse:
418
+ """
419
+ 获取函数异步重试配置,包括重试次数和消息保留时间
420
+ """
421
+
422
+ kwargs = {}
423
+ kwargs["action"] = "GetFunctionEventInvokeConfig"
424
+ kwargs["params"] = request._serialize()
425
+ kwargs["resp_cls"] = models.GetFunctionEventInvokeConfigResponse
426
+ kwargs["headers"] = request.headers
427
+ kwargs["opts"] = opts or {}
428
+
429
+ return await self.call_and_deserialize(**kwargs)
430
+
431
+ async def GetFunctionLogs(
432
+ self,
433
+ request: models.GetFunctionLogsRequest,
434
+ opts: Dict = None,
435
+ ) -> models.GetFunctionLogsResponse:
436
+ """
437
+ 该接口根据指定的日志查询条件返回函数运行日志。该接口已下线,查询函数请求运行的返回信息,请使用 [GetRequestStatus](https://cloud.tencent.com/document/product/583/65348)。查询函数运行日志,请参考[日志检索教程](https://cloud.tencent.com/document/product/583/52637)。
438
+ """
439
+
440
+ kwargs = {}
441
+ kwargs["action"] = "GetFunctionLogs"
442
+ kwargs["params"] = request._serialize()
443
+ kwargs["resp_cls"] = models.GetFunctionLogsResponse
444
+ kwargs["headers"] = request.headers
445
+ kwargs["opts"] = opts or {}
446
+
447
+ return await self.call_and_deserialize(**kwargs)
448
+
449
+ async def GetLayerVersion(
450
+ self,
451
+ request: models.GetLayerVersionRequest,
452
+ opts: Dict = None,
453
+ ) -> models.GetLayerVersionResponse:
454
+ """
455
+ 获取层版本详细信息,包括用于下载层中文件的链接。
456
+ """
457
+
458
+ kwargs = {}
459
+ kwargs["action"] = "GetLayerVersion"
460
+ kwargs["params"] = request._serialize()
461
+ kwargs["resp_cls"] = models.GetLayerVersionResponse
462
+ kwargs["headers"] = request.headers
463
+ kwargs["opts"] = opts or {}
464
+
465
+ return await self.call_and_deserialize(**kwargs)
466
+
467
+ async def GetProvisionedConcurrencyConfig(
468
+ self,
469
+ request: models.GetProvisionedConcurrencyConfigRequest,
470
+ opts: Dict = None,
471
+ ) -> models.GetProvisionedConcurrencyConfigResponse:
472
+ """
473
+ 获取函数或函数某一版本的预置并发详情。
474
+ """
475
+
476
+ kwargs = {}
477
+ kwargs["action"] = "GetProvisionedConcurrencyConfig"
478
+ kwargs["params"] = request._serialize()
479
+ kwargs["resp_cls"] = models.GetProvisionedConcurrencyConfigResponse
480
+ kwargs["headers"] = request.headers
481
+ kwargs["opts"] = opts or {}
482
+
483
+ return await self.call_and_deserialize(**kwargs)
484
+
485
+ async def GetRequestStatus(
486
+ self,
487
+ request: models.GetRequestStatusRequest,
488
+ opts: Dict = None,
489
+ ) -> models.GetRequestStatusResponse:
490
+ """
491
+ 该接口根据指定的查询条件返回函数单个请求运行状态。
492
+ """
493
+
494
+ kwargs = {}
495
+ kwargs["action"] = "GetRequestStatus"
496
+ kwargs["params"] = request._serialize()
497
+ kwargs["resp_cls"] = models.GetRequestStatusResponse
498
+ kwargs["headers"] = request.headers
499
+ kwargs["opts"] = opts or {}
500
+
501
+ return await self.call_and_deserialize(**kwargs)
502
+
503
+ async def GetReservedConcurrencyConfig(
504
+ self,
505
+ request: models.GetReservedConcurrencyConfigRequest,
506
+ opts: Dict = None,
507
+ ) -> models.GetReservedConcurrencyConfigResponse:
508
+ """
509
+ 获取函数的最大独占配额详情。
510
+ """
511
+
512
+ kwargs = {}
513
+ kwargs["action"] = "GetReservedConcurrencyConfig"
514
+ kwargs["params"] = request._serialize()
515
+ kwargs["resp_cls"] = models.GetReservedConcurrencyConfigResponse
516
+ kwargs["headers"] = request.headers
517
+ kwargs["opts"] = opts or {}
518
+
519
+ return await self.call_and_deserialize(**kwargs)
520
+
521
+ async def Invoke(
522
+ self,
523
+ request: models.InvokeRequest,
524
+ opts: Dict = None,
525
+ ) -> models.InvokeResponse:
526
+ """
527
+ 该接口用于运行函数。
528
+ """
529
+
530
+ kwargs = {}
531
+ kwargs["action"] = "Invoke"
532
+ kwargs["params"] = request._serialize()
533
+ kwargs["resp_cls"] = models.InvokeResponse
534
+ kwargs["headers"] = request.headers
535
+ kwargs["opts"] = opts or {}
536
+
537
+ return await self.call_and_deserialize(**kwargs)
538
+
539
+ async def InvokeFunction(
540
+ self,
541
+ request: models.InvokeFunctionRequest,
542
+ opts: Dict = None,
543
+ ) -> models.InvokeFunctionResponse:
544
+ """
545
+ SCF同步调用函数接口。
546
+ """
547
+
548
+ kwargs = {}
549
+ kwargs["action"] = "InvokeFunction"
550
+ kwargs["params"] = request._serialize()
551
+ kwargs["resp_cls"] = models.InvokeFunctionResponse
552
+ kwargs["headers"] = request.headers
553
+ kwargs["opts"] = opts or {}
554
+
555
+ return await self.call_and_deserialize(**kwargs)
556
+
557
+ async def ListAliases(
558
+ self,
559
+ request: models.ListAliasesRequest,
560
+ opts: Dict = None,
561
+ ) -> models.ListAliasesResponse:
562
+ """
563
+ 返回一个函数下的全部别名,可以根据特定函数版本过滤。
564
+ """
565
+
566
+ kwargs = {}
567
+ kwargs["action"] = "ListAliases"
568
+ kwargs["params"] = request._serialize()
569
+ kwargs["resp_cls"] = models.ListAliasesResponse
570
+ kwargs["headers"] = request.headers
571
+ kwargs["opts"] = opts or {}
572
+
573
+ return await self.call_and_deserialize(**kwargs)
574
+
575
+ async def ListAsyncEvents(
576
+ self,
577
+ request: models.ListAsyncEventsRequest,
578
+ opts: Dict = None,
579
+ ) -> models.ListAsyncEventsResponse:
580
+ """
581
+ 拉取函数异步事件列表
582
+ """
583
+
584
+ kwargs = {}
585
+ kwargs["action"] = "ListAsyncEvents"
586
+ kwargs["params"] = request._serialize()
587
+ kwargs["resp_cls"] = models.ListAsyncEventsResponse
588
+ kwargs["headers"] = request.headers
589
+ kwargs["opts"] = opts or {}
590
+
591
+ return await self.call_and_deserialize(**kwargs)
592
+
593
+ async def ListCustomDomains(
594
+ self,
595
+ request: models.ListCustomDomainsRequest,
596
+ opts: Dict = None,
597
+ ) -> models.ListCustomDomainsResponse:
598
+ """
599
+ 遍历域名列表信息
600
+ """
601
+
602
+ kwargs = {}
603
+ kwargs["action"] = "ListCustomDomains"
604
+ kwargs["params"] = request._serialize()
605
+ kwargs["resp_cls"] = models.ListCustomDomainsResponse
606
+ kwargs["headers"] = request.headers
607
+ kwargs["opts"] = opts or {}
608
+
609
+ return await self.call_and_deserialize(**kwargs)
610
+
611
+ async def ListFunctions(
612
+ self,
613
+ request: models.ListFunctionsRequest,
614
+ opts: Dict = None,
615
+ ) -> models.ListFunctionsResponse:
616
+ """
617
+ 该接口根据传入的查询参数返回相关函数信息。
618
+ """
619
+
620
+ kwargs = {}
621
+ kwargs["action"] = "ListFunctions"
622
+ kwargs["params"] = request._serialize()
623
+ kwargs["resp_cls"] = models.ListFunctionsResponse
624
+ kwargs["headers"] = request.headers
625
+ kwargs["opts"] = opts or {}
626
+
627
+ return await self.call_and_deserialize(**kwargs)
628
+
629
+ async def ListLayerVersions(
630
+ self,
631
+ request: models.ListLayerVersionsRequest,
632
+ opts: Dict = None,
633
+ ) -> models.ListLayerVersionsResponse:
634
+ """
635
+ 返回指定层的全部版本的信息
636
+ """
637
+
638
+ kwargs = {}
639
+ kwargs["action"] = "ListLayerVersions"
640
+ kwargs["params"] = request._serialize()
641
+ kwargs["resp_cls"] = models.ListLayerVersionsResponse
642
+ kwargs["headers"] = request.headers
643
+ kwargs["opts"] = opts or {}
644
+
645
+ return await self.call_and_deserialize(**kwargs)
646
+
647
+ async def ListLayers(
648
+ self,
649
+ request: models.ListLayersRequest,
650
+ opts: Dict = None,
651
+ ) -> models.ListLayersResponse:
652
+ """
653
+ 返回全部层的列表,其中包含了每个层最新版本的信息,可以通过适配运行时进行过滤。
654
+ """
655
+
656
+ kwargs = {}
657
+ kwargs["action"] = "ListLayers"
658
+ kwargs["params"] = request._serialize()
659
+ kwargs["resp_cls"] = models.ListLayersResponse
660
+ kwargs["headers"] = request.headers
661
+ kwargs["opts"] = opts or {}
662
+
663
+ return await self.call_and_deserialize(**kwargs)
664
+
665
+ async def ListNamespaces(
666
+ self,
667
+ request: models.ListNamespacesRequest,
668
+ opts: Dict = None,
669
+ ) -> models.ListNamespacesResponse:
670
+ """
671
+ 列出命名空间列表
672
+ """
673
+
674
+ kwargs = {}
675
+ kwargs["action"] = "ListNamespaces"
676
+ kwargs["params"] = request._serialize()
677
+ kwargs["resp_cls"] = models.ListNamespacesResponse
678
+ kwargs["headers"] = request.headers
679
+ kwargs["opts"] = opts or {}
680
+
681
+ return await self.call_and_deserialize(**kwargs)
682
+
683
+ async def ListTriggers(
684
+ self,
685
+ request: models.ListTriggersRequest,
686
+ opts: Dict = None,
687
+ ) -> models.ListTriggersResponse:
688
+ """
689
+ 获取函数触发器列表
690
+ """
691
+
692
+ kwargs = {}
693
+ kwargs["action"] = "ListTriggers"
694
+ kwargs["params"] = request._serialize()
695
+ kwargs["resp_cls"] = models.ListTriggersResponse
696
+ kwargs["headers"] = request.headers
697
+ kwargs["opts"] = opts or {}
698
+
699
+ return await self.call_and_deserialize(**kwargs)
700
+
701
+ async def ListVersionByFunction(
702
+ self,
703
+ request: models.ListVersionByFunctionRequest,
704
+ opts: Dict = None,
705
+ ) -> models.ListVersionByFunctionResponse:
706
+ """
707
+ 该接口根据传入的参数查询函数的版本。
708
+ """
709
+
710
+ kwargs = {}
711
+ kwargs["action"] = "ListVersionByFunction"
712
+ kwargs["params"] = request._serialize()
713
+ kwargs["resp_cls"] = models.ListVersionByFunctionResponse
714
+ kwargs["headers"] = request.headers
715
+ kwargs["opts"] = opts or {}
716
+
717
+ return await self.call_and_deserialize(**kwargs)
718
+
719
+ async def PublishLayerVersion(
720
+ self,
721
+ request: models.PublishLayerVersionRequest,
722
+ opts: Dict = None,
723
+ ) -> models.PublishLayerVersionResponse:
724
+ """
725
+ 使用给定的zip文件或cos对象创建一个层的新版本,每次使用相同的层的名称调用本接口,都会生成一个新版本。
726
+ """
727
+
728
+ kwargs = {}
729
+ kwargs["action"] = "PublishLayerVersion"
730
+ kwargs["params"] = request._serialize()
731
+ kwargs["resp_cls"] = models.PublishLayerVersionResponse
732
+ kwargs["headers"] = request.headers
733
+ kwargs["opts"] = opts or {}
734
+
735
+ return await self.call_and_deserialize(**kwargs)
736
+
737
+ async def PublishVersion(
738
+ self,
739
+ request: models.PublishVersionRequest,
740
+ opts: Dict = None,
741
+ ) -> models.PublishVersionResponse:
742
+ """
743
+ 该接口用于用户发布新版本函数。
744
+ """
745
+
746
+ kwargs = {}
747
+ kwargs["action"] = "PublishVersion"
748
+ kwargs["params"] = request._serialize()
749
+ kwargs["resp_cls"] = models.PublishVersionResponse
750
+ kwargs["headers"] = request.headers
751
+ kwargs["opts"] = opts or {}
752
+
753
+ return await self.call_and_deserialize(**kwargs)
754
+
755
+ async def PutProvisionedConcurrencyConfig(
756
+ self,
757
+ request: models.PutProvisionedConcurrencyConfigRequest,
758
+ opts: Dict = None,
759
+ ) -> models.PutProvisionedConcurrencyConfigResponse:
760
+ """
761
+ 设置函数某一非$LATEST版本的预置并发。
762
+ """
763
+
764
+ kwargs = {}
765
+ kwargs["action"] = "PutProvisionedConcurrencyConfig"
766
+ kwargs["params"] = request._serialize()
767
+ kwargs["resp_cls"] = models.PutProvisionedConcurrencyConfigResponse
768
+ kwargs["headers"] = request.headers
769
+ kwargs["opts"] = opts or {}
770
+
771
+ return await self.call_and_deserialize(**kwargs)
772
+
773
+ async def PutReservedConcurrencyConfig(
774
+ self,
775
+ request: models.PutReservedConcurrencyConfigRequest,
776
+ opts: Dict = None,
777
+ ) -> models.PutReservedConcurrencyConfigResponse:
778
+ """
779
+ 设置函数最大独占配额
780
+ """
781
+
782
+ kwargs = {}
783
+ kwargs["action"] = "PutReservedConcurrencyConfig"
784
+ kwargs["params"] = request._serialize()
785
+ kwargs["resp_cls"] = models.PutReservedConcurrencyConfigResponse
786
+ kwargs["headers"] = request.headers
787
+ kwargs["opts"] = opts or {}
788
+
789
+ return await self.call_and_deserialize(**kwargs)
790
+
791
+ async def PutTotalConcurrencyConfig(
792
+ self,
793
+ request: models.PutTotalConcurrencyConfigRequest,
794
+ opts: Dict = None,
795
+ ) -> models.PutTotalConcurrencyConfigResponse:
796
+ """
797
+ 修改账号并发限制配额
798
+ """
799
+
800
+ kwargs = {}
801
+ kwargs["action"] = "PutTotalConcurrencyConfig"
802
+ kwargs["params"] = request._serialize()
803
+ kwargs["resp_cls"] = models.PutTotalConcurrencyConfigResponse
804
+ kwargs["headers"] = request.headers
805
+ kwargs["opts"] = opts or {}
806
+
807
+ return await self.call_and_deserialize(**kwargs)
808
+
809
+ async def TerminateAsyncEvent(
810
+ self,
811
+ request: models.TerminateAsyncEventRequest,
812
+ opts: Dict = None,
813
+ ) -> models.TerminateAsyncEventResponse:
814
+ """
815
+ 终止正在运行中的函数异步事件
816
+ """
817
+
818
+ kwargs = {}
819
+ kwargs["action"] = "TerminateAsyncEvent"
820
+ kwargs["params"] = request._serialize()
821
+ kwargs["resp_cls"] = models.TerminateAsyncEventResponse
822
+ kwargs["headers"] = request.headers
823
+ kwargs["opts"] = opts or {}
824
+
825
+ return await self.call_and_deserialize(**kwargs)
826
+
827
+ async def UpdateAlias(
828
+ self,
829
+ request: models.UpdateAliasRequest,
830
+ opts: Dict = None,
831
+ ) -> models.UpdateAliasResponse:
832
+ """
833
+ 更新别名的配置
834
+ """
835
+
836
+ kwargs = {}
837
+ kwargs["action"] = "UpdateAlias"
838
+ kwargs["params"] = request._serialize()
839
+ kwargs["resp_cls"] = models.UpdateAliasResponse
840
+ kwargs["headers"] = request.headers
841
+ kwargs["opts"] = opts or {}
842
+
843
+ return await self.call_and_deserialize(**kwargs)
844
+
845
+ async def UpdateCustomDomain(
846
+ self,
847
+ request: models.UpdateCustomDomainRequest,
848
+ opts: Dict = None,
849
+ ) -> models.UpdateCustomDomainResponse:
850
+ """
851
+ 更新自定义域名相关配置
852
+ """
853
+
854
+ kwargs = {}
855
+ kwargs["action"] = "UpdateCustomDomain"
856
+ kwargs["params"] = request._serialize()
857
+ kwargs["resp_cls"] = models.UpdateCustomDomainResponse
858
+ kwargs["headers"] = request.headers
859
+ kwargs["opts"] = opts or {}
860
+
861
+ return await self.call_and_deserialize(**kwargs)
862
+
863
+ async def UpdateFunctionCode(
864
+ self,
865
+ request: models.UpdateFunctionCodeRequest,
866
+ opts: Dict = None,
867
+ ) -> models.UpdateFunctionCodeResponse:
868
+ """
869
+ 该接口根据传入参数更新函数代码。
870
+ """
871
+
872
+ kwargs = {}
873
+ kwargs["action"] = "UpdateFunctionCode"
874
+ kwargs["params"] = request._serialize()
875
+ kwargs["resp_cls"] = models.UpdateFunctionCodeResponse
876
+ kwargs["headers"] = request.headers
877
+ kwargs["opts"] = opts or {}
878
+
879
+ return await self.call_and_deserialize(**kwargs)
880
+
881
+ async def UpdateFunctionConfiguration(
882
+ self,
883
+ request: models.UpdateFunctionConfigurationRequest,
884
+ opts: Dict = None,
885
+ ) -> models.UpdateFunctionConfigurationResponse:
886
+ """
887
+ 该接口根据传入参数更新函数配置。
888
+ """
889
+
890
+ kwargs = {}
891
+ kwargs["action"] = "UpdateFunctionConfiguration"
892
+ kwargs["params"] = request._serialize()
893
+ kwargs["resp_cls"] = models.UpdateFunctionConfigurationResponse
894
+ kwargs["headers"] = request.headers
895
+ kwargs["opts"] = opts or {}
896
+
897
+ return await self.call_and_deserialize(**kwargs)
898
+
899
+ async def UpdateFunctionEventInvokeConfig(
900
+ self,
901
+ request: models.UpdateFunctionEventInvokeConfigRequest,
902
+ opts: Dict = None,
903
+ ) -> models.UpdateFunctionEventInvokeConfigResponse:
904
+ """
905
+ 更新函数的异步重试配置,包括重试次数和消息保留时间
906
+ """
907
+
908
+ kwargs = {}
909
+ kwargs["action"] = "UpdateFunctionEventInvokeConfig"
910
+ kwargs["params"] = request._serialize()
911
+ kwargs["resp_cls"] = models.UpdateFunctionEventInvokeConfigResponse
912
+ kwargs["headers"] = request.headers
913
+ kwargs["opts"] = opts or {}
914
+
915
+ return await self.call_and_deserialize(**kwargs)
916
+
917
+ async def UpdateNamespace(
918
+ self,
919
+ request: models.UpdateNamespaceRequest,
920
+ opts: Dict = None,
921
+ ) -> models.UpdateNamespaceResponse:
922
+ """
923
+ 更新命名空间
924
+ """
925
+
926
+ kwargs = {}
927
+ kwargs["action"] = "UpdateNamespace"
928
+ kwargs["params"] = request._serialize()
929
+ kwargs["resp_cls"] = models.UpdateNamespaceResponse
930
+ kwargs["headers"] = request.headers
931
+ kwargs["opts"] = opts or {}
932
+
933
+ return await self.call_and_deserialize(**kwargs)
934
+
935
+ async def UpdateTrigger(
936
+ self,
937
+ request: models.UpdateTriggerRequest,
938
+ opts: Dict = None,
939
+ ) -> models.UpdateTriggerResponse:
940
+ """
941
+ 支持触发器配置更新。
942
+ 默认接口请求频率限制:20次/秒
943
+
944
+ 注意:目前只支持timer触发器和ckafka触发器更新!
945
+
946
+ timer触发器和ckafka触发器支持更新字段有:Enable、TriggerDesc、Description、CustomArgument。
947
+
948
+ timer触发器TriggerDesc支持5段式和7段式的更新。
949
+
950
+ ckafka触发器TriggerDesc支持Retry、MaxMsgNum、TimeOut参数更新,不传值表示原值不变,传值不能为空。
951
+
952
+ Enable 触发器开启或关闭,传参为OPEN为开启,CLOSE为关闭。不传值表示原值不变,传值不能为空。
953
+
954
+ Description 触发器描述,不传值保持原值不变,传值为空则为空。
955
+
956
+ CustomArgument 触发器用户附加信息(注意:只有timer触发器展示),不传值保持原值不变,传值为空则为空。
957
+ """
958
+
959
+ kwargs = {}
960
+ kwargs["action"] = "UpdateTrigger"
961
+ kwargs["params"] = request._serialize()
962
+ kwargs["resp_cls"] = models.UpdateTriggerResponse
963
+ kwargs["headers"] = request.headers
964
+ kwargs["opts"] = opts or {}
965
+
966
+ return await self.call_and_deserialize(**kwargs)
967
+
968
+ async def UpdateTriggerStatus(
969
+ self,
970
+ request: models.UpdateTriggerStatusRequest,
971
+ opts: Dict = None,
972
+ ) -> models.UpdateTriggerStatusResponse:
973
+ """
974
+ 更新触发器状态的值
975
+ """
976
+
977
+ kwargs = {}
978
+ kwargs["action"] = "UpdateTriggerStatus"
979
+ kwargs["params"] = request._serialize()
980
+ kwargs["resp_cls"] = models.UpdateTriggerStatusResponse
981
+ kwargs["headers"] = request.headers
982
+ kwargs["opts"] = opts or {}
983
+
984
+ return await self.call_and_deserialize(**kwargs)