-
Notifications
You must be signed in to change notification settings - Fork 196
/
client.go
5952 lines (4999 loc) · 234 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 v20180317
import (
"context"
"errors"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
tchttp "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http"
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
)
const APIVersion = "2018-03-17"
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 NewAssociateTargetGroupsRequest() (request *AssociateTargetGroupsRequest) {
request = &AssociateTargetGroupsRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("clb", APIVersion, "AssociateTargetGroups")
return
}
func NewAssociateTargetGroupsResponse() (response *AssociateTargetGroupsResponse) {
response = &AssociateTargetGroupsResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// AssociateTargetGroups
// 本接口(AssociateTargetGroups)用来将目标组绑定到负载均衡的监听器(四层协议)或转发规则(七层协议)上。
//
// 本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_RESOURCEINOPERATING = "FailedOperation.ResourceInOperating"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// LIMITEXCEEDED = "LimitExceeded"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) AssociateTargetGroups(request *AssociateTargetGroupsRequest) (response *AssociateTargetGroupsResponse, err error) {
return c.AssociateTargetGroupsWithContext(context.Background(), request)
}
// AssociateTargetGroups
// 本接口(AssociateTargetGroups)用来将目标组绑定到负载均衡的监听器(四层协议)或转发规则(七层协议)上。
//
// 本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_RESOURCEINOPERATING = "FailedOperation.ResourceInOperating"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// LIMITEXCEEDED = "LimitExceeded"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) AssociateTargetGroupsWithContext(ctx context.Context, request *AssociateTargetGroupsRequest) (response *AssociateTargetGroupsResponse, err error) {
if request == nil {
request = NewAssociateTargetGroupsRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("AssociateTargetGroups require credential")
}
request.SetContext(ctx)
response = NewAssociateTargetGroupsResponse()
err = c.Send(request, response)
return
}
func NewAutoRewriteRequest() (request *AutoRewriteRequest) {
request = &AutoRewriteRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("clb", APIVersion, "AutoRewrite")
return
}
func NewAutoRewriteResponse() (response *AutoRewriteResponse) {
response = &AutoRewriteResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// AutoRewrite
// 用户需要先创建出一个HTTPS:443监听器,并在其下创建转发规则。通过调用本接口,系统会自动创建出一个HTTP:80监听器(如果之前不存在),并在其下创建转发规则,与HTTPS:443监听器下的Domains(在入参中指定)对应。创建成功后可以通过HTTP:80地址自动跳转为HTTPS:443地址进行访问。
//
// 本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_INVALIDLBSTATUS = "FailedOperation.InvalidLBStatus"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETER_LBIDNOTFOUND = "InvalidParameter.LBIdNotFound"
// INVALIDPARAMETER_LISTENERIDNOTFOUND = "InvalidParameter.ListenerIdNotFound"
// INVALIDPARAMETER_LOCATIONNOTFOUND = "InvalidParameter.LocationNotFound"
// INVALIDPARAMETER_PORTCHECKFAILED = "InvalidParameter.PortCheckFailed"
// INVALIDPARAMETER_PROTOCOLCHECKFAILED = "InvalidParameter.ProtocolCheckFailed"
// INVALIDPARAMETER_REWRITEALREADYEXIST = "InvalidParameter.RewriteAlreadyExist"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// LIMITEXCEEDED = "LimitExceeded"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) AutoRewrite(request *AutoRewriteRequest) (response *AutoRewriteResponse, err error) {
return c.AutoRewriteWithContext(context.Background(), request)
}
// AutoRewrite
// 用户需要先创建出一个HTTPS:443监听器,并在其下创建转发规则。通过调用本接口,系统会自动创建出一个HTTP:80监听器(如果之前不存在),并在其下创建转发规则,与HTTPS:443监听器下的Domains(在入参中指定)对应。创建成功后可以通过HTTP:80地址自动跳转为HTTPS:443地址进行访问。
//
// 本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_INVALIDLBSTATUS = "FailedOperation.InvalidLBStatus"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETER_LBIDNOTFOUND = "InvalidParameter.LBIdNotFound"
// INVALIDPARAMETER_LISTENERIDNOTFOUND = "InvalidParameter.ListenerIdNotFound"
// INVALIDPARAMETER_LOCATIONNOTFOUND = "InvalidParameter.LocationNotFound"
// INVALIDPARAMETER_PORTCHECKFAILED = "InvalidParameter.PortCheckFailed"
// INVALIDPARAMETER_PROTOCOLCHECKFAILED = "InvalidParameter.ProtocolCheckFailed"
// INVALIDPARAMETER_REWRITEALREADYEXIST = "InvalidParameter.RewriteAlreadyExist"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// LIMITEXCEEDED = "LimitExceeded"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) AutoRewriteWithContext(ctx context.Context, request *AutoRewriteRequest) (response *AutoRewriteResponse, err error) {
if request == nil {
request = NewAutoRewriteRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("AutoRewrite require credential")
}
request.SetContext(ctx)
response = NewAutoRewriteResponse()
err = c.Send(request, response)
return
}
func NewBatchDeregisterTargetsRequest() (request *BatchDeregisterTargetsRequest) {
request = &BatchDeregisterTargetsRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("clb", APIVersion, "BatchDeregisterTargets")
return
}
func NewBatchDeregisterTargetsResponse() (response *BatchDeregisterTargetsResponse) {
response = &BatchDeregisterTargetsResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// BatchDeregisterTargets
// 批量解绑四七层后端服务。批量解绑的资源数量上限为500。只支持VPC网络负载均衡。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETER_LBIDNOTFOUND = "InvalidParameter.LBIdNotFound"
// INVALIDPARAMETER_LISTENERIDNOTFOUND = "InvalidParameter.ListenerIdNotFound"
// INVALIDPARAMETER_LOCATIONNOTFOUND = "InvalidParameter.LocationNotFound"
// INVALIDPARAMETER_PORTCHECKFAILED = "InvalidParameter.PortCheckFailed"
// INVALIDPARAMETER_PROTOCOLCHECKFAILED = "InvalidParameter.ProtocolCheckFailed"
// INVALIDPARAMETER_REGIONNOTFOUND = "InvalidParameter.RegionNotFound"
// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) BatchDeregisterTargets(request *BatchDeregisterTargetsRequest) (response *BatchDeregisterTargetsResponse, err error) {
return c.BatchDeregisterTargetsWithContext(context.Background(), request)
}
// BatchDeregisterTargets
// 批量解绑四七层后端服务。批量解绑的资源数量上限为500。只支持VPC网络负载均衡。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETER_LBIDNOTFOUND = "InvalidParameter.LBIdNotFound"
// INVALIDPARAMETER_LISTENERIDNOTFOUND = "InvalidParameter.ListenerIdNotFound"
// INVALIDPARAMETER_LOCATIONNOTFOUND = "InvalidParameter.LocationNotFound"
// INVALIDPARAMETER_PORTCHECKFAILED = "InvalidParameter.PortCheckFailed"
// INVALIDPARAMETER_PROTOCOLCHECKFAILED = "InvalidParameter.ProtocolCheckFailed"
// INVALIDPARAMETER_REGIONNOTFOUND = "InvalidParameter.RegionNotFound"
// INVALIDPARAMETERVALUE_DUPLICATE = "InvalidParameterValue.Duplicate"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) BatchDeregisterTargetsWithContext(ctx context.Context, request *BatchDeregisterTargetsRequest) (response *BatchDeregisterTargetsResponse, err error) {
if request == nil {
request = NewBatchDeregisterTargetsRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("BatchDeregisterTargets require credential")
}
request.SetContext(ctx)
response = NewBatchDeregisterTargetsResponse()
err = c.Send(request, response)
return
}
func NewBatchModifyTargetTagRequest() (request *BatchModifyTargetTagRequest) {
request = &BatchModifyTargetTagRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("clb", APIVersion, "BatchModifyTargetTag")
return
}
func NewBatchModifyTargetTagResponse() (response *BatchModifyTargetTagResponse) {
response = &BatchModifyTargetTagResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// BatchModifyTargetTag
// BatchModifyTargetTag 接口用于批量修改负载均衡监听器绑定的后端机器的标签。批量修改的资源数量上限为500。本接口为同步接口。<br/>负载均衡的4层和7层监听器支持此接口,传统型负载均衡不支持。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) BatchModifyTargetTag(request *BatchModifyTargetTagRequest) (response *BatchModifyTargetTagResponse, err error) {
return c.BatchModifyTargetTagWithContext(context.Background(), request)
}
// BatchModifyTargetTag
// BatchModifyTargetTag 接口用于批量修改负载均衡监听器绑定的后端机器的标签。批量修改的资源数量上限为500。本接口为同步接口。<br/>负载均衡的4层和7层监听器支持此接口,传统型负载均衡不支持。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) BatchModifyTargetTagWithContext(ctx context.Context, request *BatchModifyTargetTagRequest) (response *BatchModifyTargetTagResponse, err error) {
if request == nil {
request = NewBatchModifyTargetTagRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("BatchModifyTargetTag require credential")
}
request.SetContext(ctx)
response = NewBatchModifyTargetTagResponse()
err = c.Send(request, response)
return
}
func NewBatchModifyTargetWeightRequest() (request *BatchModifyTargetWeightRequest) {
request = &BatchModifyTargetWeightRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("clb", APIVersion, "BatchModifyTargetWeight")
return
}
func NewBatchModifyTargetWeightResponse() (response *BatchModifyTargetWeightResponse) {
response = &BatchModifyTargetWeightResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// BatchModifyTargetWeight
// BatchModifyTargetWeight 接口用于批量修改负载均衡监听器绑定的后端机器的转发权重。批量修改的资源数量上限为500。本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。<br/>负载均衡的4层和7层监听器支持此接口,传统型负载均衡不支持。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) BatchModifyTargetWeight(request *BatchModifyTargetWeightRequest) (response *BatchModifyTargetWeightResponse, err error) {
return c.BatchModifyTargetWeightWithContext(context.Background(), request)
}
// BatchModifyTargetWeight
// BatchModifyTargetWeight 接口用于批量修改负载均衡监听器绑定的后端机器的转发权重。批量修改的资源数量上限为500。本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。<br/>负载均衡的4层和7层监听器支持此接口,传统型负载均衡不支持。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) BatchModifyTargetWeightWithContext(ctx context.Context, request *BatchModifyTargetWeightRequest) (response *BatchModifyTargetWeightResponse, err error) {
if request == nil {
request = NewBatchModifyTargetWeightRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("BatchModifyTargetWeight require credential")
}
request.SetContext(ctx)
response = NewBatchModifyTargetWeightResponse()
err = c.Send(request, response)
return
}
func NewBatchRegisterTargetsRequest() (request *BatchRegisterTargetsRequest) {
request = &BatchRegisterTargetsRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("clb", APIVersion, "BatchRegisterTargets")
return
}
func NewBatchRegisterTargetsResponse() (response *BatchRegisterTargetsResponse) {
response = &BatchRegisterTargetsResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// BatchRegisterTargets
// 批量绑定虚拟主机或弹性网卡,支持跨域绑定,支持四层、七层(TCP、UDP、HTTP、HTTPS)协议绑定。批量绑定的资源数量上限为500。只支持VPC网络负载均衡。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_RESOURCEINOPERATING = "FailedOperation.ResourceInOperating"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETER_LBIDNOTFOUND = "InvalidParameter.LBIdNotFound"
// INVALIDPARAMETER_LISTENERIDNOTFOUND = "InvalidParameter.ListenerIdNotFound"
// INVALIDPARAMETER_LOCATIONNOTFOUND = "InvalidParameter.LocationNotFound"
// INVALIDPARAMETER_PORTCHECKFAILED = "InvalidParameter.PortCheckFailed"
// INVALIDPARAMETER_PROTOCOLCHECKFAILED = "InvalidParameter.ProtocolCheckFailed"
// INVALIDPARAMETER_REGIONNOTFOUND = "InvalidParameter.RegionNotFound"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) BatchRegisterTargets(request *BatchRegisterTargetsRequest) (response *BatchRegisterTargetsResponse, err error) {
return c.BatchRegisterTargetsWithContext(context.Background(), request)
}
// BatchRegisterTargets
// 批量绑定虚拟主机或弹性网卡,支持跨域绑定,支持四层、七层(TCP、UDP、HTTP、HTTPS)协议绑定。批量绑定的资源数量上限为500。只支持VPC网络负载均衡。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_RESOURCEINOPERATING = "FailedOperation.ResourceInOperating"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETER_LBIDNOTFOUND = "InvalidParameter.LBIdNotFound"
// INVALIDPARAMETER_LISTENERIDNOTFOUND = "InvalidParameter.ListenerIdNotFound"
// INVALIDPARAMETER_LOCATIONNOTFOUND = "InvalidParameter.LocationNotFound"
// INVALIDPARAMETER_PORTCHECKFAILED = "InvalidParameter.PortCheckFailed"
// INVALIDPARAMETER_PROTOCOLCHECKFAILED = "InvalidParameter.ProtocolCheckFailed"
// INVALIDPARAMETER_REGIONNOTFOUND = "InvalidParameter.RegionNotFound"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) BatchRegisterTargetsWithContext(ctx context.Context, request *BatchRegisterTargetsRequest) (response *BatchRegisterTargetsResponse, err error) {
if request == nil {
request = NewBatchRegisterTargetsRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("BatchRegisterTargets require credential")
}
request.SetContext(ctx)
response = NewBatchRegisterTargetsResponse()
err = c.Send(request, response)
return
}
func NewCloneLoadBalancerRequest() (request *CloneLoadBalancerRequest) {
request = &CloneLoadBalancerRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("clb", APIVersion, "CloneLoadBalancer")
return
}
func NewCloneLoadBalancerResponse() (response *CloneLoadBalancerResponse) {
response = &CloneLoadBalancerResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CloneLoadBalancer
// 克隆负载均衡实例,根据指定的负载均衡实例,复制出相同规则和绑定关系的负载均衡实例。克隆接口为异步操作,克隆的数据以调用CloneLoadBalancer时为准,如果调用CloneLoadBalancer后克隆CLB发生变化,变化规则不会克隆。
//
//
//
// 注:查询实例创建状态可以根据返回值中的requestId访问[DescribeTaskStatus](https://cloud.tencent.com/document/product/214/30683)接口
//
//
//
// 限制说明
//
// 实例属性维度限制:
//
// - 支持克隆网络计费模式为按量计费与包年包月的实例,包年包月实例克隆后的新实例网络计费模式会转换为按小时带宽计费,其带宽、规格与原实例设置保持一致。
//
// - 不支持克隆未关联实例计费项的 CLB。
//
// - 不支持克隆传统型负载均衡实例和高防 CLB。
//
// - 不支持克隆基础网络类型的实例。
//
// - 不支持克隆 Anycast 类型的实例。
//
// - 不支持克隆 IPv6 NAT64 版本的实例。
//
// - 不支持克隆被封禁或冻结的实例。
//
// - 执行克隆操作前,请确保实例上没有使用已过期证书,否则会导致克隆失败。
//
// 配额维度限制:
//
// - 当实例的监听器个数超过 50 个时,不支持克隆。
//
// - 当共享型实例的公网带宽上限超过 2G 时,不支持克隆。
//
//
//
// 通过接口调用:
//
// BGP带宽包必须传带宽包id
//
// 独占集群克隆必须传对应的参数,否则按共享型创建
//
// 功能内测中,请提交 [内测申请](https://cloud.tencent.com/apply/p/1akuvsmyn0g)。
//
// 可能返回的错误码:
// AUTHFAILURE = "AuthFailure"
// DRYRUNOPERATION = "DryRunOperation"
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_INVALIDLBSTATUS = "FailedOperation.InvalidLBStatus"
// FAILEDOPERATION_RESOURCEINOPERATING = "FailedOperation.ResourceInOperating"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETER_LBIDNOTFOUND = "InvalidParameter.LBIdNotFound"
// INVALIDPARAMETER_LISTENERIDNOTFOUND = "InvalidParameter.ListenerIdNotFound"
// INVALIDPARAMETER_LOCATIONNOTFOUND = "InvalidParameter.LocationNotFound"
// INVALIDPARAMETER_PORTCHECKFAILED = "InvalidParameter.PortCheckFailed"
// INVALIDPARAMETER_PROTOCOLCHECKFAILED = "InvalidParameter.ProtocolCheckFailed"
// INVALIDPARAMETER_REGIONNOTFOUND = "InvalidParameter.RegionNotFound"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// OPERATIONDENIED = "OperationDenied"
// REQUESTLIMITEXCEEDED = "RequestLimitExceeded"
// RESOURCEINUSE = "ResourceInUse"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// RESOURCESSOLDOUT = "ResourcesSoldOut"
func (c *Client) CloneLoadBalancer(request *CloneLoadBalancerRequest) (response *CloneLoadBalancerResponse, err error) {
return c.CloneLoadBalancerWithContext(context.Background(), request)
}
// CloneLoadBalancer
// 克隆负载均衡实例,根据指定的负载均衡实例,复制出相同规则和绑定关系的负载均衡实例。克隆接口为异步操作,克隆的数据以调用CloneLoadBalancer时为准,如果调用CloneLoadBalancer后克隆CLB发生变化,变化规则不会克隆。
//
//
//
// 注:查询实例创建状态可以根据返回值中的requestId访问[DescribeTaskStatus](https://cloud.tencent.com/document/product/214/30683)接口
//
//
//
// 限制说明
//
// 实例属性维度限制:
//
// - 支持克隆网络计费模式为按量计费与包年包月的实例,包年包月实例克隆后的新实例网络计费模式会转换为按小时带宽计费,其带宽、规格与原实例设置保持一致。
//
// - 不支持克隆未关联实例计费项的 CLB。
//
// - 不支持克隆传统型负载均衡实例和高防 CLB。
//
// - 不支持克隆基础网络类型的实例。
//
// - 不支持克隆 Anycast 类型的实例。
//
// - 不支持克隆 IPv6 NAT64 版本的实例。
//
// - 不支持克隆被封禁或冻结的实例。
//
// - 执行克隆操作前,请确保实例上没有使用已过期证书,否则会导致克隆失败。
//
// 配额维度限制:
//
// - 当实例的监听器个数超过 50 个时,不支持克隆。
//
// - 当共享型实例的公网带宽上限超过 2G 时,不支持克隆。
//
//
//
// 通过接口调用:
//
// BGP带宽包必须传带宽包id
//
// 独占集群克隆必须传对应的参数,否则按共享型创建
//
// 功能内测中,请提交 [内测申请](https://cloud.tencent.com/apply/p/1akuvsmyn0g)。
//
// 可能返回的错误码:
// AUTHFAILURE = "AuthFailure"
// DRYRUNOPERATION = "DryRunOperation"
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_INVALIDLBSTATUS = "FailedOperation.InvalidLBStatus"
// FAILEDOPERATION_RESOURCEINOPERATING = "FailedOperation.ResourceInOperating"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETER_LBIDNOTFOUND = "InvalidParameter.LBIdNotFound"
// INVALIDPARAMETER_LISTENERIDNOTFOUND = "InvalidParameter.ListenerIdNotFound"
// INVALIDPARAMETER_LOCATIONNOTFOUND = "InvalidParameter.LocationNotFound"
// INVALIDPARAMETER_PORTCHECKFAILED = "InvalidParameter.PortCheckFailed"
// INVALIDPARAMETER_PROTOCOLCHECKFAILED = "InvalidParameter.ProtocolCheckFailed"
// INVALIDPARAMETER_REGIONNOTFOUND = "InvalidParameter.RegionNotFound"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// OPERATIONDENIED = "OperationDenied"
// REQUESTLIMITEXCEEDED = "RequestLimitExceeded"
// RESOURCEINUSE = "ResourceInUse"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// RESOURCESSOLDOUT = "ResourcesSoldOut"
func (c *Client) CloneLoadBalancerWithContext(ctx context.Context, request *CloneLoadBalancerRequest) (response *CloneLoadBalancerResponse, err error) {
if request == nil {
request = NewCloneLoadBalancerRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CloneLoadBalancer require credential")
}
request.SetContext(ctx)
response = NewCloneLoadBalancerResponse()
err = c.Send(request, response)
return
}
func NewCreateClsLogSetRequest() (request *CreateClsLogSetRequest) {
request = &CreateClsLogSetRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("clb", APIVersion, "CreateClsLogSet")
return
}
func NewCreateClsLogSetResponse() (response *CreateClsLogSetResponse) {
response = &CreateClsLogSetResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CreateClsLogSet
// 创建CLB专有日志集,此日志集用于存储CLB的日志。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) CreateClsLogSet(request *CreateClsLogSetRequest) (response *CreateClsLogSetResponse, err error) {
return c.CreateClsLogSetWithContext(context.Background(), request)
}
// CreateClsLogSet
// 创建CLB专有日志集,此日志集用于存储CLB的日志。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) CreateClsLogSetWithContext(ctx context.Context, request *CreateClsLogSetRequest) (response *CreateClsLogSetResponse, err error) {
if request == nil {
request = NewCreateClsLogSetRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CreateClsLogSet require credential")
}
request.SetContext(ctx)
response = NewCreateClsLogSetResponse()
err = c.Send(request, response)
return
}
func NewCreateListenerRequest() (request *CreateListenerRequest) {
request = &CreateListenerRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("clb", APIVersion, "CreateListener")
return
}
func NewCreateListenerResponse() (response *CreateListenerResponse) {
response = &CreateListenerResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CreateListener
// 在一个负载均衡实例下创建监听器。
//
// 本接口为异步接口,接口返回成功后,需以返回的 RequestId 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_RESOURCEINOPERATING = "FailedOperation.ResourceInOperating"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETER_PORTCHECKFAILED = "InvalidParameter.PortCheckFailed"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) CreateListener(request *CreateListenerRequest) (response *CreateListenerResponse, err error) {
return c.CreateListenerWithContext(context.Background(), request)
}
// CreateListener
// 在一个负载均衡实例下创建监听器。
//
// 本接口为异步接口,接口返回成功后,需以返回的 RequestId 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// FAILEDOPERATION_RESOURCEINOPERATING = "FailedOperation.ResourceInOperating"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETER_PORTCHECKFAILED = "InvalidParameter.PortCheckFailed"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) CreateListenerWithContext(ctx context.Context, request *CreateListenerRequest) (response *CreateListenerResponse, err error) {
if request == nil {
request = NewCreateListenerRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CreateListener require credential")
}
request.SetContext(ctx)
response = NewCreateListenerResponse()
err = c.Send(request, response)
return
}
func NewCreateLoadBalancerRequest() (request *CreateLoadBalancerRequest) {
request = &CreateLoadBalancerRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("clb", APIVersion, "CreateLoadBalancer")
return
}
func NewCreateLoadBalancerResponse() (response *CreateLoadBalancerResponse) {
response = &CreateLoadBalancerResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CreateLoadBalancer
// 本接口(CreateLoadBalancer)用来创建负载均衡实例(本接口只支持购买按量计费的负载均衡,包年包月的负载均衡请通过控制台购买)。为了使用负载均衡服务,您必须购买一个或多个负载均衡实例。成功调用该接口后,会返回负载均衡实例的唯一 ID。负载均衡实例的类型分为:公网、内网。详情可参考产品说明中的产品类型。
//
// 注意:(1)指定可用区申请负载均衡、跨zone容灾(仅香港支持)【如果您需要体验该功能,请通过 [工单申请](https://console.cloud.tencent.com/workorder/category)】;(2)目前只有北京、上海、广州支持IPv6;(3)一个账号在每个地域的默认购买配额为:公网100个,内网100个。
//
// 本接口为异步接口,接口成功返回后,可使用 DescribeLoadBalancers 接口查询负载均衡实例的状态(如创建中、正常),以确定是否创建成功。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_CLIENTTOKENLIMITEXCEEDED = "InvalidParameter.ClientTokenLimitExceeded"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
// UNSUPPORTEDOPERATION = "UnsupportedOperation"
func (c *Client) CreateLoadBalancer(request *CreateLoadBalancerRequest) (response *CreateLoadBalancerResponse, err error) {
return c.CreateLoadBalancerWithContext(context.Background(), request)
}
// CreateLoadBalancer
// 本接口(CreateLoadBalancer)用来创建负载均衡实例(本接口只支持购买按量计费的负载均衡,包年包月的负载均衡请通过控制台购买)。为了使用负载均衡服务,您必须购买一个或多个负载均衡实例。成功调用该接口后,会返回负载均衡实例的唯一 ID。负载均衡实例的类型分为:公网、内网。详情可参考产品说明中的产品类型。
//
// 注意:(1)指定可用区申请负载均衡、跨zone容灾(仅香港支持)【如果您需要体验该功能,请通过 [工单申请](https://console.cloud.tencent.com/workorder/category)】;(2)目前只有北京、上海、广州支持IPv6;(3)一个账号在每个地域的默认购买配额为:公网100个,内网100个。
//
// 本接口为异步接口,接口成功返回后,可使用 DescribeLoadBalancers 接口查询负载均衡实例的状态(如创建中、正常),以确定是否创建成功。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_CLIENTTOKENLIMITEXCEEDED = "InvalidParameter.ClientTokenLimitExceeded"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// INVALIDPARAMETERVALUE_RANGE = "InvalidParameterValue.Range"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
// UNSUPPORTEDOPERATION = "UnsupportedOperation"
func (c *Client) CreateLoadBalancerWithContext(ctx context.Context, request *CreateLoadBalancerRequest) (response *CreateLoadBalancerResponse, err error) {
if request == nil {
request = NewCreateLoadBalancerRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CreateLoadBalancer require credential")
}
request.SetContext(ctx)
response = NewCreateLoadBalancerResponse()
err = c.Send(request, response)
return
}
func NewCreateLoadBalancerSnatIpsRequest() (request *CreateLoadBalancerSnatIpsRequest) {
request = &CreateLoadBalancerSnatIpsRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("clb", APIVersion, "CreateLoadBalancerSnatIps")
return
}
func NewCreateLoadBalancerSnatIpsResponse() (response *CreateLoadBalancerSnatIpsResponse) {
response = &CreateLoadBalancerSnatIpsResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CreateLoadBalancerSnatIps
// 针对SnatPro负载均衡,这个接口用于添加SnatIp,如果负载均衡没有开启SnatPro,添加SnatIp后会自动开启。
//
// 本接口为异步接口,接口返回成功后,需以得到的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETER_LBIDNOTFOUND = "InvalidParameter.LBIdNotFound"
// INVALIDPARAMETER_REGIONNOTFOUND = "InvalidParameter.RegionNotFound"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// LIMITEXCEEDED = "LimitExceeded"
func (c *Client) CreateLoadBalancerSnatIps(request *CreateLoadBalancerSnatIpsRequest) (response *CreateLoadBalancerSnatIpsResponse, err error) {
return c.CreateLoadBalancerSnatIpsWithContext(context.Background(), request)
}
// CreateLoadBalancerSnatIps
// 针对SnatPro负载均衡,这个接口用于添加SnatIp,如果负载均衡没有开启SnatPro,添加SnatIp后会自动开启。
//
// 本接口为异步接口,接口返回成功后,需以得到的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETER_LBIDNOTFOUND = "InvalidParameter.LBIdNotFound"
// INVALIDPARAMETER_REGIONNOTFOUND = "InvalidParameter.RegionNotFound"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// LIMITEXCEEDED = "LimitExceeded"
func (c *Client) CreateLoadBalancerSnatIpsWithContext(ctx context.Context, request *CreateLoadBalancerSnatIpsRequest) (response *CreateLoadBalancerSnatIpsResponse, err error) {
if request == nil {
request = NewCreateLoadBalancerSnatIpsRequest()
}
if c.GetCredential() == nil {
return nil, errors.New("CreateLoadBalancerSnatIps require credential")
}
request.SetContext(ctx)
response = NewCreateLoadBalancerSnatIpsResponse()
err = c.Send(request, response)
return
}
func NewCreateRuleRequest() (request *CreateRuleRequest) {
request = &CreateRuleRequest{
BaseRequest: &tchttp.BaseRequest{},
}
request.Init().WithApiInfo("clb", APIVersion, "CreateRule")
return
}
func NewCreateRuleResponse() (response *CreateRuleResponse) {
response = &CreateRuleResponse{
BaseResponse: &tchttp.BaseResponse{},
}
return
}
// CreateRule
// CreateRule 接口用于在一个已存在的负载均衡七层监听器下创建转发规则,七层监听器中,后端服务必须绑定到规则上而非监听器上。
//
// 本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) CreateRule(request *CreateRuleRequest) (response *CreateRuleResponse, err error) {
return c.CreateRuleWithContext(context.Background(), request)
}
// CreateRule
// CreateRule 接口用于在一个已存在的负载均衡七层监听器下创建转发规则,七层监听器中,后端服务必须绑定到规则上而非监听器上。
//
// 本接口为异步接口,本接口返回成功后需以返回的RequestID为入参,调用DescribeTaskStatus接口查询本次任务是否成功。
//
// 可能返回的错误码:
// FAILEDOPERATION = "FailedOperation"
// INTERNALERROR = "InternalError"
// INVALIDPARAMETER = "InvalidParameter"
// INVALIDPARAMETER_FORMATERROR = "InvalidParameter.FormatError"
// INVALIDPARAMETERVALUE = "InvalidParameterValue"
// INVALIDPARAMETERVALUE_LENGTH = "InvalidParameterValue.Length"
// LIMITEXCEEDED = "LimitExceeded"
// MISSINGPARAMETER = "MissingParameter"
// RESOURCEINSUFFICIENT = "ResourceInsufficient"
// UNAUTHORIZEDOPERATION = "UnauthorizedOperation"
func (c *Client) CreateRuleWithContext(ctx context.Context, request *CreateRuleRequest) (response *CreateRuleResponse, err error) {
if request == nil {
request = NewCreateRuleRequest()
}