-
Notifications
You must be signed in to change notification settings - Fork 38
/
apis.go
2590 lines (1884 loc) · 83 KB
/
apis.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
// Code is generated by ucloud-model, DO NOT EDIT IT.
package ucdn
import (
"github.com/ucloud/ucloud-sdk-go/ucloud/request"
"github.com/ucloud/ucloud-sdk-go/ucloud/response"
)
// UCDN API Schema
// AddCertificateRequest is request schema for AddCertificate action
type AddCertificateRequest struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`
// Ca证书,默认为空
CaCert *string `required:"false"`
// 证书名称
CertName *string `required:"true"`
// 用户私钥
PrivateKey *string `required:"true"`
// 用户证书
UserCert *string `required:"true"`
}
// AddCertificateResponse is response schema for AddCertificate action
type AddCertificateResponse struct {
response.CommonBase
}
// NewAddCertificateRequest will create request of AddCertificate action.
func (c *UCDNClient) NewAddCertificateRequest() *AddCertificateRequest {
req := &AddCertificateRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(false)
return req
}
/*
API: AddCertificate
添加证书
*/
func (c *UCDNClient) AddCertificate(req *AddCertificateRequest) (*AddCertificateResponse, error) {
var err error
var res AddCertificateResponse
reqCopier := *req
err = c.Client.InvokeAction("AddCertificate", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// BatchDescribeNewUcdnDomainRequest is request schema for BatchDescribeNewUcdnDomain action
type BatchDescribeNewUcdnDomainRequest struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html)
// ProjectId *string `required:"false"`
// 渠道ucdn、ufile、uvideo
ChannelType *string `required:"false"`
// 域名id,创建域名时生成的资源id,默认获取账号下的所有域名信息,n为自然数
DomainId []string `required:"false"`
// 返回数据长度,如果制定了Offset,则默认20,否则默认全部,非负整数
Limit *int `required:"false"`
// 数据偏移量,默认0,非负整数
Offset *int `required:"false"`
}
// BatchDescribeNewUcdnDomainResponse is response schema for BatchDescribeNewUcdnDomain action
type BatchDescribeNewUcdnDomainResponse struct {
response.CommonBase
// 标识欠费的数组,数组含有下列元素值, 1=国内流量有欠费 2=国外流量有欠费 3=国内带宽有欠费 4=国外带宽有欠费
Arrearage []string
// 当前计费方式,10-流量付费 20-带宽日峰值 30-月95计费,31-月日均峰值, 32-月第四峰值 33-日均峰值之和 34- 日95再取平均 40-未选择计费方式
ChargeType int
// 域名信息列表,参见DomainInfo
DomainSet []DomainInfo
// 表示最后一次切换的计费方式,10=流量付费 20=带宽日峰值 30=按月后付费 40=未选择计费方式
LastChargeType int
// 最大域名数量,默认20
MaxDomainNum int
// 满足条件的域名个数
TotalCount int
// vip标示,yes-是 no-否
Vip string
}
// NewBatchDescribeNewUcdnDomainRequest will create request of BatchDescribeNewUcdnDomain action.
func (c *UCDNClient) NewBatchDescribeNewUcdnDomainRequest() *BatchDescribeNewUcdnDomainRequest {
req := &BatchDescribeNewUcdnDomainRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: BatchDescribeNewUcdnDomain
批量获取加速域名配置
*/
func (c *UCDNClient) BatchDescribeNewUcdnDomain(req *BatchDescribeNewUcdnDomainRequest) (*BatchDescribeNewUcdnDomainResponse, error) {
var err error
var res BatchDescribeNewUcdnDomainResponse
reqCopier := *req
err = c.Client.InvokeAction("BatchDescribeNewUcdnDomain", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// BatchRefreshNewUcdnDomainCacheRequest is request schema for BatchRefreshNewUcdnDomainCache action
type BatchRefreshNewUcdnDomainCacheRequest struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html)
// ProjectId *string `required:"false"`
// 刷新类型,file代表文件刷新,dir 代表路径刷新
Type *string `required:"true"`
// 待刷新URL列表,以JSON格式描述。刷新多个URL列表时,一次最多提交1000个。每个域名必须以”http://域名/”开始。目录要以”/”结尾, 如刷新目录a下所有文件,格式为:http://abc.ucloud.cn/a/;如刷新文件目录a下面所有img.png文件, 格式为http://abc.ucloud.cn/a/img.png。请正确提交需要刷新的域名
UrlList *string `required:"true"`
}
// BatchRefreshNewUcdnDomainCacheResponse is response schema for BatchRefreshNewUcdnDomainCache action
type BatchRefreshNewUcdnDomainCacheResponse struct {
response.CommonBase
// 本次提交url对应的任务id
TaskId string
}
// NewBatchRefreshNewUcdnDomainCacheRequest will create request of BatchRefreshNewUcdnDomainCache action.
func (c *UCDNClient) NewBatchRefreshNewUcdnDomainCacheRequest() *BatchRefreshNewUcdnDomainCacheRequest {
req := &BatchRefreshNewUcdnDomainCacheRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: BatchRefreshNewUcdnDomainCache
批量刷新缓存
*/
func (c *UCDNClient) BatchRefreshNewUcdnDomainCache(req *BatchRefreshNewUcdnDomainCacheRequest) (*BatchRefreshNewUcdnDomainCacheResponse, error) {
var err error
var res BatchRefreshNewUcdnDomainCacheResponse
reqCopier := *req
err = c.Client.InvokeAction("BatchRefreshNewUcdnDomainCache", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// ControlUcdnDomainCacheAccessRequest is request schema for ControlUcdnDomainCacheAccess action
type ControlUcdnDomainCacheAccessRequest struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`
// forbid=封禁 unforbid=解封 其他值非法
Type *string `required:"true"`
// 待封禁的Url,一次封禁多个Url时最多一次30条,只能对表示文件的Url进行操作
UrlList []string `required:"true"`
}
// ControlUcdnDomainCacheAccessResponse is response schema for ControlUcdnDomainCacheAccess action
type ControlUcdnDomainCacheAccessResponse struct {
response.CommonBase
}
// NewControlUcdnDomainCacheAccessRequest will create request of ControlUcdnDomainCacheAccess action.
func (c *UCDNClient) NewControlUcdnDomainCacheAccessRequest() *ControlUcdnDomainCacheAccessRequest {
req := &ControlUcdnDomainCacheAccessRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: ControlUcdnDomainCacheAccess
封禁解封缓存访问
*/
func (c *UCDNClient) ControlUcdnDomainCacheAccess(req *ControlUcdnDomainCacheAccessRequest) (*ControlUcdnDomainCacheAccessResponse, error) {
var err error
var res ControlUcdnDomainCacheAccessResponse
reqCopier := *req
err = c.Client.InvokeAction("ControlUcdnDomainCacheAccess", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// DeleteCertificateRequest is request schema for DeleteCertificate action
type DeleteCertificateRequest struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`
// 证书名称
CertName *string `required:"true"`
}
// DeleteCertificateResponse is response schema for DeleteCertificate action
type DeleteCertificateResponse struct {
response.CommonBase
}
// NewDeleteCertificateRequest will create request of DeleteCertificate action.
func (c *UCDNClient) NewDeleteCertificateRequest() *DeleteCertificateRequest {
req := &DeleteCertificateRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: DeleteCertificate
删除证书
*/
func (c *UCDNClient) DeleteCertificate(req *DeleteCertificateRequest) (*DeleteCertificateResponse, error) {
var err error
var res DeleteCertificateResponse
reqCopier := *req
err = c.Client.InvokeAction("DeleteCertificate", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// DescribeNewUcdnPrefetchCacheTaskRequest is request schema for DescribeNewUcdnPrefetchCacheTask action
type DescribeNewUcdnPrefetchCacheTaskRequest struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`
// 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值
BeginTime *int `required:"false"`
// 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
EndTime *int `required:"false"`
// 返回数据长度,默认全部,自然数
Limit *int `required:"false"`
// 数据偏移量,默认为0,自然数
Offset *int `required:"false"`
// 需要获取的内容预热的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态
Status *string `required:"false"`
// 提交任务时返回的任务ID
TaskId []string `required:"false"`
}
// DescribeNewUcdnPrefetchCacheTaskResponse is response schema for DescribeNewUcdnPrefetchCacheTask action
type DescribeNewUcdnPrefetchCacheTaskResponse struct {
response.CommonBase
// 预热任务信息,参考TaskInfo
TaskList []TaskInfo
// 预热任务的总数
TotalCount int
}
// NewDescribeNewUcdnPrefetchCacheTaskRequest will create request of DescribeNewUcdnPrefetchCacheTask action.
func (c *UCDNClient) NewDescribeNewUcdnPrefetchCacheTaskRequest() *DescribeNewUcdnPrefetchCacheTaskRequest {
req := &DescribeNewUcdnPrefetchCacheTaskRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: DescribeNewUcdnPrefetchCacheTask
获取预取任务状态
*/
func (c *UCDNClient) DescribeNewUcdnPrefetchCacheTask(req *DescribeNewUcdnPrefetchCacheTaskRequest) (*DescribeNewUcdnPrefetchCacheTaskResponse, error) {
var err error
var res DescribeNewUcdnPrefetchCacheTaskResponse
reqCopier := *req
err = c.Client.InvokeAction("DescribeNewUcdnPrefetchCacheTask", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// DescribeNewUcdnRefreshCacheTaskRequest is request schema for DescribeNewUcdnRefreshCacheTask action
type DescribeNewUcdnRefreshCacheTaskRequest struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`
// 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值
BeginTime *int `required:"false"`
// 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
EndTime *int `required:"false"`
// 返回数据长度,默认全部,自然数
Limit *int `required:"false"`
// 数据偏移量,默认为0,自然数
Offset *int `required:"false"`
// 需要获取的内容刷新的状态,枚举值:success:成功;wait:等待处理;process:正在处理;failure:失败; unknow:未知,默认选择所有状态
Status *string `required:"false"`
// 提交任务时返回的任务ID
TaskId []string `required:"false"`
}
// DescribeNewUcdnRefreshCacheTaskResponse is response schema for DescribeNewUcdnRefreshCacheTask action
type DescribeNewUcdnRefreshCacheTaskResponse struct {
response.CommonBase
// 刷新任务信息,参考TaskInfo
TaskList []TaskInfo
// 刷新任务的总数
TotalCount int
}
// NewDescribeNewUcdnRefreshCacheTaskRequest will create request of DescribeNewUcdnRefreshCacheTask action.
func (c *UCDNClient) NewDescribeNewUcdnRefreshCacheTaskRequest() *DescribeNewUcdnRefreshCacheTaskRequest {
req := &DescribeNewUcdnRefreshCacheTaskRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: DescribeNewUcdnRefreshCacheTask
获取域名刷新任务状态
*/
func (c *UCDNClient) DescribeNewUcdnRefreshCacheTask(req *DescribeNewUcdnRefreshCacheTaskRequest) (*DescribeNewUcdnRefreshCacheTaskResponse, error) {
var err error
var res DescribeNewUcdnRefreshCacheTaskResponse
reqCopier := *req
err = c.Client.InvokeAction("DescribeNewUcdnRefreshCacheTask", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// GetAuthConfigRequest is request schema for GetAuthConfig action
type GetAuthConfigRequest struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`
// [公共参数] 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
// Region *string `required:"true"`
// [公共参数] 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
// Zone *string `required:"true"`
// 希望获取的域名,不传则获取所有
Domain *string `required:"false"`
}
// GetAuthConfigResponse is response schema for GetAuthConfig action
type GetAuthConfigResponse struct {
response.CommonBase
// 鉴权配置列表
AuthConfigs []KwaiDomainAuthConfig
}
// NewGetAuthConfigRequest will create request of GetAuthConfig action.
func (c *UCDNClient) NewGetAuthConfigRequest() *GetAuthConfigRequest {
req := &GetAuthConfigRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: GetAuthConfig
接口获取鉴权信息(非标使用)
*/
func (c *UCDNClient) GetAuthConfig(req *GetAuthConfigRequest) (*GetAuthConfigResponse, error) {
var err error
var res GetAuthConfigResponse
reqCopier := *req
err = c.Client.InvokeAction("GetAuthConfig", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// GetCertificateV2Request is request schema for GetCertificateV2 action
type GetCertificateV2Request struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`
// 长度,默认为全部,非负整数
Limit *int `required:"false"`
// 偏移,默认为0,非负整数
Offset *int `required:"false"`
}
// GetCertificateV2Response is response schema for GetCertificateV2 action
type GetCertificateV2Response struct {
response.CommonBase
// 证书信息列表
CertList []CertList
// 证书数量
TotalCount int
}
// NewGetCertificateV2Request will create request of GetCertificateV2 action.
func (c *UCDNClient) NewGetCertificateV2Request() *GetCertificateV2Request {
req := &GetCertificateV2Request{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: GetCertificateV2
获取证书列表(新)
*/
func (c *UCDNClient) GetCertificateV2(req *GetCertificateV2Request) (*GetCertificateV2Response, error) {
var err error
var res GetCertificateV2Response
reqCopier := *req
err = c.Client.InvokeAction("GetCertificateV2", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// GetNewUcdnDomainBandwidthRequest is request schema for GetNewUcdnDomainBandwidth action
type GetNewUcdnDomainBandwidthRequest struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html)
// ProjectId *string `required:"false"`
// 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域
Areacode *string `required:"false"`
// 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
BeginTime *int `required:"false"`
// 域名id,创建域名时生成的id。默认全部域名
DomainId []string `required:"false"`
// 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
EndTime *int `required:"false"`
// 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)
Type *int `required:"true"`
}
// GetNewUcdnDomainBandwidthResponse is response schema for GetNewUcdnDomainBandwidth action
type GetNewUcdnDomainBandwidthResponse struct {
response.CommonBase
// 带宽信息列表,参见BandwidthInfo
BandwidthList []BandwidthInfo
// 从起始时间到结束时间内的所使用的CDN总流量,单位GB
Traffic float64
}
// NewGetNewUcdnDomainBandwidthRequest will create request of GetNewUcdnDomainBandwidth action.
func (c *UCDNClient) NewGetNewUcdnDomainBandwidthRequest() *GetNewUcdnDomainBandwidthRequest {
req := &GetNewUcdnDomainBandwidthRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: GetNewUcdnDomainBandwidth
获取域名带宽数据
*/
func (c *UCDNClient) GetNewUcdnDomainBandwidth(req *GetNewUcdnDomainBandwidthRequest) (*GetNewUcdnDomainBandwidthResponse, error) {
var err error
var res GetNewUcdnDomainBandwidthResponse
reqCopier := *req
err = c.Client.InvokeAction("GetNewUcdnDomainBandwidth", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// GetNewUcdnDomainHitRateRequest is request schema for GetNewUcdnDomainHitRate action
type GetNewUcdnDomainHitRateRequest struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`
// 查询带宽区域 cn代表国内 abroad代表海外,只支持国内
Areacode *string `required:"false"`
// 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
BeginTime *int `required:"false"`
// 域名id,创建域名时生成的id。默认全部域名
DomainId []string `required:"false"`
// 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
EndTime *int `required:"false"`
// 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)默认5分钟
Type *int `required:"false"`
}
// GetNewUcdnDomainHitRateResponse is response schema for GetNewUcdnDomainHitRate action
type GetNewUcdnDomainHitRateResponse struct {
response.CommonBase
// 请求数实例表。
HitRateList []HitRateInfo
}
// NewGetNewUcdnDomainHitRateRequest will create request of GetNewUcdnDomainHitRate action.
func (c *UCDNClient) NewGetNewUcdnDomainHitRateRequest() *GetNewUcdnDomainHitRateRequest {
req := &GetNewUcdnDomainHitRateRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: GetNewUcdnDomainHitRate
获取域名命中率
*/
func (c *UCDNClient) GetNewUcdnDomainHitRate(req *GetNewUcdnDomainHitRateRequest) (*GetNewUcdnDomainHitRateResponse, error) {
var err error
var res GetNewUcdnDomainHitRateResponse
reqCopier := *req
err = c.Client.InvokeAction("GetNewUcdnDomainHitRate", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// GetNewUcdnDomainHttpCodeRequest is request schema for GetNewUcdnDomainHttpCode action
type GetNewUcdnDomainHttpCodeRequest struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`
// 查询带宽区域 cn代表国内 abroad代表海外,只支持国内
Areacode *string `required:"false"`
// 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
BeginTime *int `required:"false"`
// 域名id,创建域名时生成的id。默认全部域名
DomainId []string `required:"false"`
// 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
EndTime *int `required:"false"`
// 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)
Type *int `required:"true"`
}
// GetNewUcdnDomainHttpCodeResponse is response schema for GetNewUcdnDomainHttpCode action
type GetNewUcdnDomainHttpCodeResponse struct {
response.CommonBase
// 状态码实例表。详细见HttpCodeInfo
HttpCodeDetail []HttpCodeInfo
}
// NewGetNewUcdnDomainHttpCodeRequest will create request of GetNewUcdnDomainHttpCode action.
func (c *UCDNClient) NewGetNewUcdnDomainHttpCodeRequest() *GetNewUcdnDomainHttpCodeRequest {
req := &GetNewUcdnDomainHttpCodeRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: GetNewUcdnDomainHttpCode
获取域名状态码监控
*/
func (c *UCDNClient) GetNewUcdnDomainHttpCode(req *GetNewUcdnDomainHttpCodeRequest) (*GetNewUcdnDomainHttpCodeResponse, error) {
var err error
var res GetNewUcdnDomainHttpCodeResponse
reqCopier := *req
err = c.Client.InvokeAction("GetNewUcdnDomainHttpCode", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// GetNewUcdnDomainHttpCodeV2Request is request schema for GetNewUcdnDomainHttpCodeV2 action
type GetNewUcdnDomainHttpCodeV2Request struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`
// 查询带宽区域 cn代表国内 abroad代表海外,只支持国内
Areacode *string `required:"false"`
// 查询的起始时间,格式为Unix Timestamp。
BeginTime *int `required:"true"`
// 域名id,创建域名时生成的id。默认全部域名
DomainId []string `required:"false"`
// 查询的结束时间,格式为Unix Timestamp。
EndTime *int `required:"true"`
// 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天粒度,3表示按照一分钟粒度)
Type *int `required:"true"`
}
// GetNewUcdnDomainHttpCodeV2Response is response schema for GetNewUcdnDomainHttpCodeV2 action
type GetNewUcdnDomainHttpCodeV2Response struct {
response.CommonBase
// 状态码详情
HttpCodeV2Detail []HttpCodeV2Detail
}
// NewGetNewUcdnDomainHttpCodeV2Request will create request of GetNewUcdnDomainHttpCodeV2 action.
func (c *UCDNClient) NewGetNewUcdnDomainHttpCodeV2Request() *GetNewUcdnDomainHttpCodeV2Request {
req := &GetNewUcdnDomainHttpCodeV2Request{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: GetNewUcdnDomainHttpCodeV2
获取域名详细状态码监控
*/
func (c *UCDNClient) GetNewUcdnDomainHttpCodeV2(req *GetNewUcdnDomainHttpCodeV2Request) (*GetNewUcdnDomainHttpCodeV2Response, error) {
var err error
var res GetNewUcdnDomainHttpCodeV2Response
reqCopier := *req
err = c.Client.InvokeAction("GetNewUcdnDomainHttpCodeV2", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// GetNewUcdnDomainRequestNumRequest is request schema for GetNewUcdnDomainRequestNum action
type GetNewUcdnDomainRequestNumRequest struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](../summary/get_project_list.html)
// ProjectId *string `required:"false"`
// 查询区域 cn代表国内 abroad代表海外,只支持国内
Areacode *string `required:"false"`
// 查询的起始时间,格式为Unix Timestamp。如果有EndTime,BeginTime必须赋值。如没有赋值,则返回缺少参 数错误,如果没有EndTime,BeginTime也可以不赋值,EndTime默认当前时间,BeginTime 默认前一天的当前时间。
BeginTime *int `required:"false"`
// 域名id,创建域名时生成的id。默认全部域名
DomainId []string `required:"false"`
// 查询的结束时间,格式为Unix Timestamp。EndTime默认为当前时间,BeginTime默认为当前时间前一天时间。
EndTime *int `required:"false"`
// 时间粒度(0表示按照5分钟粒度,1表示按照1小时粒度,2表示按照一天的粒度)
Type *int `required:"true"`
}
// GetNewUcdnDomainRequestNumResponse is response schema for GetNewUcdnDomainRequestNum action
type GetNewUcdnDomainRequestNumResponse struct {
response.CommonBase
// 请求数实例表。
RequestList []RequestInfo
}
// NewGetNewUcdnDomainRequestNumRequest will create request of GetNewUcdnDomainRequestNum action.
func (c *UCDNClient) NewGetNewUcdnDomainRequestNumRequest() *GetNewUcdnDomainRequestNumRequest {
req := &GetNewUcdnDomainRequestNumRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: GetNewUcdnDomainRequestNum
获取域名请求数
*/
func (c *UCDNClient) GetNewUcdnDomainRequestNum(req *GetNewUcdnDomainRequestNumRequest) (*GetNewUcdnDomainRequestNumResponse, error) {
var err error
var res GetNewUcdnDomainRequestNumResponse
reqCopier := *req
err = c.Client.InvokeAction("GetNewUcdnDomainRequestNum", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// GetNewUcdnLogRefererStatisticsRequest is request schema for GetNewUcdnLogRefererStatistics action
type GetNewUcdnLogRefererStatisticsRequest struct {
request.CommonBase
// 查询带宽区域 cn代表国内 abroad代表海外 ;目前只支持国内
Areacode *string `required:"false"`
// 查询带宽的起始时间,格式:时间戳
BeginTime *int `required:"false"`
// 域名id,创建域名时生成的id
DomainId *string `required:"false"`
// 查询统计日志的结束时间,格式:时间戳。最大时间间隔30天
EndTime *int `required:"false"`
// 返回的结果数量限制,默认1000
Limit *int `required:"false"`
// 0表示按流量降序排列,1表示按照下载次数降序排列,默认为0
OrderBy *int `required:"false"`
}
// GetNewUcdnLogRefererStatisticsResponse is response schema for GetNewUcdnLogRefererStatistics action
type GetNewUcdnLogRefererStatisticsResponse struct {
response.CommonBase
// 按天统计实例
RefererStatistics []RefererStatistics
}
// NewGetNewUcdnLogRefererStatisticsRequest will create request of GetNewUcdnLogRefererStatistics action.
func (c *UCDNClient) NewGetNewUcdnLogRefererStatisticsRequest() *GetNewUcdnLogRefererStatisticsRequest {
req := &GetNewUcdnLogRefererStatisticsRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: GetNewUcdnLogRefererStatistics
获取热点referer统计
*/
func (c *UCDNClient) GetNewUcdnLogRefererStatistics(req *GetNewUcdnLogRefererStatisticsRequest) (*GetNewUcdnLogRefererStatisticsResponse, error) {
var err error
var res GetNewUcdnLogRefererStatisticsResponse
reqCopier := *req
err = c.Client.InvokeAction("GetNewUcdnLogRefererStatistics", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// GetNewUcdnLogUrlStatisticsRequest is request schema for GetNewUcdnLogUrlStatistics action
type GetNewUcdnLogUrlStatisticsRequest struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`
// 查询带宽区域 cn代表国内 abroad代表海外 只支持国内
Areacode *string `required:"false"`
// 查询带宽的起始时间,格式:时间戳
BeginTime *int `required:"false"`
// 域名Id
DomainId *string `required:"true"`
// 查询统计日志的结束时间,格式:时间戳,只能支持查询1天。可不填
EndTime *int `required:"false"`
// 返回的结果数量限制,默认1000
Limit *int `required:"false"`
// 0表示按流量降序排列,1表示按照下载次数降序排列,默认为0
OrderBy *int `required:"false"`
}
// GetNewUcdnLogUrlStatisticsResponse is response schema for GetNewUcdnLogUrlStatistics action
type GetNewUcdnLogUrlStatisticsResponse struct {
response.CommonBase
// 按天统计实例。
UrlStatisticsList []UrlStatistics
}
// NewGetNewUcdnLogUrlStatisticsRequest will create request of GetNewUcdnLogUrlStatistics action.
func (c *UCDNClient) NewGetNewUcdnLogUrlStatisticsRequest() *GetNewUcdnLogUrlStatisticsRequest {
req := &GetNewUcdnLogUrlStatisticsRequest{}
// setup request with client config
c.Client.SetupRequest(req)
// setup retryable with default retry policy (retry for non-create action and common error)
req.SetRetryable(true)
return req
}
/*
API: GetNewUcdnLogUrlStatistics
获取日志url统计
*/
func (c *UCDNClient) GetNewUcdnLogUrlStatistics(req *GetNewUcdnLogUrlStatisticsRequest) (*GetNewUcdnLogUrlStatisticsResponse, error) {
var err error
var res GetNewUcdnLogUrlStatisticsResponse
reqCopier := *req
err = c.Client.InvokeAction("GetNewUcdnLogUrlStatistics", &reqCopier, &res)
if err != nil {
return &res, err
}
return &res, nil
}
// GetUcdnDomain95BandwidthV2Request is request schema for GetUcdnDomain95BandwidthV2 action
type GetUcdnDomain95BandwidthV2Request struct {
request.CommonBase
// [公共参数] 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list)
// ProjectId *string `required:"false"`
// 查询带宽区域 cn代表国内 abroad代表海外 不填默认为全部区域
Areacode *string `required:"false"`
// 查询的起始日期,格式为Unix Timestamp
BeginTime *int `required:"true"`
// 域名id,创建域名时生成的id。默认全部域名
DomainId []string `required:"false"`
// 查询的结束日期,格式为Unix Timestamp
EndTime *int `required:"true"`