11package client
22
33import (
4+ "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/regions"
45 "net/http"
56 "net/url"
67
@@ -10,6 +11,7 @@ import (
1011 kafka "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ckafka/v20190819"
1112 clb "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb/v20180317"
1213 cmq "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cmq/v20190304"
14+ apiCommon "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
1315 "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
1416 cvm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312"
1517 cynosdb "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb/v20190107"
@@ -306,6 +308,17 @@ func NewGAAPClient(cred common.CredentialIface, conf *config.TencentConfig) (*ga
306308 return gaap .NewClient (cred , conf .Credential .Region , cpf )
307309}
308310
311+ func NewGAAPCommonClient (cred common.CredentialIface , conf * config.TencentConfig ) * apiCommon.Client {
312+ cpf := profile .NewClientProfile ()
313+ if conf .Credential .IsInternal == true {
314+ cpf .HttpProfile .Endpoint = "gaap.internal.tencentcloudapi.com"
315+ } else {
316+ cpf .HttpProfile .Endpoint = "gaap.tencentcloudapi.com"
317+ }
318+ cpf .HttpProfile .ReqMethod = "POST"
319+ return apiCommon .NewCommonClient (cred , regions .Guangzhou , cpf )
320+ }
321+
309322func NewWafClient (cred common.CredentialIface , conf * config.TencentConfig ) (* waf.Client , error ) {
310323 cpf := profile .NewClientProfile ()
311324 if conf .Credential .IsInternal == true {
0 commit comments