Skip to content

Commit 9faf079

Browse files
authored
add mps flow (#1541)
* add mps flow * add changelog
1 parent 88df513 commit 9faf079

File tree

18 files changed

+24808
-4
lines changed

18 files changed

+24808
-4
lines changed

.changelog/1541.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-resource
2+
tencentcloud_mps_workflow
3+
```

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ require (
8181
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199
8282
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.569
8383
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.199
84+
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mps v1.0.584
8485
github.com/tencentyun/cos-go-sdk-v5 v0.7.40
8586
github.com/yangwenmai/ratelimit v0.0.0-20180104140304-44221c2292e1
8687
github.com/zclconf/go-cty v1.4.2 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb v1.0.199 h1:2js
614614
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mongodb v1.0.199/go.mod h1:f5GhbJyuYQBzRaDHGe3I4U9utb0Pmx2NlI+XcqSQRp0=
615615
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor v1.0.518 h1:XClo3Xa5F9pko91olHT85aZXXcRkQiOYBCMqm8+tHG8=
616616
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/monitor v1.0.518/go.mod h1:WDTvvrrc90KE+90iizkoSQRsoSSQ3881eBC6NeypmTI=
617+
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mps v1.0.584 h1:FJxYOAolkBhXjQMWoiTek9Ag0bslcKFHyrM7w2Jsxos=
618+
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mps v1.0.584/go.mod h1:CY/hEcXbaOZBU9Qm/MMIctafi8FFJaMIGTlGUjnymW0=
617619
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.540 h1:gUVuwcjt9baj+/5LFafjdR53/xSdQxfA45Vp6E65rXU=
618620
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/organization v1.0.540/go.mod h1:jHcHwlsdNL9ycLwNtqYZVjLKJILA1xuODMeMDMOxCrA=
619621
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/postgres v1.0.391 h1:1yZh5MrlFqawVGhLdd38hi5HoaKc4LgB+8cEgLT2Qo4=

tencentcloud/connectivity/client.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import (
88
"strconv"
99
"time"
1010

11+
mps "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/mps/v20190612"
12+
1113
ses "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ses/v20201002"
1214

1315
tcm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcm/v20210413"
@@ -154,6 +156,7 @@ type TencentCloudClient struct {
154156
dtsConn *dts.Client
155157
ciConn *cos.Client
156158
tsfConn *tsf.Client
159+
mpsConn *mps.Client
157160
}
158161

159162
// NewClientProfile returns a new ClientProfile
@@ -1040,6 +1043,20 @@ func (me *TencentCloudClient) UseTsfClient() *tsf.Client {
10401043
return me.tsfConn
10411044
}
10421045

1046+
// UseMpsClient returns mps client for service
1047+
func (me *TencentCloudClient) UseMpsClient() *mps.Client {
1048+
if me.mpsConn != nil {
1049+
return me.mpsConn
1050+
}
1051+
1052+
cpf := me.NewClientProfile(300)
1053+
cpf.Language = "zh-CN"
1054+
me.mpsConn, _ = mps.NewClient(me.Credential, me.Region, cpf)
1055+
me.mpsConn.WithHttpTransport(&LogRoundTripper{})
1056+
1057+
return me.mpsConn
1058+
}
1059+
10431060
func getEnvDefault(key string, defVal int) int {
10441061
val, ex := os.LookupEnv(key)
10451062
if !ex {

tencentcloud/extension_mps.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package tencentcloud
2+
3+
const (
4+
WORKFLOW_STATUS_ENABLED = "Enabled"
5+
WORKFLOW_STATUS_DISABLED = "Disabled"
6+
)

tencentcloud/provider.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,10 @@ Tencent Service Framework(TSF)
935935
tencentcloud_tsf_api_group
936936
tencentcloud_tsf_namespace
937937
938+
Media Processing Service(MPS)
939+
Resource
940+
tencentcloud_mps_workflow
941+
938942
*/
939943
package tencentcloud
940944

@@ -1669,6 +1673,7 @@ func Provider() terraform.ResourceProvider {
16691673
"tencentcloud_tsf_contain_group": resourceTencentCloudTsfContainGroup(),
16701674
"tencentcloud_tsf_lane": resourceTencentCloudTsfLane(),
16711675
"tencentcloud_tsf_lane_rule": resourceTencentCloudTsfLaneRule(),
1676+
"tencentcloud_mps_workflow": resourceTencentCloudMpsWorkflow(),
16721677
},
16731678

16741679
ConfigureFunc: providerConfigure,

tencentcloud/resource_tc_kubernetes_serverless_node_pool_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func init() {
3131
})
3232
}
3333

34-
func TestAccTencentcloudTKEServerlessNodePoolBasic(t *testing.T) {
34+
func TestAccTencentcloudTKEServerlessNodePoolResource_Basic(t *testing.T) {
3535
t.Parallel()
3636

3737
tkeClusterId := defaultTkeClusterId

0 commit comments

Comments
 (0)