@@ -295,14 +295,20 @@ func (me *TencentCloudClient) UseTencentCosClient(bucket string) *cos.Client {
295
295
}
296
296
297
297
// UseMysqlClient returns mysql(cdb) client for service
298
- func (me * TencentCloudClient ) UseMysqlClient () * cdb.Client {
298
+ func (me * TencentCloudClient ) UseMysqlClient (specArgs ... IacExtInfo ) * cdb.Client {
299
299
if me .mysqlConn != nil {
300
300
return me .mysqlConn
301
301
}
302
302
303
303
cpf := me .NewClientProfile (300 )
304
304
me .mysqlConn , _ = cdb .NewClient (me .Credential , me .Region , cpf )
305
- me .mysqlConn .WithHttpTransport (& LogRoundTripper {})
305
+ if len (specArgs ) != 0 {
306
+ me .mysqlConn .WithHttpTransport (& LogRoundTripper {
307
+ InstanceId : specArgs [0 ].InstanceId ,
308
+ })
309
+ } else {
310
+ me .mysqlConn .WithHttpTransport (& LogRoundTripper {})
311
+ }
306
312
307
313
return me .mysqlConn
308
314
}
@@ -495,15 +501,20 @@ func (me *TencentCloudClient) UseTdmqClient(specArgs ...IacExtInfo) *tdmq.Client
495
501
}
496
502
497
503
// UseGaapClient returns gaap client for service
498
- func (me * TencentCloudClient ) UseGaapClient () * gaap.Client {
504
+ func (me * TencentCloudClient ) UseGaapClient (specArgs ... IacExtInfo ) * gaap.Client {
499
505
if me .gaapConn != nil {
500
506
return me .gaapConn
501
507
}
502
508
503
509
cpf := me .NewClientProfile (300 )
504
510
me .gaapConn , _ = gaap .NewClient (me .Credential , me .Region , cpf )
505
- me .gaapConn .WithHttpTransport (& LogRoundTripper {})
506
-
511
+ if len (specArgs ) != 0 {
512
+ me .gaapConn .WithHttpTransport (& LogRoundTripper {
513
+ InstanceId : specArgs [0 ].InstanceId ,
514
+ })
515
+ } else {
516
+ me .gaapConn .WithHttpTransport (& LogRoundTripper {})
517
+ }
507
518
return me .gaapConn
508
519
}
509
520
@@ -608,14 +619,20 @@ func (me *TencentCloudClient) UseDayuClient() *dayu.Client {
608
619
}
609
620
610
621
// UseCdnClient returns cdn client for service
611
- func (me * TencentCloudClient ) UseCdnClient () * cdn.Client {
622
+ func (me * TencentCloudClient ) UseCdnClient (specArgs ... IacExtInfo ) * cdn.Client {
612
623
if me .cdnConn != nil {
613
624
return me .cdnConn
614
625
}
615
626
616
627
cpf := me .NewClientProfile (300 )
617
628
me .cdnConn , _ = cdn .NewClient (me .Credential , me .Region , cpf )
618
- me .cdnConn .WithHttpTransport (& LogRoundTripper {})
629
+ if len (specArgs ) != 0 {
630
+ me .cdnConn .WithHttpTransport (& LogRoundTripper {
631
+ InstanceId : specArgs [0 ].InstanceId ,
632
+ })
633
+ } else {
634
+ me .cdnConn .WithHttpTransport (& LogRoundTripper {})
635
+ }
619
636
620
637
return me .cdnConn
621
638
}
@@ -634,15 +651,21 @@ func (me *TencentCloudClient) UseMonitorClient() *monitor.Client {
634
651
}
635
652
636
653
// UseEsClient returns es client for service
637
- func (me * TencentCloudClient ) UseEsClient () * es.Client {
654
+ func (me * TencentCloudClient ) UseEsClient (specArgs ... IacExtInfo ) * es.Client {
638
655
if me .esConn != nil {
639
656
return me .esConn
640
657
}
641
658
642
659
cpf := me .NewClientProfile (300 )
643
660
cpf .Language = "zh-CN"
644
661
me .esConn , _ = es .NewClient (me .Credential , me .Region , cpf )
645
- me .esConn .WithHttpTransport (& LogRoundTripper {})
662
+ if len (specArgs ) != 0 {
663
+ me .esConn .WithHttpTransport (& LogRoundTripper {
664
+ InstanceId : specArgs [0 ].InstanceId ,
665
+ })
666
+ } else {
667
+ me .esConn .WithHttpTransport (& LogRoundTripper {})
668
+ }
646
669
647
670
return me .esConn
648
671
}
@@ -839,25 +862,37 @@ func (me *TencentCloudClient) UseEmrClient() *emr.Client {
839
862
}
840
863
841
864
// UseClsClient return CLS client for service
842
- func (me * TencentCloudClient ) UseClsClient () * cls.Client {
865
+ func (me * TencentCloudClient ) UseClsClient (specArgs ... IacExtInfo ) * cls.Client {
843
866
if me .clsConn != nil {
844
867
return me .clsConn
845
868
}
846
869
cpf := me .NewClientProfile (300 )
847
870
me .clsConn , _ = cls .NewClient (me .Credential , me .Region , cpf )
848
- me .clsConn .WithHttpTransport (& LogRoundTripper {})
871
+ if len (specArgs ) != 0 {
872
+ me .clsConn .WithHttpTransport (& LogRoundTripper {
873
+ InstanceId : specArgs [0 ].InstanceId ,
874
+ })
875
+ } else {
876
+ me .clsConn .WithHttpTransport (& LogRoundTripper {})
877
+ }
849
878
850
879
return me .clsConn
851
880
}
852
881
853
882
// UseLighthouseClient return Lighthouse client for service
854
- func (me * TencentCloudClient ) UseLighthouseClient () * lighthouse.Client {
883
+ func (me * TencentCloudClient ) UseLighthouseClient (specArgs ... IacExtInfo ) * lighthouse.Client {
855
884
if me .lighthouseConn != nil {
856
885
return me .lighthouseConn
857
886
}
858
887
cpf := me .NewClientProfile (300 )
859
888
me .lighthouseConn , _ = lighthouse .NewClient (me .Credential , me .Region , cpf )
860
- me .lighthouseConn .WithHttpTransport (& LogRoundTripper {})
889
+ if len (specArgs ) != 0 {
890
+ me .lighthouseConn .WithHttpTransport (& LogRoundTripper {
891
+ InstanceId : specArgs [0 ].InstanceId ,
892
+ })
893
+ } else {
894
+ me .lighthouseConn .WithHttpTransport (& LogRoundTripper {})
895
+ }
861
896
862
897
return me .lighthouseConn
863
898
}
@@ -875,13 +910,19 @@ func (me *TencentCloudClient) UseDnsPodClient() *dnspod.Client {
875
910
}
876
911
877
912
// UsePrivateDnsClient return PrivateDns client for service
878
- func (me * TencentCloudClient ) UsePrivateDnsClient () * privatedns.Client {
913
+ func (me * TencentCloudClient ) UsePrivateDnsClient (specArgs ... IacExtInfo ) * privatedns.Client {
879
914
if me .privateDnsConn != nil {
880
915
return me .privateDnsConn
881
916
}
882
917
cpf := me .NewClientProfile (300 )
883
918
me .privateDnsConn , _ = privatedns .NewClient (me .Credential , me .Region , cpf )
884
- me .privateDnsConn .WithHttpTransport (& LogRoundTripper {})
919
+ if len (specArgs ) != 0 {
920
+ me .privateDnsConn .WithHttpTransport (& LogRoundTripper {
921
+ InstanceId : specArgs [0 ].InstanceId ,
922
+ })
923
+ } else {
924
+ me .privateDnsConn .WithHttpTransport (& LogRoundTripper {})
925
+ }
885
926
886
927
return me .privateDnsConn
887
928
}
@@ -925,14 +966,20 @@ func (me *TencentCloudClient) UseTemClient() *tem.Client {
925
966
}
926
967
927
968
// UseTeoClient returns teo client for service
928
- func (me * TencentCloudClient ) UseTeoClient () * teo.Client {
969
+ func (me * TencentCloudClient ) UseTeoClient (specArgs ... IacExtInfo ) * teo.Client {
929
970
if me .teoConn != nil {
930
971
return me .teoConn
931
972
}
932
973
933
974
cpf := me .NewClientProfile (300 )
934
975
me .teoConn , _ = teo .NewClient (me .Credential , me .Region , cpf )
935
- me .teoConn .WithHttpTransport (& LogRoundTripper {})
976
+ if len (specArgs ) != 0 {
977
+ me .teoConn .WithHttpTransport (& LogRoundTripper {
978
+ InstanceId : specArgs [0 ].InstanceId ,
979
+ })
980
+ } else {
981
+ me .teoConn .WithHttpTransport (& LogRoundTripper {})
982
+ }
936
983
937
984
return me .teoConn
938
985
}
@@ -1016,14 +1063,20 @@ func (me *TencentCloudClient) UseCatClient() *cat.Client {
1016
1063
}
1017
1064
1018
1065
// UseMariadbClient returns mariadb client for service
1019
- func (me * TencentCloudClient ) UseMariadbClient () * mariadb.Client {
1066
+ func (me * TencentCloudClient ) UseMariadbClient (specArgs ... IacExtInfo ) * mariadb.Client {
1020
1067
if me .mariadbConn != nil {
1021
1068
return me .mariadbConn
1022
1069
}
1023
1070
1024
1071
cpf := me .NewClientProfile (300 )
1025
1072
me .mariadbConn , _ = mariadb .NewClient (me .Credential , me .Region , cpf )
1026
- me .mariadbConn .WithHttpTransport (& LogRoundTripper {})
1073
+ if len (specArgs ) != 0 {
1074
+ me .mariadbConn .WithHttpTransport (& LogRoundTripper {
1075
+ InstanceId : specArgs [0 ].InstanceId ,
1076
+ })
1077
+ } else {
1078
+ me .mariadbConn .WithHttpTransport (& LogRoundTripper {})
1079
+ }
1027
1080
1028
1081
return me .mariadbConn
1029
1082
}
@@ -1068,15 +1121,20 @@ func (me *TencentCloudClient) UseOrganizationClient() *organization.Client {
1068
1121
}
1069
1122
1070
1123
// UseTdcpgClient returns tdcpg client for service
1071
- func (me * TencentCloudClient ) UseTdcpgClient () * tdcpg.Client {
1124
+ func (me * TencentCloudClient ) UseTdcpgClient (specArgs ... IacExtInfo ) * tdcpg.Client {
1072
1125
if me .tdcpgConn != nil {
1073
1126
return me .tdcpgConn
1074
1127
}
1075
1128
1076
1129
cpf := me .NewClientProfile (300 )
1077
1130
me .tdcpgConn , _ = tdcpg .NewClient (me .Credential , me .Region , cpf )
1078
- me .tdcpgConn .WithHttpTransport (& LogRoundTripper {})
1079
-
1131
+ if len (specArgs ) != 0 {
1132
+ me .tdcpgConn .WithHttpTransport (& LogRoundTripper {
1133
+ InstanceId : specArgs [0 ].InstanceId ,
1134
+ })
1135
+ } else {
1136
+ me .tdcpgConn .WithHttpTransport (& LogRoundTripper {})
1137
+ }
1080
1138
return me .tdcpgConn
1081
1139
}
1082
1140
@@ -1365,28 +1423,40 @@ func (me *TencentCloudClient) UseWedataClient() *wedata.Client {
1365
1423
return me .wedataConn
1366
1424
}
1367
1425
1368
- func (me * TencentCloudClient ) UseWafClient () * waf.Client {
1426
+ func (me * TencentCloudClient ) UseWafClient (specArgs ... IacExtInfo ) * waf.Client {
1369
1427
if me .wafConn != nil {
1370
1428
return me .wafConn
1371
1429
}
1372
1430
1373
1431
cpf := me .NewClientProfile (300 )
1374
1432
cpf .Language = "zh-CN"
1375
1433
me .wafConn , _ = waf .NewClient (me .Credential , me .Region , cpf )
1376
- me .wafConn .WithHttpTransport (& LogRoundTripper {})
1434
+ if len (specArgs ) != 0 {
1435
+ me .wafConn .WithHttpTransport (& LogRoundTripper {
1436
+ InstanceId : specArgs [0 ].InstanceId ,
1437
+ })
1438
+ } else {
1439
+ me .wafConn .WithHttpTransport (& LogRoundTripper {})
1440
+ }
1377
1441
1378
1442
return me .wafConn
1379
1443
}
1380
1444
1381
- func (me * TencentCloudClient ) UseCfwClient () * cfw.Client {
1445
+ func (me * TencentCloudClient ) UseCfwClient (specArgs ... IacExtInfo ) * cfw.Client {
1382
1446
if me .cfwConn != nil {
1383
1447
return me .cfwConn
1384
1448
}
1385
1449
1386
1450
cpf := me .NewClientProfile (300 )
1387
1451
cpf .Language = "zh-CN"
1388
1452
me .cfwConn , _ = cfw .NewClient (me .Credential , me .Region , cpf )
1389
- me .cfwConn .WithHttpTransport (& LogRoundTripper {})
1453
+ if len (specArgs ) != 0 {
1454
+ me .cfwConn .WithHttpTransport (& LogRoundTripper {
1455
+ InstanceId : specArgs [0 ].InstanceId ,
1456
+ })
1457
+ } else {
1458
+ me .cfwConn .WithHttpTransport (& LogRoundTripper {})
1459
+ }
1390
1460
1391
1461
return me .cfwConn
1392
1462
}
0 commit comments