-
Notifications
You must be signed in to change notification settings - Fork 2
/
client.go
9194 lines (7911 loc) · 407 KB
/
client.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 v20180801
import (
"context"
"errors"
"github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common"
tchttp "github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/http"
"github.com/tencentcloud/tencentcloud-sdk-go-intl-en/tencentcloud/common/profile"
)
const APIVersion = "2018-08-01"
type Client struct {
common.Client
}
// Deprecated
func NewClientWithSecretId(secretId, secretKey, region string) (client *Client, err error) {
cpf := profile.NewClientProfile()
client = &Client{}
client.Init(region).WithSecretId(secretId, secretKey).WithProfile(cpf)
return
}
func NewClient(credential common.CredentialIface, region string, clientProfile *profile.ClientProfile) (client *Client, err error) {
client = &Client{}
client.Init(region).
WithCredential(credential).
WithProfile(clientProfile)
return
}
func NewAddDelayLiveStreamRequest() (request *AddDelayLiveStreamRequest) {
request = &AddDelayLiveStreamRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("live", APIVersion, "AddDelayLiveStream")
return
}
func NewAddDelayLiveStreamResponse() (response *AddDelayLiveStreamResponse) {
response = &AddDelayLiveStreamResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// AddDelayLiveStream
// This API is used to set a delay in playing the images of large live streaming events, in case of emergencies.
//
//
//
// Note: if you are to set the delay before stream push, set it at least 5 minutes before the push. This API supports configuration only by stream.
//
// error code that may be returned:
// DRYRUNOPERATION = "DryRunOperation"
// FAILEDOPERATION_CALLOTHERSVRFAILED = "FailedOperation.CallOtherSvrFailed"
// INTERNALERROR = "InternalError"
// INTERNALERROR_CALLOTHERSVRERROR = "InternalError.CallOtherSvrError"
// INTERNALERROR_CONFIGNOTEXIST = "InternalError.ConfigNotExist"
// INTERNALERROR_GETBIZIDERROR = "InternalError.GetBizidError"
// INTERNALERROR_GETSTREAMINFOERROR = "InternalError.GetStreamInfoError"
// INTERNALERROR_NOTPERMMITOPERAT = "InternalError.NotPermmitOperat"
// INTERNALERROR_STREAMSTATUSERROR = "InternalError.StreamStatusError"
// INTERNALERROR_UPDATEDATAERROR = "InternalError.UpdateDataError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCENOTFOUND = "ResourceNotFound"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
// RESOURCENOTFOUND_USERNOTEXIST = "ResourceNotFound.UserNotExist"
func (c *Client) AddDelayLiveStream(request *AddDelayLiveStreamRequest) (response *AddDelayLiveStreamResponse, err error) {
return c.AddDelayLiveStreamWithContext(context.Background(), request)
}
// AddDelayLiveStream
// This API is used to set a delay in playing the images of large live streaming events, in case of emergencies.
//
//
//
// Note: if you are to set the delay before stream push, set it at least 5 minutes before the push. This API supports configuration only by stream.
//
// error code that may be returned:
// DRYRUNOPERATION = "DryRunOperation"
// FAILEDOPERATION_CALLOTHERSVRFAILED = "FailedOperation.CallOtherSvrFailed"
// INTERNALERROR = "InternalError"
// INTERNALERROR_CALLOTHERSVRERROR = "InternalError.CallOtherSvrError"
// INTERNALERROR_CONFIGNOTEXIST = "InternalError.ConfigNotExist"
// INTERNALERROR_GETBIZIDERROR = "InternalError.GetBizidError"
// INTERNALERROR_GETSTREAMINFOERROR = "InternalError.GetStreamInfoError"
// INTERNALERROR_NOTPERMMITOPERAT = "InternalError.NotPermmitOperat"
// INTERNALERROR_STREAMSTATUSERROR = "InternalError.StreamStatusError"
// INTERNALERROR_UPDATEDATAERROR = "InternalError.UpdateDataError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCENOTFOUND = "ResourceNotFound"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
// RESOURCENOTFOUND_USERNOTEXIST = "ResourceNotFound.UserNotExist"
func (c *Client) AddDelayLiveStreamWithContext(ctx context.Context, request *AddDelayLiveStreamRequest) (response *AddDelayLiveStreamResponse, err error) {
if request == nil {
request = NewAddDelayLiveStreamRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("AddDelayLiveStream require credential")
}
request.SetContext(ctx)
response = NewAddDelayLiveStreamResponse()
err = c.Send(request, response)
return
}
func NewAddLiveDomainRequest() (request *AddLiveDomainRequest) {
request = &AddLiveDomainRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("live", APIVersion, "AddLiveDomain")
return
}
func NewAddLiveDomainResponse() (response *AddLiveDomainResponse) {
response = &AddLiveDomainResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// AddLiveDomain
// This API is used to add a domain name. Only one domain name can be submitted at a time, and it must have an ICP filing.
//
// error code that may be returned:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_CALLOTHERSVRFAILED = "FailedOperation.CallOtherSvrFailed"
// FAILEDOPERATION_DELETEDOMAININLOCKEDTIME = "FailedOperation.DeleteDomainInLockedTime"
// FAILEDOPERATION_DOMAINADDED = "FailedOperation.DomainAdded"
// FAILEDOPERATION_DOMAINGSLBFAIL = "FailedOperation.DomainGslbFail"
// FAILEDOPERATION_DOMAINNEEDREALNAME = "FailedOperation.DomainNeedRealName"
// FAILEDOPERATION_DOMAINNEEDVERIFYOWNER = "FailedOperation.DomainNeedVerifyOwner"
// FAILEDOPERATION_HOSTOUTLIMIT = "FailedOperation.HostOutLimit"
// FAILEDOPERATION_PARENTDOMAINADDED = "FailedOperation.ParentDomainAdded"
// FAILEDOPERATION_SUBDOMAINADDED = "FailedOperation.SubDomainAdded"
// INTERNALERROR = "InternalError"
// INTERNALERROR_CHINESECHARACTERDETECTED = "InternalError.ChineseCharacterDetected"
// INTERNALERROR_CONNECTDBERROR = "InternalError.ConnectDbError"
// INTERNALERROR_DBERROR = "InternalError.DBError"
// INTERNALERROR_DOMAINALREADYEXIST = "InternalError.DomainAlreadyExist"
// INTERNALERROR_DOMAINFORMATERROR = "InternalError.DomainFormatError"
// INTERNALERROR_DOMAINGSLBFAIL = "InternalError.DomainGslbFail"
// INTERNALERROR_DOMAINISFAMOUS = "InternalError.DomainIsFamous"
// INTERNALERROR_DOMAINISLIMITED = "InternalError.DomainIsLimited"
// INTERNALERROR_DOMAINNORECORD = "InternalError.DomainNoRecord"
// INTERNALERROR_DOMAINTOOLONG = "InternalError.DomainTooLong"
// INTERNALERROR_INVALIDINPUT = "InternalError.InvalidInput"
// INTERNALERROR_INVALIDUSER = "InternalError.InvalidUser"
// INTERNALERROR_NETWORKERROR = "InternalError.NetworkError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_DOMAINALREADYEXIST = "InvalidParameter.DomainAlreadyExist"
// INVALIDPARAMETER_DOMAINFORMATERROR = "InvalidParameter.DomainFormatError"
// INVALIDPARAMETER_DOMAINHITBLACKLIST = "InvalidParameter.DomainHitBlackList"
// INVALIDPARAMETER_DOMAINISFAMOUS = "InvalidParameter.DomainIsFamous"
// INVALIDPARAMETER_DOMAINISLIMITED = "InvalidParameter.DomainIsLimited"
// INVALIDPARAMETER_DOMAINTOOLONG = "InvalidParameter.DomainTooLong"
// INVALIDPARAMETER_MPHOSTDELETE = "InvalidParameter.MpHostDelete"
// INVALIDPARAMETER_MPPLUGINNOUSE = "InvalidParameter.MpPluginNoUse"
// RESOURCENOTFOUND_DOMAINNORECORD = "ResourceNotFound.DomainNoRecord"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_INVALIDUSER = "ResourceNotFound.InvalidUser"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
func (c *Client) AddLiveDomain(request *AddLiveDomainRequest) (response *AddLiveDomainResponse, err error) {
return c.AddLiveDomainWithContext(context.Background(), request)
}
// AddLiveDomain
// This API is used to add a domain name. Only one domain name can be submitted at a time, and it must have an ICP filing.
//
// error code that may be returned:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_CALLOTHERSVRFAILED = "FailedOperation.CallOtherSvrFailed"
// FAILEDOPERATION_DELETEDOMAININLOCKEDTIME = "FailedOperation.DeleteDomainInLockedTime"
// FAILEDOPERATION_DOMAINADDED = "FailedOperation.DomainAdded"
// FAILEDOPERATION_DOMAINGSLBFAIL = "FailedOperation.DomainGslbFail"
// FAILEDOPERATION_DOMAINNEEDREALNAME = "FailedOperation.DomainNeedRealName"
// FAILEDOPERATION_DOMAINNEEDVERIFYOWNER = "FailedOperation.DomainNeedVerifyOwner"
// FAILEDOPERATION_HOSTOUTLIMIT = "FailedOperation.HostOutLimit"
// FAILEDOPERATION_PARENTDOMAINADDED = "FailedOperation.ParentDomainAdded"
// FAILEDOPERATION_SUBDOMAINADDED = "FailedOperation.SubDomainAdded"
// INTERNALERROR = "InternalError"
// INTERNALERROR_CHINESECHARACTERDETECTED = "InternalError.ChineseCharacterDetected"
// INTERNALERROR_CONNECTDBERROR = "InternalError.ConnectDbError"
// INTERNALERROR_DBERROR = "InternalError.DBError"
// INTERNALERROR_DOMAINALREADYEXIST = "InternalError.DomainAlreadyExist"
// INTERNALERROR_DOMAINFORMATERROR = "InternalError.DomainFormatError"
// INTERNALERROR_DOMAINGSLBFAIL = "InternalError.DomainGslbFail"
// INTERNALERROR_DOMAINISFAMOUS = "InternalError.DomainIsFamous"
// INTERNALERROR_DOMAINISLIMITED = "InternalError.DomainIsLimited"
// INTERNALERROR_DOMAINNORECORD = "InternalError.DomainNoRecord"
// INTERNALERROR_DOMAINTOOLONG = "InternalError.DomainTooLong"
// INTERNALERROR_INVALIDINPUT = "InternalError.InvalidInput"
// INTERNALERROR_INVALIDUSER = "InternalError.InvalidUser"
// INTERNALERROR_NETWORKERROR = "InternalError.NetworkError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_DOMAINALREADYEXIST = "InvalidParameter.DomainAlreadyExist"
// INVALIDPARAMETER_DOMAINFORMATERROR = "InvalidParameter.DomainFormatError"
// INVALIDPARAMETER_DOMAINHITBLACKLIST = "InvalidParameter.DomainHitBlackList"
// INVALIDPARAMETER_DOMAINISFAMOUS = "InvalidParameter.DomainIsFamous"
// INVALIDPARAMETER_DOMAINISLIMITED = "InvalidParameter.DomainIsLimited"
// INVALIDPARAMETER_DOMAINTOOLONG = "InvalidParameter.DomainTooLong"
// INVALIDPARAMETER_MPHOSTDELETE = "InvalidParameter.MpHostDelete"
// INVALIDPARAMETER_MPPLUGINNOUSE = "InvalidParameter.MpPluginNoUse"
// RESOURCENOTFOUND_DOMAINNORECORD = "ResourceNotFound.DomainNoRecord"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_INVALIDUSER = "ResourceNotFound.InvalidUser"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
func (c *Client) AddLiveDomainWithContext(ctx context.Context, request *AddLiveDomainRequest) (response *AddLiveDomainResponse, err error) {
if request == nil {
request = NewAddLiveDomainRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("AddLiveDomain require credential")
}
request.SetContext(ctx)
response = NewAddLiveDomainResponse()
err = c.Send(request, response)
return
}
func NewAddLiveWatermarkRequest() (request *AddLiveWatermarkRequest) {
request = &AddLiveWatermarkRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("live", APIVersion, "AddLiveWatermark")
return
}
func NewAddLiveWatermarkResponse() (response *AddLiveWatermarkResponse) {
response = &AddLiveWatermarkResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// AddLiveWatermark
// After a watermark is added and a watermark ID is successfully returned, you need to call the [CreateLiveWatermarkRule](https://intl.cloud.tencent.com/document/product/267/32629?from_cn_redirect=1) API to bind the watermark ID to a stream.
//
// After the number of watermarks exceeds the upper limit of 100, to add a new watermark, you must delete an old one first.
//
// error code that may be returned:
// INTERNALERROR_CONFOUTLIMIT = "InternalError.ConfOutLimit"
// INTERNALERROR_DBERROR = "InternalError.DBError"
// INTERNALERROR_WATERMARKADDERROR = "InternalError.WatermarkAddError"
// INVALIDPARAMETER = "InvalidParameter"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
// RESOURCENOTFOUND_USERNOTFOUNT = "ResourceNotFound.UserNotFount"
func (c *Client) AddLiveWatermark(request *AddLiveWatermarkRequest) (response *AddLiveWatermarkResponse, err error) {
return c.AddLiveWatermarkWithContext(context.Background(), request)
}
// AddLiveWatermark
// After a watermark is added and a watermark ID is successfully returned, you need to call the [CreateLiveWatermarkRule](https://intl.cloud.tencent.com/document/product/267/32629?from_cn_redirect=1) API to bind the watermark ID to a stream.
//
// After the number of watermarks exceeds the upper limit of 100, to add a new watermark, you must delete an old one first.
//
// error code that may be returned:
// INTERNALERROR_CONFOUTLIMIT = "InternalError.ConfOutLimit"
// INTERNALERROR_DBERROR = "InternalError.DBError"
// INTERNALERROR_WATERMARKADDERROR = "InternalError.WatermarkAddError"
// INVALIDPARAMETER = "InvalidParameter"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
// RESOURCENOTFOUND_USERNOTFOUNT = "ResourceNotFound.UserNotFount"
func (c *Client) AddLiveWatermarkWithContext(ctx context.Context, request *AddLiveWatermarkRequest) (response *AddLiveWatermarkResponse, err error) {
if request == nil {
request = NewAddLiveWatermarkRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("AddLiveWatermark require credential")
}
request.SetContext(ctx)
response = NewAddLiveWatermarkResponse()
err = c.Send(request, response)
return
}
func NewAuthenticateDomainOwnerRequest() (request *AuthenticateDomainOwnerRequest) {
request = &AuthenticateDomainOwnerRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("live", APIVersion, "AuthenticateDomainOwner")
return
}
func NewAuthenticateDomainOwnerResponse() (response *AuthenticateDomainOwnerResponse) {
response = &AuthenticateDomainOwnerResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// AuthenticateDomainOwner
// This API is used to verify the ownership of a domain.
//
// error code that may be returned:
// FAILEDOPERATION = "FailedOperation"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_DOMAINFORMATERROR = "InvalidParameter.DomainFormatError"
func (c *Client) AuthenticateDomainOwner(request *AuthenticateDomainOwnerRequest) (response *AuthenticateDomainOwnerResponse, err error) {
return c.AuthenticateDomainOwnerWithContext(context.Background(), request)
}
// AuthenticateDomainOwner
// This API is used to verify the ownership of a domain.
//
// error code that may be returned:
// FAILEDOPERATION = "FailedOperation"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_DOMAINFORMATERROR = "InvalidParameter.DomainFormatError"
func (c *Client) AuthenticateDomainOwnerWithContext(ctx context.Context, request *AuthenticateDomainOwnerRequest) (response *AuthenticateDomainOwnerResponse, err error) {
if request == nil {
request = NewAuthenticateDomainOwnerRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("AuthenticateDomainOwner require credential")
}
request.SetContext(ctx)
response = NewAuthenticateDomainOwnerResponse()
err = c.Send(request, response)
return
}
func NewCancelCommonMixStreamRequest() (request *CancelCommonMixStreamRequest) {
request = &CancelCommonMixStreamRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("live", APIVersion, "CancelCommonMixStream")
return
}
func NewCancelCommonMixStreamResponse() (response *CancelCommonMixStreamResponse) {
response = &CancelCommonMixStreamResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CancelCommonMixStream
// This API is used to cancel a stream mix. It can be used basically in the same way as `mix_streamv2.cancel_mix_stream`.
//
// error code that may be returned:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_CALLOTHERSVRERROR = "FailedOperation.CallOtherSvrError"
// FAILEDOPERATION_CALLOTHERSVRFAILED = "FailedOperation.CallOtherSvrFailed"
// FAILEDOPERATION_CANCELSESSIONNOTEXIST = "FailedOperation.CancelSessionNotExist"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_CANCELSESSIONNOTEXIST = "InvalidParameter.CancelSessionNotExist"
// INVALIDPARAMETER_OTHERERROR = "InvalidParameter.OtherError"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
func (c *Client) CancelCommonMixStream(request *CancelCommonMixStreamRequest) (response *CancelCommonMixStreamResponse, err error) {
return c.CancelCommonMixStreamWithContext(context.Background(), request)
}
// CancelCommonMixStream
// This API is used to cancel a stream mix. It can be used basically in the same way as `mix_streamv2.cancel_mix_stream`.
//
// error code that may be returned:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_CALLOTHERSVRERROR = "FailedOperation.CallOtherSvrError"
// FAILEDOPERATION_CALLOTHERSVRFAILED = "FailedOperation.CallOtherSvrFailed"
// FAILEDOPERATION_CANCELSESSIONNOTEXIST = "FailedOperation.CancelSessionNotExist"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_CANCELSESSIONNOTEXIST = "InvalidParameter.CancelSessionNotExist"
// INVALIDPARAMETER_OTHERERROR = "InvalidParameter.OtherError"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
func (c *Client) CancelCommonMixStreamWithContext(ctx context.Context, request *CancelCommonMixStreamRequest) (response *CancelCommonMixStreamResponse, err error) {
if request == nil {
request = NewCancelCommonMixStreamRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CancelCommonMixStream require credential")
}
request.SetContext(ctx)
response = NewCancelCommonMixStreamResponse()
err = c.Send(request, response)
return
}
func NewCreateCommonMixStreamRequest() (request *CreateCommonMixStreamRequest) {
request = &CreateCommonMixStreamRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("live", APIVersion, "CreateCommonMixStream")
return
}
func NewCreateCommonMixStreamResponse() (response *CreateCommonMixStreamResponse) {
response = &CreateCommonMixStreamResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CreateCommonMixStream
// This API is used to create a general stream mix. It can be used basically in the same way as the legacy `mix_streamv2.start_mix_stream_advanced` API.
//
// Note: currently, up to 16 streams can be mixed.
//
// Best practice: https://intl.cloud.tencent.com/document/product/267/45566?from_cn_redirect=1
//
// error code that may be returned:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_CALLOTHERSVRERROR = "FailedOperation.CallOtherSvrError"
// FAILEDOPERATION_CALLOTHERSVRFAILED = "FailedOperation.CallOtherSvrFailed"
// FAILEDOPERATION_CANCELSESSIONNOTEXIST = "FailedOperation.CancelSessionNotExist"
// FAILEDOPERATION_GETPICTUREURLERROR = "FailedOperation.GetPictureUrlError"
// FAILEDOPERATION_GETSTREAMRESOLUTIONERROR = "FailedOperation.GetStreamResolutionError"
// FAILEDOPERATION_PROCESSMIXERROR = "FailedOperation.ProcessMixError"
// FAILEDOPERATION_STREAMNOTEXIST = "FailedOperation.StreamNotExist"
// INTERNALERROR = "InternalError"
// INTERNALERROR_JIFEIOTHERERROR = "InternalError.JiFeiOtherError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_CANCELSESSIONNOTEXIST = "InvalidParameter.CancelSessionNotExist"
// INVALIDPARAMETER_INPUTNUMLIMITEXCEEDED = "InvalidParameter.InputNumLimitExceeded"
// INVALIDPARAMETER_INVALIDBACKGROUDRESOLUTION = "InvalidParameter.InvalidBackgroudResolution"
// INVALIDPARAMETER_INVALIDBITRATE = "InvalidParameter.InvalidBitrate"
// INVALIDPARAMETER_INVALIDCROPPARAM = "InvalidParameter.InvalidCropParam"
// INVALIDPARAMETER_INVALIDLAYERPARAM = "InvalidParameter.InvalidLayerParam"
// INVALIDPARAMETER_INVALIDOUTPUTSTREAMID = "InvalidParameter.InvalidOutputStreamID"
// INVALIDPARAMETER_INVALIDOUTPUTTYPE = "InvalidParameter.InvalidOutputType"
// INVALIDPARAMETER_INVALIDPICTUREID = "InvalidParameter.InvalidPictureID"
// INVALIDPARAMETER_INVALIDROUNDRECTRADIUS = "InvalidParameter.InvalidRoundRectRadius"
// INVALIDPARAMETER_OTHERERROR = "InvalidParameter.OtherError"
// INVALIDPARAMETER_SESSIONOUTPUTSTREAMCHANGED = "InvalidParameter.SessionOutputStreamChanged"
// INVALIDPARAMETER_TEMPLATENOTMATCHINPUTNUM = "InvalidParameter.TemplateNotMatchInputNum"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
func (c *Client) CreateCommonMixStream(request *CreateCommonMixStreamRequest) (response *CreateCommonMixStreamResponse, err error) {
return c.CreateCommonMixStreamWithContext(context.Background(), request)
}
// CreateCommonMixStream
// This API is used to create a general stream mix. It can be used basically in the same way as the legacy `mix_streamv2.start_mix_stream_advanced` API.
//
// Note: currently, up to 16 streams can be mixed.
//
// Best practice: https://intl.cloud.tencent.com/document/product/267/45566?from_cn_redirect=1
//
// error code that may be returned:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_CALLOTHERSVRERROR = "FailedOperation.CallOtherSvrError"
// FAILEDOPERATION_CALLOTHERSVRFAILED = "FailedOperation.CallOtherSvrFailed"
// FAILEDOPERATION_CANCELSESSIONNOTEXIST = "FailedOperation.CancelSessionNotExist"
// FAILEDOPERATION_GETPICTUREURLERROR = "FailedOperation.GetPictureUrlError"
// FAILEDOPERATION_GETSTREAMRESOLUTIONERROR = "FailedOperation.GetStreamResolutionError"
// FAILEDOPERATION_PROCESSMIXERROR = "FailedOperation.ProcessMixError"
// FAILEDOPERATION_STREAMNOTEXIST = "FailedOperation.StreamNotExist"
// INTERNALERROR = "InternalError"
// INTERNALERROR_JIFEIOTHERERROR = "InternalError.JiFeiOtherError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_CANCELSESSIONNOTEXIST = "InvalidParameter.CancelSessionNotExist"
// INVALIDPARAMETER_INPUTNUMLIMITEXCEEDED = "InvalidParameter.InputNumLimitExceeded"
// INVALIDPARAMETER_INVALIDBACKGROUDRESOLUTION = "InvalidParameter.InvalidBackgroudResolution"
// INVALIDPARAMETER_INVALIDBITRATE = "InvalidParameter.InvalidBitrate"
// INVALIDPARAMETER_INVALIDCROPPARAM = "InvalidParameter.InvalidCropParam"
// INVALIDPARAMETER_INVALIDLAYERPARAM = "InvalidParameter.InvalidLayerParam"
// INVALIDPARAMETER_INVALIDOUTPUTSTREAMID = "InvalidParameter.InvalidOutputStreamID"
// INVALIDPARAMETER_INVALIDOUTPUTTYPE = "InvalidParameter.InvalidOutputType"
// INVALIDPARAMETER_INVALIDPICTUREID = "InvalidParameter.InvalidPictureID"
// INVALIDPARAMETER_INVALIDROUNDRECTRADIUS = "InvalidParameter.InvalidRoundRectRadius"
// INVALIDPARAMETER_OTHERERROR = "InvalidParameter.OtherError"
// INVALIDPARAMETER_SESSIONOUTPUTSTREAMCHANGED = "InvalidParameter.SessionOutputStreamChanged"
// INVALIDPARAMETER_TEMPLATENOTMATCHINPUTNUM = "InvalidParameter.TemplateNotMatchInputNum"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
func (c *Client) CreateCommonMixStreamWithContext(ctx context.Context, request *CreateCommonMixStreamRequest) (response *CreateCommonMixStreamResponse, err error) {
if request == nil {
request = NewCreateCommonMixStreamRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CreateCommonMixStream require credential")
}
request.SetContext(ctx)
response = NewCreateCommonMixStreamResponse()
err = c.Send(request, response)
return
}
func NewCreateLiveCallbackRuleRequest() (request *CreateLiveCallbackRuleRequest) {
request = &CreateLiveCallbackRuleRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("live", APIVersion, "CreateLiveCallbackRule")
return
}
func NewCreateLiveCallbackRuleResponse() (response *CreateLiveCallbackRuleResponse) {
response = &CreateLiveCallbackRuleResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CreateLiveCallbackRule
// To create a callback rule, you need to first call the [CreateLiveCallbackTemplate](https://intl.cloud.tencent.com/document/product/267/32637?from_cn_redirect=1) API to create a callback template and bind the returned template ID to the domain name/path.
//
// <br>Callback protocol-related document: [Event Message Notification](https://intl.cloud.tencent.com/document/product/267/32744?from_cn_redirect=1).
//
// error code that may be returned:
// INTERNALERROR = "InternalError"
// INTERNALERROR_CONFNOTFOUND = "InternalError.ConfNotFound"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_CONFNOTFOUND = "InvalidParameter.ConfNotFound"
// INVALIDPARAMETER_DOMAINFORMATERROR = "InvalidParameter.DomainFormatError"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
// UNSUPPORTEDOPERATION_NOTLVBCODEMODE = "UnsupportedOperation.NotLVBCodeMode"
func (c *Client) CreateLiveCallbackRule(request *CreateLiveCallbackRuleRequest) (response *CreateLiveCallbackRuleResponse, err error) {
return c.CreateLiveCallbackRuleWithContext(context.Background(), request)
}
// CreateLiveCallbackRule
// To create a callback rule, you need to first call the [CreateLiveCallbackTemplate](https://intl.cloud.tencent.com/document/product/267/32637?from_cn_redirect=1) API to create a callback template and bind the returned template ID to the domain name/path.
//
// <br>Callback protocol-related document: [Event Message Notification](https://intl.cloud.tencent.com/document/product/267/32744?from_cn_redirect=1).
//
// error code that may be returned:
// INTERNALERROR = "InternalError"
// INTERNALERROR_CONFNOTFOUND = "InternalError.ConfNotFound"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_CONFNOTFOUND = "InvalidParameter.ConfNotFound"
// INVALIDPARAMETER_DOMAINFORMATERROR = "InvalidParameter.DomainFormatError"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
// UNSUPPORTEDOPERATION_NOTLVBCODEMODE = "UnsupportedOperation.NotLVBCodeMode"
func (c *Client) CreateLiveCallbackRuleWithContext(ctx context.Context, request *CreateLiveCallbackRuleRequest) (response *CreateLiveCallbackRuleResponse, err error) {
if request == nil {
request = NewCreateLiveCallbackRuleRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CreateLiveCallbackRule require credential")
}
request.SetContext(ctx)
response = NewCreateLiveCallbackRuleResponse()
err = c.Send(request, response)
return
}
func NewCreateLiveCallbackTemplateRequest() (request *CreateLiveCallbackTemplateRequest) {
request = &CreateLiveCallbackTemplateRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("live", APIVersion, "CreateLiveCallbackTemplate")
return
}
func NewCreateLiveCallbackTemplateResponse() (response *CreateLiveCallbackTemplateResponse) {
response = &CreateLiveCallbackTemplateResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CreateLiveCallbackTemplate
// This API is used to create a callback template. Up to 50 templates can be created. After the template ID is returned, you need to call the [CreateLiveCallbackRule](https://intl.cloud.tencent.com/document/product/267/32638?from_cn_redirect=1) API to bind the template ID to a domain name/path.
//
// <br>For information about callback protocols, see [How to Receive Event Notification](https://intl.cloud.tencent.com/document/product/267/32744?from_cn_redirect=1).
//
// Note: You need to specify at least one callback URL.
//
// error code that may be returned:
// FAILEDOPERATION_CONFINUSED = "FailedOperation.ConfInUsed"
// FAILEDOPERATION_NOTFOUND = "FailedOperation.NotFound"
// INTERNALERROR = "InternalError"
// INTERNALERROR_ARGSNOTMATCH = "InternalError.ArgsNotMatch"
// INTERNALERROR_CONFINUSED = "InternalError.ConfInUsed"
// INTERNALERROR_CONFNOTFOUND = "InternalError.ConfNotFound"
// INTERNALERROR_CONFOUTLIMIT = "InternalError.ConfOutLimit"
// INTERNALERROR_INVALIDINPUT = "InternalError.InvalidInput"
// INTERNALERROR_NOTFOUND = "InternalError.NotFound"
// INTERNALERROR_RULEALREADYEXIST = "InternalError.RuleAlreadyExist"
// INTERNALERROR_RULEINUSING = "InternalError.RuleInUsing"
// INTERNALERROR_RULENOTFOUND = "InternalError.RuleNotFound"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_ARGSNOTMATCH = "InvalidParameter.ArgsNotMatch"
// INVALIDPARAMETER_COSCUSTOMFILENAMEERROR = "InvalidParameter.COSCustomFileNameError"
// INVALIDPARAMETER_INVALIDVODFILENAME = "InvalidParameter.InvalidVodFileName"
// INVALIDPARAMETER_URLNOTSAFE = "InvalidParameter.UrlNotSafe"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
// UNSUPPORTEDOPERATION_NOTLVBCODEMODE = "UnsupportedOperation.NotLVBCodeMode"
func (c *Client) CreateLiveCallbackTemplate(request *CreateLiveCallbackTemplateRequest) (response *CreateLiveCallbackTemplateResponse, err error) {
return c.CreateLiveCallbackTemplateWithContext(context.Background(), request)
}
// CreateLiveCallbackTemplate
// This API is used to create a callback template. Up to 50 templates can be created. After the template ID is returned, you need to call the [CreateLiveCallbackRule](https://intl.cloud.tencent.com/document/product/267/32638?from_cn_redirect=1) API to bind the template ID to a domain name/path.
//
// <br>For information about callback protocols, see [How to Receive Event Notification](https://intl.cloud.tencent.com/document/product/267/32744?from_cn_redirect=1).
//
// Note: You need to specify at least one callback URL.
//
// error code that may be returned:
// FAILEDOPERATION_CONFINUSED = "FailedOperation.ConfInUsed"
// FAILEDOPERATION_NOTFOUND = "FailedOperation.NotFound"
// INTERNALERROR = "InternalError"
// INTERNALERROR_ARGSNOTMATCH = "InternalError.ArgsNotMatch"
// INTERNALERROR_CONFINUSED = "InternalError.ConfInUsed"
// INTERNALERROR_CONFNOTFOUND = "InternalError.ConfNotFound"
// INTERNALERROR_CONFOUTLIMIT = "InternalError.ConfOutLimit"
// INTERNALERROR_INVALIDINPUT = "InternalError.InvalidInput"
// INTERNALERROR_NOTFOUND = "InternalError.NotFound"
// INTERNALERROR_RULEALREADYEXIST = "InternalError.RuleAlreadyExist"
// INTERNALERROR_RULEINUSING = "InternalError.RuleInUsing"
// INTERNALERROR_RULENOTFOUND = "InternalError.RuleNotFound"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_ARGSNOTMATCH = "InvalidParameter.ArgsNotMatch"
// INVALIDPARAMETER_COSCUSTOMFILENAMEERROR = "InvalidParameter.COSCustomFileNameError"
// INVALIDPARAMETER_INVALIDVODFILENAME = "InvalidParameter.InvalidVodFileName"
// INVALIDPARAMETER_URLNOTSAFE = "InvalidParameter.UrlNotSafe"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
// UNSUPPORTEDOPERATION_NOTLVBCODEMODE = "UnsupportedOperation.NotLVBCodeMode"
func (c *Client) CreateLiveCallbackTemplateWithContext(ctx context.Context, request *CreateLiveCallbackTemplateRequest) (response *CreateLiveCallbackTemplateResponse, err error) {
if request == nil {
request = NewCreateLiveCallbackTemplateRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CreateLiveCallbackTemplate require credential")
}
request.SetContext(ctx)
response = NewCreateLiveCallbackTemplateResponse()
err = c.Send(request, response)
return
}
func NewCreateLivePullStreamTaskRequest() (request *CreateLivePullStreamTaskRequest) {
request = &CreateLivePullStreamTaskRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("live", APIVersion, "CreateLivePullStreamTask")
return
}
func NewCreateLivePullStreamTaskResponse() (response *CreateLivePullStreamTaskResponse) {
response = &CreateLivePullStreamTaskResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CreateLivePullStreamTask
// This API is used to create a task to pull streams from video files or an external live streaming source and publish them to a specified destination URL.
//
// Notes:
//
// 1. By default, you can have at most 20 stream pulling tasks at a time. You can submit a ticket to raise the limit.
//
// 2. Only H.264 and H.265 are supported for video. If the source video is in a different format, please transcode it first.
//
// 3. Only AAC is supported for audio. If the source audio is in a different format, please transcode it first.
//
// 4. You can enable auto deletion in the console to delete expired tasks automatically.
//
// 5. The pull and relay feature is a paid feature. For its billing details, see [Relay](https://intl.cloud.tencent.com/document/product/267/53308?from_cn_redirect=1).
//
// 6. CSS is only responsible for pulling and relaying content. Please make sure that your content is authorized and complies with relevant laws and regulations. In case of copyright infringement or violation of laws or regulations, CSS will suspend its service for you and reserves the right to seek legal remedies.
//
// error code that may be returned:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_CALLOTHERSVRFAILED = "FailedOperation.CallOtherSvrFailed"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_INVALIDBACKUPTOURL = "InvalidParameter.InvalidBackupToUrl"
// INVALIDPARAMETER_INVALIDCALLBACKURL = "InvalidParameter.InvalidCallbackUrl"
// INVALIDPARAMETER_INVALIDMIXINPUTPARAM = "InvalidParameter.InvalidMixInputParam"
// INVALIDPARAMETER_INVALIDOUTPUTPARAM = "InvalidParameter.InvalidOutputParam"
// INVALIDPARAMETER_INVALIDSOURCEURL = "InvalidParameter.InvalidSourceUrl"
// INVALIDPARAMETER_INVALIDTASKTIME = "InvalidParameter.InvalidTaskTime"
// INVALIDPARAMETER_INVALIDTOURL = "InvalidParameter.InvalidToUrl"
// INVALIDPARAMETER_INVALIDWATERMARK = "InvalidParameter.InvalidWatermark"
// INVALIDPARAMETER_TASKNOTEXIST = "InvalidParameter.TaskNotExist"
// INVALIDPARAMETER_TASKNUMMORETHANLIMIT = "InvalidParameter.TaskNumMoreThanLimit"
// INVALIDPARAMETER_TOURLNOPERMISSION = "InvalidParameter.ToUrlNoPermission"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
// RESOURCENOTFOUND_USERNOTEXIST = "ResourceNotFound.UserNotExist"
func (c *Client) CreateLivePullStreamTask(request *CreateLivePullStreamTaskRequest) (response *CreateLivePullStreamTaskResponse, err error) {
return c.CreateLivePullStreamTaskWithContext(context.Background(), request)
}
// CreateLivePullStreamTask
// This API is used to create a task to pull streams from video files or an external live streaming source and publish them to a specified destination URL.
//
// Notes:
//
// 1. By default, you can have at most 20 stream pulling tasks at a time. You can submit a ticket to raise the limit.
//
// 2. Only H.264 and H.265 are supported for video. If the source video is in a different format, please transcode it first.
//
// 3. Only AAC is supported for audio. If the source audio is in a different format, please transcode it first.
//
// 4. You can enable auto deletion in the console to delete expired tasks automatically.
//
// 5. The pull and relay feature is a paid feature. For its billing details, see [Relay](https://intl.cloud.tencent.com/document/product/267/53308?from_cn_redirect=1).
//
// 6. CSS is only responsible for pulling and relaying content. Please make sure that your content is authorized and complies with relevant laws and regulations. In case of copyright infringement or violation of laws or regulations, CSS will suspend its service for you and reserves the right to seek legal remedies.
//
// error code that may be returned:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_CALLOTHERSVRFAILED = "FailedOperation.CallOtherSvrFailed"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_INVALIDBACKUPTOURL = "InvalidParameter.InvalidBackupToUrl"
// INVALIDPARAMETER_INVALIDCALLBACKURL = "InvalidParameter.InvalidCallbackUrl"
// INVALIDPARAMETER_INVALIDMIXINPUTPARAM = "InvalidParameter.InvalidMixInputParam"
// INVALIDPARAMETER_INVALIDOUTPUTPARAM = "InvalidParameter.InvalidOutputParam"
// INVALIDPARAMETER_INVALIDSOURCEURL = "InvalidParameter.InvalidSourceUrl"
// INVALIDPARAMETER_INVALIDTASKTIME = "InvalidParameter.InvalidTaskTime"
// INVALIDPARAMETER_INVALIDTOURL = "InvalidParameter.InvalidToUrl"
// INVALIDPARAMETER_INVALIDWATERMARK = "InvalidParameter.InvalidWatermark"
// INVALIDPARAMETER_TASKNOTEXIST = "InvalidParameter.TaskNotExist"
// INVALIDPARAMETER_TASKNUMMORETHANLIMIT = "InvalidParameter.TaskNumMoreThanLimit"
// INVALIDPARAMETER_TOURLNOPERMISSION = "InvalidParameter.ToUrlNoPermission"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
// RESOURCENOTFOUND_USERNOTEXIST = "ResourceNotFound.UserNotExist"
func (c *Client) CreateLivePullStreamTaskWithContext(ctx context.Context, request *CreateLivePullStreamTaskRequest) (response *CreateLivePullStreamTaskResponse, err error) {
if request == nil {
request = NewCreateLivePullStreamTaskRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CreateLivePullStreamTask require credential")
}
request.SetContext(ctx)
response = NewCreateLivePullStreamTaskResponse()
err = c.Send(request, response)
return
}
func NewCreateLiveRecordRequest() (request *CreateLiveRecordRequest) {
request = &CreateLiveRecordRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("live", APIVersion, "CreateLiveRecord")
return
}
func NewCreateLiveRecordResponse() (response *CreateLiveRecordResponse) {
response = &CreateLiveRecordResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CreateLiveRecord
// - Prerequisites
//
// 1. Recording files are stored on the VOD platform, so if you need to use the recording feature, you must first activate the VOD service.
//
// 2. After the recording files are stored, applicable fees (including storage fees and downstream playback traffic fees) will be charged according to the VOD billing mode. For more information, please see the [corresponding document](https://intl.cloud.tencent.com/document/product/266/2838?from_cn_redirect=1).
//
//
//
// - Mode description
//
// This API supports two recording modes:
//
// 1. Scheduled recording mode **(default mode)**.
//
// The start time and end time need to be passed in, according to which the recording task will start and end automatically. Before the set end time expires (provided that `StopLiveRecord` is not called to terminate the task prematurely), the recording task is valid and will be started even after the push is interrupted and restarted multiple times.
//
// 2. Real-time video recording mode.
//
// The start time passed in will be ignored, and recording will be started immediately after the recording task is created. The recording duration can be up to 30 minutes. If the end time passed in is more than 30 minutes after the current time, it will be counted as 30 minutes. Real-time video recording is mainly used for recording highlight scenes, and you are recommended to keep the duration within 5 minutes.
//
//
//
// - Precautions
//
// 1. The API call timeout period should be set to more than 3 seconds; otherwise, retries and calls by different start/end time values may result in repeated recording tasks and thus incur additional recording fees.
//
// 2. Subject to the audio and video file formats (FLV/MP4/HLS), the video codec of H.264 and audio codec of AAC are supported.
//
// 3. In order to avoid malicious or unintended frequent API requests, the maximum number of tasks that can be created in scheduled recording mode is limited: up to 4,000 tasks can be created per day (excluding deleted ones), and up to 400 ones can run concurrently. If you need a higher upper limit, please submit a ticket for application.
//
// 4. This calling method does not support recording streams outside Mainland China for the time being.
//
// error code that may be returned:
// INTERNALERROR = "InternalError"
// INTERNALERROR_GETCONFIGERROR = "InternalError.GetConfigError"
// INTERNALERROR_NETWORKERROR = "InternalError.NetworkError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// LIMITEXCEEDED_MAXIMUMRUNNINGTASK = "LimitExceeded.MaximumRunningTask"
// LIMITEXCEEDED_MAXIMUMTASK = "LimitExceeded.MaximumTask"
// RESOURCENOTFOUND_CHANNELNOTEXIST = "ResourceNotFound.ChannelNotExist"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
// RESOURCEUNAVAILABLE_INVALIDVODSTATUS = "ResourceUnavailable.InvalidVodStatus"
// RESOURCEUNAVAILABLE_STREAMNOTEXIST = "ResourceUnavailable.StreamNotExist"
func (c *Client) CreateLiveRecord(request *CreateLiveRecordRequest) (response *CreateLiveRecordResponse, err error) {
return c.CreateLiveRecordWithContext(context.Background(), request)
}
// CreateLiveRecord
// - Prerequisites
//
// 1. Recording files are stored on the VOD platform, so if you need to use the recording feature, you must first activate the VOD service.
//
// 2. After the recording files are stored, applicable fees (including storage fees and downstream playback traffic fees) will be charged according to the VOD billing mode. For more information, please see the [corresponding document](https://intl.cloud.tencent.com/document/product/266/2838?from_cn_redirect=1).
//
//
//
// - Mode description
//
// This API supports two recording modes:
//
// 1. Scheduled recording mode **(default mode)**.
//
// The start time and end time need to be passed in, according to which the recording task will start and end automatically. Before the set end time expires (provided that `StopLiveRecord` is not called to terminate the task prematurely), the recording task is valid and will be started even after the push is interrupted and restarted multiple times.
//
// 2. Real-time video recording mode.
//
// The start time passed in will be ignored, and recording will be started immediately after the recording task is created. The recording duration can be up to 30 minutes. If the end time passed in is more than 30 minutes after the current time, it will be counted as 30 minutes. Real-time video recording is mainly used for recording highlight scenes, and you are recommended to keep the duration within 5 minutes.
//
//
//
// - Precautions
//
// 1. The API call timeout period should be set to more than 3 seconds; otherwise, retries and calls by different start/end time values may result in repeated recording tasks and thus incur additional recording fees.
//
// 2. Subject to the audio and video file formats (FLV/MP4/HLS), the video codec of H.264 and audio codec of AAC are supported.
//
// 3. In order to avoid malicious or unintended frequent API requests, the maximum number of tasks that can be created in scheduled recording mode is limited: up to 4,000 tasks can be created per day (excluding deleted ones), and up to 400 ones can run concurrently. If you need a higher upper limit, please submit a ticket for application.
//
// 4. This calling method does not support recording streams outside Mainland China for the time being.
//
// error code that may be returned:
// INTERNALERROR = "InternalError"
// INTERNALERROR_GETCONFIGERROR = "InternalError.GetConfigError"
// INTERNALERROR_NETWORKERROR = "InternalError.NetworkError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// LIMITEXCEEDED_MAXIMUMRUNNINGTASK = "LimitExceeded.MaximumRunningTask"
// LIMITEXCEEDED_MAXIMUMTASK = "LimitExceeded.MaximumTask"
// RESOURCENOTFOUND_CHANNELNOTEXIST = "ResourceNotFound.ChannelNotExist"
// RESOURCENOTFOUND_FORBIDSERVICE = "ResourceNotFound.ForbidService"
// RESOURCENOTFOUND_FREEZESERVICE = "ResourceNotFound.FreezeService"
// RESOURCENOTFOUND_STOPSERVICE = "ResourceNotFound.StopService"
// RESOURCENOTFOUND_USERDISABLESERVICE = "ResourceNotFound.UserDisableService"
// RESOURCEUNAVAILABLE_INVALIDVODSTATUS = "ResourceUnavailable.InvalidVodStatus"
// RESOURCEUNAVAILABLE_STREAMNOTEXIST = "ResourceUnavailable.StreamNotExist"
func (c *Client) CreateLiveRecordWithContext(ctx context.Context, request *CreateLiveRecordRequest) (response *CreateLiveRecordResponse, err error) {
if request == nil {
request = NewCreateLiveRecordRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CreateLiveRecord require credential")
}
request.SetContext(ctx)
response = NewCreateLiveRecordResponse()
err = c.Send(request, response)
return
}
func NewCreateLiveRecordRuleRequest() (request *CreateLiveRecordRuleRequest) {
request = &CreateLiveRecordRuleRequest{
BaseRequest: &tchttp.BaseRequest{},