forked from TencentCloud/tencentcloud-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
2134 lines (1540 loc) · 65.1 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package v20180416
import (
"encoding/json"
tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http"
)
type AccessInfo struct {
// 域名
Host *string `json:"Host,omitempty" name:"Host"`
// VIP
Vip *string `json:"Vip,omitempty" name:"Vip"`
}
type Alias struct {
// 别名指向的主版本
FunctionVersion *string `json:"FunctionVersion,omitempty" name:"FunctionVersion"`
// 别名的名称
Name *string `json:"Name,omitempty" name:"Name"`
// 别名的路由信息
// 注意:此字段可能返回 null,表示取不到有效值。
RoutingConfig *RoutingConfig `json:"RoutingConfig,omitempty" name:"RoutingConfig"`
// 描述信息
// 注意:此字段可能返回 null,表示取不到有效值。
Description *string `json:"Description,omitempty" name:"Description"`
// 创建时间
// 注意:此字段可能返回 null,表示取不到有效值。
AddTime *string `json:"AddTime,omitempty" name:"AddTime"`
// 更新时间
// 注意:此字段可能返回 null,表示取不到有效值。
ModTime *string `json:"ModTime,omitempty" name:"ModTime"`
}
type Code struct {
// 对象存储桶名称
CosBucketName *string `json:"CosBucketName,omitempty" name:"CosBucketName"`
// 对象存储对象路径
CosObjectName *string `json:"CosObjectName,omitempty" name:"CosObjectName"`
// 包含函数代码文件及其依赖项的 zip 格式文件,使用该接口时要求将 zip 文件的内容转成 base64 编码,最大支持20M
ZipFile *string `json:"ZipFile,omitempty" name:"ZipFile"`
// 对象存储的地域,地域为北京时需要传入ap-beijing,北京一区时需要传递ap-beijing-1,其他的地域不需要传递。
CosBucketRegion *string `json:"CosBucketRegion,omitempty" name:"CosBucketRegion"`
// 如果是通过Demo创建的话,需要传入DemoId
DemoId *string `json:"DemoId,omitempty" name:"DemoId"`
// 如果是从TempCos创建的话,需要传入TempCosObjectName
TempCosObjectName *string `json:"TempCosObjectName,omitempty" name:"TempCosObjectName"`
// Git地址
GitUrl *string `json:"GitUrl,omitempty" name:"GitUrl"`
// Git用户名
GitUserName *string `json:"GitUserName,omitempty" name:"GitUserName"`
// Git密码
GitPassword *string `json:"GitPassword,omitempty" name:"GitPassword"`
// 加密后的Git密码,一般无需指定
GitPasswordSecret *string `json:"GitPasswordSecret,omitempty" name:"GitPasswordSecret"`
// Git分支
GitBranch *string `json:"GitBranch,omitempty" name:"GitBranch"`
// 代码在Git仓库中的路径
GitDirectory *string `json:"GitDirectory,omitempty" name:"GitDirectory"`
// 指定要拉取的版本
GitCommitId *string `json:"GitCommitId,omitempty" name:"GitCommitId"`
// 加密后的Git用户名,一般无需指定
GitUserNameSecret *string `json:"GitUserNameSecret,omitempty" name:"GitUserNameSecret"`
}
type CopyFunctionRequest struct {
*tchttp.BaseRequest
// 要复制的函数的名称
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 新函数的名称
NewFunctionName *string `json:"NewFunctionName,omitempty" name:"NewFunctionName"`
// 要复制的函数所在的命名空间,默认为default
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
// 将函数复制到的命名空间,默认为default
TargetNamespace *string `json:"TargetNamespace,omitempty" name:"TargetNamespace"`
// 新函数的描述
Description *string `json:"Description,omitempty" name:"Description"`
// 要将函数复制到的地域,不填则默认为当前地域
TargetRegion *string `json:"TargetRegion,omitempty" name:"TargetRegion"`
// 如果目标Namespace下已有同名函数,是否覆盖,默认为否
// (注意:如果选择覆盖,会导致同名函数被删除,请慎重操作)
// TRUE:覆盖同名函数
// FALSE:不覆盖同名函数
Override *bool `json:"Override,omitempty" name:"Override"`
// 是否复制函数的属性,包括环境变量、内存、超时、函数描述、标签、VPC等,默认为是。
// TRUE:复制函数配置
// FALSE:不复制函数配置
CopyConfiguration *bool `json:"CopyConfiguration,omitempty" name:"CopyConfiguration"`
}
func (r *CopyFunctionRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CopyFunctionRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CopyFunctionResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *CopyFunctionResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CopyFunctionResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateAliasRequest struct {
*tchttp.BaseRequest
// 别名的名称,在函数级别中唯一,只能包含字母、数字、'_'和‘-’,且必须以字母开头,长度限制为1-64
Name *string `json:"Name,omitempty" name:"Name"`
// 函数名称
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 别名指向的主版本
FunctionVersion *string `json:"FunctionVersion,omitempty" name:"FunctionVersion"`
// 函数所在的命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
// 别名的请求路由配置
RoutingConfig *RoutingConfig `json:"RoutingConfig,omitempty" name:"RoutingConfig"`
// 别名的描述信息
Description *string `json:"Description,omitempty" name:"Description"`
}
func (r *CreateAliasRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateAliasRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateAliasResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *CreateAliasResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateAliasResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateFunctionRequest struct {
*tchttp.BaseRequest
// 创建的函数名称,函数名称支持26个英文字母大小写、数字、连接符和下划线,第一个字符只能以字母开头,最后一个字符不能为连接符或者下划线,名称长度2-60
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 函数的代码. 注意:不能同时指定Cos与ZipFile
Code *Code `json:"Code,omitempty" name:"Code"`
// 函数处理方法名称,名称格式支持 "文件名称.方法名称" 形式,文件名称和函数名称之间以"."隔开,文件名称和函数名称要求以字母开始和结尾,中间允许插入字母、数字、下划线和连接符,文件名称和函数名字的长度要求是 2-60 个字符
Handler *string `json:"Handler,omitempty" name:"Handler"`
// 函数描述,最大支持 1000 个英文字母、数字、空格、逗号、换行符和英文句号,支持中文
Description *string `json:"Description,omitempty" name:"Description"`
// 函数运行时内存大小,默认为 128M,可选范围 64、128MB-3072MB,并且以 128MB 为阶梯
MemorySize *int64 `json:"MemorySize,omitempty" name:"MemorySize"`
// 函数最长执行时间,单位为秒,可选值范围 1-900 秒,默认为 3 秒
Timeout *int64 `json:"Timeout,omitempty" name:"Timeout"`
// 函数的环境变量
Environment *Environment `json:"Environment,omitempty" name:"Environment"`
// 函数运行环境,目前仅支持 Python2.7,Python3.6,Nodejs6.10,Nodejs8.9,Nodejs10.15, PHP5, PHP7,Golang1 和 Java8,默认Python2.7
Runtime *string `json:"Runtime,omitempty" name:"Runtime"`
// 函数的私有网络配置
VpcConfig *VpcConfig `json:"VpcConfig,omitempty" name:"VpcConfig"`
// 函数所属命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
// 函数绑定的角色
Role *string `json:"Role,omitempty" name:"Role"`
// 函数日志投递到的CLS LogsetID
ClsLogsetId *string `json:"ClsLogsetId,omitempty" name:"ClsLogsetId"`
// 函数日志投递到的CLS TopicID
ClsTopicId *string `json:"ClsTopicId,omitempty" name:"ClsTopicId"`
// 函数类型,默认值为Event,创建触发器函数请填写Event,创建HTTP函数级服务请填写HTTP
Type *string `json:"Type,omitempty" name:"Type"`
// CodeSource 代码来源,支持以下'ZipFile', 'Cos', 'Demo', 'TempCos', 'Git'之一,使用Git来源必须指定此字段
CodeSource *string `json:"CodeSource,omitempty" name:"CodeSource"`
// 函数要关联的Layer版本列表,Layer会按照在列表中顺序依次覆盖。
Layers []*LayerVersionSimple `json:"Layers,omitempty" name:"Layers" list`
// 死信队列参数
DeadLetterConfig *DeadLetterConfig `json:"DeadLetterConfig,omitempty" name:"DeadLetterConfig"`
}
func (r *CreateFunctionRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateFunctionRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateFunctionResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *CreateFunctionResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateFunctionResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateNamespaceRequest struct {
*tchttp.BaseRequest
// 命名空间名称
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
// 命名空间描述
Description *string `json:"Description,omitempty" name:"Description"`
}
func (r *CreateNamespaceRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateNamespaceRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateNamespaceResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *CreateNamespaceResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateNamespaceResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateTriggerRequest struct {
*tchttp.BaseRequest
// 新建触发器绑定的函数名称
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 新建触发器名称。如果是定时触发器,名称支持英文字母、数字、连接符和下划线,最长100个字符;如果是cos触发器,需要是对应cos存储桶适用于XML API的访问域名(例如:5401-5ff414-12345.cos.ap-shanghai.myqcloud.com);如果是其他触发器,见具体触发器绑定参数的说明
TriggerName *string `json:"TriggerName,omitempty" name:"TriggerName"`
// 触发器类型,目前支持 cos 、cmq、 timer、 ckafka类型
Type *string `json:"Type,omitempty" name:"Type"`
// 触发器对应的参数,可见具体[触发器描述说明](https://cloud.tencent.com/document/product/583/39901)
TriggerDesc *string `json:"TriggerDesc,omitempty" name:"TriggerDesc"`
// 函数的命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
// 函数的版本
Qualifier *string `json:"Qualifier,omitempty" name:"Qualifier"`
// 触发器的初始是能状态 OPEN表示开启 CLOSE表示关闭
Enable *string `json:"Enable,omitempty" name:"Enable"`
}
func (r *CreateTriggerRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateTriggerRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type CreateTriggerResponse struct {
*tchttp.BaseResponse
Response *struct {
// 触发器信息
TriggerInfo *Trigger `json:"TriggerInfo,omitempty" name:"TriggerInfo"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *CreateTriggerResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *CreateTriggerResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeadLetterConfig struct {
// 死信队列模式
Type *string `json:"Type,omitempty" name:"Type"`
// 死信队列名称
Name *string `json:"Name,omitempty" name:"Name"`
// 死信队列主题模式的标签形式
FilterType *string `json:"FilterType,omitempty" name:"FilterType"`
}
type DeleteAliasRequest struct {
*tchttp.BaseRequest
// 函数名称
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 别名的名称
Name *string `json:"Name,omitempty" name:"Name"`
// 函数所在的命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
}
func (r *DeleteAliasRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteAliasRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteAliasResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DeleteAliasResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteAliasResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteFunctionRequest struct {
*tchttp.BaseRequest
// 要删除的函数名称
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 函数所属命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
}
func (r *DeleteFunctionRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteFunctionRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteFunctionResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DeleteFunctionResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteFunctionResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteLayerVersionRequest struct {
*tchttp.BaseRequest
// 层名称
LayerName *string `json:"LayerName,omitempty" name:"LayerName"`
// 版本号
LayerVersion *int64 `json:"LayerVersion,omitempty" name:"LayerVersion"`
}
func (r *DeleteLayerVersionRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteLayerVersionRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteLayerVersionResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DeleteLayerVersionResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteLayerVersionResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteNamespaceRequest struct {
*tchttp.BaseRequest
// 命名空间名称
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
}
func (r *DeleteNamespaceRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteNamespaceRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteNamespaceResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DeleteNamespaceResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteNamespaceResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteTriggerRequest struct {
*tchttp.BaseRequest
// 函数的名称
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 要删除的触发器名称
TriggerName *string `json:"TriggerName,omitempty" name:"TriggerName"`
// 要删除的触发器类型,目前支持 cos 、cmq、 timer、ckafka 类型
Type *string `json:"Type,omitempty" name:"Type"`
// 函数所属命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
// 如果删除的触发器类型为 COS 触发器,该字段为必填值,存放 JSON 格式的数据 {"event":"cos:ObjectCreated:*"},数据内容和 SetTrigger 接口中该字段的格式相同;如果删除的触发器类型为定时触发器或 CMQ 触发器,可以不指定该字段
TriggerDesc *string `json:"TriggerDesc,omitempty" name:"TriggerDesc"`
// 函数的版本信息
Qualifier *string `json:"Qualifier,omitempty" name:"Qualifier"`
}
func (r *DeleteTriggerRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteTriggerRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type DeleteTriggerResponse struct {
*tchttp.BaseResponse
Response *struct {
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *DeleteTriggerResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *DeleteTriggerResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type EipConfigOut struct {
// 是否是固定IP,["ENABLE","DISABLE"]
EipStatus *string `json:"EipStatus,omitempty" name:"EipStatus"`
// IP列表
// 注意:此字段可能返回 null,表示取不到有效值。
EipAddress []*string `json:"EipAddress,omitempty" name:"EipAddress" list`
}
type EipOutConfig struct {
// 是否是固定IP,["TRUE","FALSE"]
EipFixed *string `json:"EipFixed,omitempty" name:"EipFixed"`
// IP列表
Eips []*string `json:"Eips,omitempty" name:"Eips" list`
}
type Environment struct {
// 环境变量数组
Variables []*Variable `json:"Variables,omitempty" name:"Variables" list`
}
type Filter struct {
// 需要过滤的字段。
Name *string `json:"Name,omitempty" name:"Name"`
// 字段的过滤值。
Values []*string `json:"Values,omitempty" name:"Values" list`
}
type Function struct {
// 修改时间
ModTime *string `json:"ModTime,omitempty" name:"ModTime"`
// 创建时间
AddTime *string `json:"AddTime,omitempty" name:"AddTime"`
// 运行时
Runtime *string `json:"Runtime,omitempty" name:"Runtime"`
// 函数名称
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 函数ID
FunctionId *string `json:"FunctionId,omitempty" name:"FunctionId"`
// 命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
// 函数状态
Status *string `json:"Status,omitempty" name:"Status"`
// 函数状态详情
StatusDesc *string `json:"StatusDesc,omitempty" name:"StatusDesc"`
// 函数描述
Description *string `json:"Description,omitempty" name:"Description"`
// 函数标签
Tags []*Tag `json:"Tags,omitempty" name:"Tags" list`
// 函数类型,取值为 HTTP 或者 Event
Type *string `json:"Type,omitempty" name:"Type"`
}
type FunctionLog struct {
// 函数的名称
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 函数执行完成后的返回值
RetMsg *string `json:"RetMsg,omitempty" name:"RetMsg"`
// 执行该函数对应的requestId
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
// 函数开始执行时的时间点
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 函数执行结果,如果是 0 表示执行成功,其他值表示失败
RetCode *int64 `json:"RetCode,omitempty" name:"RetCode"`
// 函数调用是否结束,如果是 1 表示执行结束,其他值表示调用异常
InvokeFinished *int64 `json:"InvokeFinished,omitempty" name:"InvokeFinished"`
// 函数执行耗时,单位为 ms
Duration *float64 `json:"Duration,omitempty" name:"Duration"`
// 函数计费时间,根据 duration 向上取最近的 100ms,单位为ms
BillDuration *int64 `json:"BillDuration,omitempty" name:"BillDuration"`
// 函数执行时消耗实际内存大小,单位为 Byte
MemUsage *int64 `json:"MemUsage,omitempty" name:"MemUsage"`
// 函数执行过程中的日志输出
Log *string `json:"Log,omitempty" name:"Log"`
// 日志等级
Level *string `json:"Level,omitempty" name:"Level"`
// 日志来源
Source *string `json:"Source,omitempty" name:"Source"`
}
type FunctionVersion struct {
// 函数版本名称
Version *string `json:"Version,omitempty" name:"Version"`
// 版本描述信息
// 注意:此字段可能返回 null,表示取不到有效值。
Description *string `json:"Description,omitempty" name:"Description"`
// 创建时间
// 注意:此字段可能返回 null,表示取不到有效值。
AddTime *string `json:"AddTime,omitempty" name:"AddTime"`
// 更新时间
// 注意:此字段可能返回 null,表示取不到有效值。
ModTime *string `json:"ModTime,omitempty" name:"ModTime"`
}
type GetAliasRequest struct {
*tchttp.BaseRequest
// 函数名称
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 别名的名称
Name *string `json:"Name,omitempty" name:"Name"`
// 函数所在的命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
}
func (r *GetAliasRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *GetAliasRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type GetAliasResponse struct {
*tchttp.BaseResponse
Response *struct {
// 别名指向的主版本
FunctionVersion *string `json:"FunctionVersion,omitempty" name:"FunctionVersion"`
// 别名的名称
Name *string `json:"Name,omitempty" name:"Name"`
// 别名的路由信息
RoutingConfig *RoutingConfig `json:"RoutingConfig,omitempty" name:"RoutingConfig"`
// 别名的描述
// 注意:此字段可能返回 null,表示取不到有效值。
Description *string `json:"Description,omitempty" name:"Description"`
// 创建时间
// 注意:此字段可能返回 null,表示取不到有效值。
AddTime *string `json:"AddTime,omitempty" name:"AddTime"`
// 更新时间
// 注意:此字段可能返回 null,表示取不到有效值。
ModTime *string `json:"ModTime,omitempty" name:"ModTime"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *GetAliasResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *GetAliasResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type GetFunctionAddressRequest struct {
*tchttp.BaseRequest
// 函数的名称
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 函数的版本
Qualifier *string `json:"Qualifier,omitempty" name:"Qualifier"`
// 函数的命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
}
func (r *GetFunctionAddressRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *GetFunctionAddressRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type GetFunctionAddressResponse struct {
*tchttp.BaseResponse
Response *struct {
// 函数的Cos地址
Url *string `json:"Url,omitempty" name:"Url"`
// 函数的SHA256编码
CodeSha256 *string `json:"CodeSha256,omitempty" name:"CodeSha256"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *GetFunctionAddressResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *GetFunctionAddressResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type GetFunctionLogsRequest struct {
*tchttp.BaseRequest
// 函数的名称
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 数据的偏移量,Offset+Limit不能大于10000
Offset *int64 `json:"Offset,omitempty" name:"Offset"`
// 返回数据的长度,Offset+Limit不能大于10000
Limit *int64 `json:"Limit,omitempty" name:"Limit"`
// 以升序还是降序的方式对日志进行排序,可选值 desc和 asc
Order *string `json:"Order,omitempty" name:"Order"`
// 根据某个字段排序日志,支持以下字段:function_name, duration, mem_usage, start_time
OrderBy *string `json:"OrderBy,omitempty" name:"OrderBy"`
// 日志过滤条件。可用来区分正确和错误日志,filter.RetCode=not0 表示只返回错误日志,filter.RetCode=is0 表示只返回正确日志,不传,则返回所有日志
Filter *LogFilter `json:"Filter,omitempty" name:"Filter"`
// 函数的命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
// 函数的版本
Qualifier *string `json:"Qualifier,omitempty" name:"Qualifier"`
// 执行该函数对应的requestId
FunctionRequestId *string `json:"FunctionRequestId,omitempty" name:"FunctionRequestId"`
// 查询的具体日期,例如:2017-05-16 20:00:00,只能与endtime相差一天之内
StartTime *string `json:"StartTime,omitempty" name:"StartTime"`
// 查询的具体日期,例如:2017-05-16 20:59:59,只能与startTime相差一天之内
EndTime *string `json:"EndTime,omitempty" name:"EndTime"`
// 服务日志相关参数,第一页日志 Offset 为空字符串,后续分页按响应字段里的SearchContext填写
SearchContext *LogSearchContext `json:"SearchContext,omitempty" name:"SearchContext"`
}
func (r *GetFunctionLogsRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *GetFunctionLogsRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type GetFunctionLogsResponse struct {
*tchttp.BaseResponse
Response *struct {
// 函数日志的总数
TotalCount *int64 `json:"TotalCount,omitempty" name:"TotalCount"`
// 函数日志信息
Data []*FunctionLog `json:"Data,omitempty" name:"Data" list`
// 日志服务分页参数
SearchContext *LogSearchContext `json:"SearchContext,omitempty" name:"SearchContext"`
// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
} `json:"Response"`
}
func (r *GetFunctionLogsResponse) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *GetFunctionLogsResponse) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type GetFunctionRequest struct {
*tchttp.BaseRequest
// 需要获取详情的函数名称
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 函数的版本号
Qualifier *string `json:"Qualifier,omitempty" name:"Qualifier"`
// 函数所属命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
// 是否显示代码, TRUE表示显示代码,FALSE表示不显示代码,大于1M的入口文件不会显示
ShowCode *string `json:"ShowCode,omitempty" name:"ShowCode"`
}
func (r *GetFunctionRequest) ToJsonString() string {
b, _ := json.Marshal(r)
return string(b)
}
func (r *GetFunctionRequest) FromJsonString(s string) error {
return json.Unmarshal([]byte(s), &r)
}
type GetFunctionResponse struct {
*tchttp.BaseResponse
Response *struct {
// 函数的最后修改时间
ModTime *string `json:"ModTime,omitempty" name:"ModTime"`
// 函数的代码
CodeInfo *string `json:"CodeInfo,omitempty" name:"CodeInfo"`
// 函数的描述信息
Description *string `json:"Description,omitempty" name:"Description"`
// 函数的触发器列表
Triggers []*Trigger `json:"Triggers,omitempty" name:"Triggers" list`
// 函数的入口
Handler *string `json:"Handler,omitempty" name:"Handler"`
// 函数代码大小
CodeSize *int64 `json:"CodeSize,omitempty" name:"CodeSize"`
// 函数的超时时间
Timeout *int64 `json:"Timeout,omitempty" name:"Timeout"`
// 函数的版本
FunctionVersion *string `json:"FunctionVersion,omitempty" name:"FunctionVersion"`
// 函数的最大可用内存
MemorySize *int64 `json:"MemorySize,omitempty" name:"MemorySize"`
// 函数的运行环境
Runtime *string `json:"Runtime,omitempty" name:"Runtime"`
// 函数的名称
FunctionName *string `json:"FunctionName,omitempty" name:"FunctionName"`
// 函数的私有网络
VpcConfig *VpcConfig `json:"VpcConfig,omitempty" name:"VpcConfig"`
// 是否使用GPU
UseGpu *string `json:"UseGpu,omitempty" name:"UseGpu"`
// 函数的环境变量
Environment *Environment `json:"Environment,omitempty" name:"Environment"`
// 代码是否正确
CodeResult *string `json:"CodeResult,omitempty" name:"CodeResult"`
// 代码错误信息
CodeError *string `json:"CodeError,omitempty" name:"CodeError"`
// 代码错误码
ErrNo *int64 `json:"ErrNo,omitempty" name:"ErrNo"`
// 函数的命名空间
Namespace *string `json:"Namespace,omitempty" name:"Namespace"`
// 函数绑定的角色
Role *string `json:"Role,omitempty" name:"Role"`
// 是否自动安装依赖
InstallDependency *string `json:"InstallDependency,omitempty" name:"InstallDependency"`
// 函数状态
Status *string `json:"Status,omitempty" name:"Status"`
// 状态描述
StatusDesc *string `json:"StatusDesc,omitempty" name:"StatusDesc"`
// 日志投递到的Cls日志集
ClsLogsetId *string `json:"ClsLogsetId,omitempty" name:"ClsLogsetId"`