tccli 3.0.1330.1__py2.py3-none-any.whl → 3.0.1331.1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/ccc/ccc_client.py +53 -0
  3. tccli/services/ccc/v20200210/api.json +71 -2
  4. tccli/services/ccc/v20200210/examples.json +8 -0
  5. tccli/services/cdn/v20180606/api.json +3 -3
  6. tccli/services/cdn/v20180606/examples.json +3 -3
  7. tccli/services/clb/v20180317/api.json +18 -0
  8. tccli/services/dbbrain/v20210527/api.json +1 -0
  9. tccli/services/dnspod/dnspod_client.py +106 -0
  10. tccli/services/dnspod/v20210323/api.json +509 -2
  11. tccli/services/dnspod/v20210323/examples.json +17 -1
  12. tccli/services/ess/v20201111/api.json +2 -2
  13. tccli/services/essbasic/v20210526/api.json +3 -3
  14. tccli/services/faceid/v20180301/api.json +4 -4
  15. tccli/services/ioa/ioa_client.py +53 -0
  16. tccli/services/ioa/v20220601/api.json +166 -1
  17. tccli/services/ioa/v20220601/examples.json +14 -0
  18. tccli/services/iotexplorer/v20190423/api.json +7 -7
  19. tccli/services/iotexplorer/v20190423/examples.json +1 -1
  20. tccli/services/lke/lke_client.py +383 -12
  21. tccli/services/lke/v20231130/api.json +615 -0
  22. tccli/services/lke/v20231130/examples.json +56 -0
  23. tccli/services/lowcode/v20210108/api.json +41 -1
  24. tccli/services/lowcode/v20210108/examples.json +2 -2
  25. tccli/services/ocr/ocr_client.py +532 -320
  26. tccli/services/ocr/v20181119/api.json +541 -4
  27. tccli/services/ocr/v20181119/examples.json +32 -0
  28. tccli/services/sms/v20190711/api.json +4 -4
  29. tccli/services/sms/v20210111/api.json +4 -4
  30. tccli/services/teo/v20220901/api.json +1 -1
  31. tccli/services/trtc/v20190722/api.json +2 -2
  32. {tccli-3.0.1330.1.dist-info → tccli-3.0.1331.1.dist-info}/METADATA +2 -2
  33. {tccli-3.0.1330.1.dist-info → tccli-3.0.1331.1.dist-info}/RECORD +36 -36
  34. {tccli-3.0.1330.1.dist-info → tccli-3.0.1331.1.dist-info}/WHEEL +0 -0
  35. {tccli-3.0.1330.1.dist-info → tccli-3.0.1331.1.dist-info}/entry_points.txt +0 -0
  36. {tccli-3.0.1330.1.dist-info → tccli-3.0.1331.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1330.1'
1
+ __version__ = '3.0.1331.1'
@@ -641,6 +641,58 @@ def doDescribePSTNActiveSessionList(args, parsed_globals):
641
641
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
642
642
 
643
643
 
644
+ def doBindNumberCallInInterface(args, parsed_globals):
645
+ g_param = parse_global_arg(parsed_globals)
646
+
647
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
648
+ cred = credential.CVMRoleCredential()
649
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
650
+ cred = credential.STSAssumeRoleCredential(
651
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
652
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
653
+ )
654
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
655
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
656
+ else:
657
+ cred = credential.Credential(
658
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
659
+ )
660
+ http_profile = HttpProfile(
661
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
662
+ reqMethod="POST",
663
+ endpoint=g_param[OptionsDefine.Endpoint],
664
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
665
+ )
666
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
667
+ if g_param[OptionsDefine.Language]:
668
+ profile.language = g_param[OptionsDefine.Language]
669
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
670
+ client = mod.CccClient(cred, g_param[OptionsDefine.Region], profile)
671
+ client._sdkVersion += ("_CLI_" + __version__)
672
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
673
+ model = models.BindNumberCallInInterfaceRequest()
674
+ model.from_json_string(json.dumps(args))
675
+ start_time = time.time()
676
+ while True:
677
+ rsp = client.BindNumberCallInInterface(model)
678
+ result = rsp.to_json_string()
679
+ try:
680
+ json_obj = json.loads(result)
681
+ except TypeError as e:
682
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
683
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
684
+ break
685
+ cur_time = time.time()
686
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
687
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
688
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
689
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
690
+ else:
691
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
692
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
693
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
694
+
695
+
644
696
  def doDeleteExtension(args, parsed_globals):
645
697
  g_param = parse_global_arg(parsed_globals)
646
698
 
@@ -3784,6 +3836,7 @@ ACTION_MAP = {
3784
3836
  "ModifyOwnNumberApply": doModifyOwnNumberApply,
3785
3837
  "DescribePredictiveDialingCampaign": doDescribePredictiveDialingCampaign,
3786
3838
  "DescribePSTNActiveSessionList": doDescribePSTNActiveSessionList,
3839
+ "BindNumberCallInInterface": doBindNumberCallInInterface,
3787
3840
  "DeleteExtension": doDeleteExtension,
3788
3841
  "BindStaffSkillGroupList": doBindStaffSkillGroupList,
3789
3842
  "DescribeChatMessages": doDescribeChatMessages,
@@ -14,6 +14,13 @@
14
14
  "output": "AbortPredictiveDialingCampaignResponse",
15
15
  "status": "online"
16
16
  },
17
+ "BindNumberCallInInterface": {
18
+ "document": "绑定号码呼入回调接口",
19
+ "input": "BindNumberCallInInterfaceRequest",
20
+ "name": "绑定号码呼入回调接口",
21
+ "output": "BindNumberCallInInterfaceResponse",
22
+ "status": "online"
23
+ },
17
24
  "BindNumberCallOutSkillGroup": {
18
25
  "document": "绑定号码外呼技能组",
19
26
  "input": "BindNumberCallOutSkillGroupRequest",
@@ -1178,6 +1185,51 @@
1178
1185
  ],
1179
1186
  "usage": "out"
1180
1187
  },
1188
+ "BindNumberCallInInterfaceRequest": {
1189
+ "document": "BindNumberCallInInterface请求参数结构体",
1190
+ "members": [
1191
+ {
1192
+ "disabled": false,
1193
+ "document": "应用 ID(必填),可以查看 https://console.cloud.tencent.com/ccc",
1194
+ "example": "1400000000",
1195
+ "member": "uint64",
1196
+ "name": "SdkAppId",
1197
+ "required": true,
1198
+ "type": "int"
1199
+ },
1200
+ {
1201
+ "disabled": false,
1202
+ "document": "待绑定的号码",
1203
+ "example": "\"0086075512345678\"",
1204
+ "member": "string",
1205
+ "name": "Number",
1206
+ "required": true,
1207
+ "type": "string"
1208
+ },
1209
+ {
1210
+ "disabled": false,
1211
+ "document": "待绑定的回调地址",
1212
+ "example": "无",
1213
+ "member": "Interface",
1214
+ "name": "CallInInterface",
1215
+ "required": false,
1216
+ "type": "object"
1217
+ }
1218
+ ],
1219
+ "type": "object"
1220
+ },
1221
+ "BindNumberCallInInterfaceResponse": {
1222
+ "document": "BindNumberCallInInterface返回参数结构体",
1223
+ "members": [
1224
+ {
1225
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
1226
+ "member": "string",
1227
+ "name": "RequestId",
1228
+ "type": "string"
1229
+ }
1230
+ ],
1231
+ "type": "object"
1232
+ },
1181
1233
  "BindNumberCallOutSkillGroupRequest": {
1182
1234
  "document": "BindNumberCallOutSkillGroup请求参数结构体",
1183
1235
  "members": [
@@ -1584,7 +1636,7 @@
1584
1636
  ],
1585
1637
  "usage": "out"
1586
1638
  },
1587
- "Client": {
1639
+ "ClientInfo": {
1588
1640
  "document": "座席登录的终端信息",
1589
1641
  "members": [
1590
1642
  {
@@ -6823,6 +6875,23 @@
6823
6875
  ],
6824
6876
  "usage": "out"
6825
6877
  },
6878
+ "Interface": {
6879
+ "document": "回调接口",
6880
+ "members": [
6881
+ {
6882
+ "disabled": false,
6883
+ "document": "接口地址",
6884
+ "example": "https://cloud.tencent.com/",
6885
+ "member": "string",
6886
+ "name": "URL",
6887
+ "output_required": false,
6888
+ "required": true,
6889
+ "type": "string",
6890
+ "value_allowed_null": false
6891
+ }
6892
+ ],
6893
+ "usage": "both"
6894
+ },
6826
6895
  "Message": {
6827
6896
  "document": "单条消息",
6828
6897
  "members": [
@@ -8734,7 +8803,7 @@
8734
8803
  "disabled": false,
8735
8804
  "document": "客服登录的端信息",
8736
8805
  "example": "[{\"ClientType\": \"Web\", \"IsConnected\": true}]",
8737
- "member": "Client",
8806
+ "member": "ClientInfo",
8738
8807
  "name": "ClientInfo",
8739
8808
  "output_required": false,
8740
8809
  "type": "list",
@@ -16,6 +16,14 @@
16
16
  "title": "停止预测式外呼任务示例"
17
17
  }
18
18
  ],
19
+ "BindNumberCallInInterface": [
20
+ {
21
+ "document": "",
22
+ "input": "POST / HTTP/1.1\nHost: ccc.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: BindNumberCallInInterface\n<公共请求参数>\n\n{\n \"SdkAppId\": 1400000000,\n \"Number\": \"0086075586013388\",\n \"CallInInterface\": {\n \"URL\": \"https://cloud.tencent.com/\"\n }\n}",
23
+ "output": "{\n \"Response\": {\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
24
+ "title": "绑定号码呼入回调接口"
25
+ }
26
+ ],
19
27
  "BindNumberCallOutSkillGroup": [
20
28
  {
21
29
  "document": "绑定号码和技能组",
@@ -5818,7 +5818,7 @@
5818
5818
  {
5819
5819
  "disabled": false,
5820
5820
  "document": "指定省份查询,不填充表示查询所有省份\n省份、国家/地区编码可以查看 [省份编码映射](https://cloud.tencent.com/document/product/228/6316#.E5.8C.BA.E5.9F.9F-.2F-.E8.BF.90.E8.90.A5.E5.95.86.E6.98.A0.E5.B0.84.E8.A1.A8)",
5821
- "example": "[\"122\\n\"]",
5821
+ "example": "122",
5822
5822
  "member": "int64",
5823
5823
  "name": "Districts",
5824
5824
  "required": false,
@@ -5827,7 +5827,7 @@
5827
5827
  {
5828
5828
  "disabled": false,
5829
5829
  "document": "指定运营商查询,不填充表示查询所有运营商\n运营商编码可以查看 [运营商编码映射](https://cloud.tencent.com/document/product/228/6316#.E5.8C.BA.E5.9F.9F-.2F-.E8.BF.90.E8.90.A5.E5.95.86.E6.98.A0.E5.B0.84.E8.A1.A8)",
5830
- "example": "[\"3947\\n\"]",
5830
+ "example": "3947",
5831
5831
  "member": "int64",
5832
5832
  "name": "Isps",
5833
5833
  "required": false,
@@ -6930,7 +6930,7 @@
6930
6930
  "members": [
6931
6931
  {
6932
6932
  "disabled": false,
6933
- "document": "详细刷新记录",
6933
+ "document": "详细刷新纪录",
6934
6934
  "example": "无",
6935
6935
  "member": "PurgeTask",
6936
6936
  "name": "PurgeLogs",
@@ -124,7 +124,7 @@
124
124
  {
125
125
  "document": "查询域名指定时间段的日志列表",
126
126
  "input": "POST / HTTP/1.1\nHost: cdn.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeCdnDomainLogs\n<公共请求参数>\n\n{\n \"Domain\": \"www.test.com\",\n \"EndTime\": \"2019-09-04 12:00:00\",\n \"StartTime\": \"2019-09-04 00:00:00\"\n}",
127
- "output": "{\n \"Response\": {\n \"RequestId\": \"123\",\n \"DomainLogs\": [\n {\n \"Area\": \"mainland\",\n \"StartTime\": \"2019-09-04 23:00:00\",\n \"EndTime\": \"2019-09-04 23:59:59\",\n \"LogPath\": \"http://www.test.qcloud.com/20190904/23/201909042300-www.test.com.gz?st=hGzJr0QFpo3jYM2uj7kkjA&e=3135214538\",\n \"LogName\": \"2019090423\",\n \"FileSize\": 9999\n }\n ],\n \"TotalCount\": 300\n }\n}",
127
+ "output": "{\n \"Response\": {\n \"RequestId\": \"26cbf416-0155-411f-93df-7256930245a4\",\n \"DomainLogs\": [\n {\n \"Area\": \"mainland\",\n \"StartTime\": \"2019-09-04 23:00:00\",\n \"EndTime\": \"2019-09-04 23:59:59\",\n \"LogPath\": \"http://www.test.qcloud.com/20190904/23/201909042300-www.test.com.gz?st=hGzJr0QFpo3jYM2uj7kkjA&e=3135214538\",\n \"LogName\": \"2019090423\",\n \"FileSize\": 9999\n }\n ],\n \"TotalCount\": 300\n }\n}",
128
128
  "title": "日志下载链接查询"
129
129
  }
130
130
  ],
@@ -276,7 +276,7 @@
276
276
  {
277
277
  "document": "",
278
278
  "input": "https://cdn.tencentcloudapi.com/?Action=DescribePurgeTasks\n&TaskId=1234567\n&Area=mainland\n&<公共请求参数>",
279
- "output": "{\n \"Response\": {\n \"RequestId\": \"4d5a83f8-a61f-445b-8036-5636be640bef\",\n \"PurgeLogs\": [\n {\n \"TaskId\": \"153303185323131331\",\n \"Url\": \"http://www.test.com/\",\n \"Status\": \"Done\",\n \"PurgeType\": \"url\",\n \"FlushType\": \"flush\",\n \"CreateTime\": \"2018-07-30 18:10:53\"\n }\n ],\n \"TotalCount\": 1\n }\n}",
279
+ "output": "{\n \"Response\": {\n \"RequestId\": \"4d5a83f8-a61f-445b-8036-5636be640bef\",\n \"PurgeLogs\": [\n {\n \"TaskId\": \"153303185323131331\",\n \"Url\": \"http://www.test.com/\",\n \"Status\": \"done\",\n \"PurgeType\": \"url\",\n \"FlushType\": \"flush\",\n \"CreateTime\": \"2018-07-30 18:10:53\"\n }\n ],\n \"TotalCount\": 1\n }\n}",
280
280
  "title": "刷新历史查询"
281
281
  }
282
282
  ],
@@ -629,7 +629,7 @@
629
629
  "UpdateDomainConfig": [
630
630
  {
631
631
  "document": "更新域名配置",
632
- "input": "POST / HTTP/1.1\nHost: cdn.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateDomainConfig\n<公共请求参数>\n\n{\n \"ProjectId\": \"0\",\n \"Domain\": \"www.test.com\"\n}",
632
+ "input": "POST / HTTP/1.1\nHost: cdn.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateDomainConfig\n<公共请求参数>\n\n{\n \"ProjectId\": 0,\n \"Domain\": \"www.test.com\"\n}",
633
633
  "output": "{\n \"Response\": {\n \"RequestId\": \"23cd4005-496f-4bc4-87d8-ab348d5b0c17\"\n }\n}",
634
634
  "title": "更新域名配置"
635
635
  }
@@ -2999,6 +2999,15 @@
2999
2999
  "required": false,
3000
3000
  "type": "int"
3001
3001
  },
3002
+ {
3003
+ "disabled": false,
3004
+ "document": "TCP_SSL和QUIC是否支持PP",
3005
+ "example": "False",
3006
+ "member": "bool",
3007
+ "name": "ProxyProtocol",
3008
+ "required": false,
3009
+ "type": "bool"
3010
+ },
3002
3011
  {
3003
3012
  "disabled": false,
3004
3013
  "document": "是否开启SNAT,True(开启)、False(关闭)。\n默认为关闭。",
@@ -9487,6 +9496,15 @@
9487
9496
  "required": false,
9488
9497
  "type": "int"
9489
9498
  },
9499
+ {
9500
+ "disabled": false,
9501
+ "document": "TCP_SSL和QUIC是否支持PP",
9502
+ "example": "False",
9503
+ "member": "bool",
9504
+ "name": "ProxyProtocol",
9505
+ "required": false,
9506
+ "type": "bool"
9507
+ },
9490
9508
  {
9491
9509
  "disabled": false,
9492
9510
  "document": "是否开启SNAT, True 表示开启 SNAT,False 表示不开启 SNAT。\n不传则表示不修改。",
@@ -1938,6 +1938,7 @@
1938
1938
  "example": "1000",
1939
1939
  "member": "int64",
1940
1940
  "name": "AsyncRequestId",
1941
+ "output_required": true,
1941
1942
  "type": "int",
1942
1943
  "value_allowed_null": false
1943
1944
  },
@@ -2045,6 +2045,58 @@ def doDeleteDomain(args, parsed_globals):
2045
2045
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2046
2046
 
2047
2047
 
2048
+ def doDescribeDomainVipList(args, parsed_globals):
2049
+ g_param = parse_global_arg(parsed_globals)
2050
+
2051
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2052
+ cred = credential.CVMRoleCredential()
2053
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2054
+ cred = credential.STSAssumeRoleCredential(
2055
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2056
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2057
+ )
2058
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
2059
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2060
+ else:
2061
+ cred = credential.Credential(
2062
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2063
+ )
2064
+ http_profile = HttpProfile(
2065
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2066
+ reqMethod="POST",
2067
+ endpoint=g_param[OptionsDefine.Endpoint],
2068
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2069
+ )
2070
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2071
+ if g_param[OptionsDefine.Language]:
2072
+ profile.language = g_param[OptionsDefine.Language]
2073
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2074
+ client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
2075
+ client._sdkVersion += ("_CLI_" + __version__)
2076
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2077
+ model = models.DescribeDomainVipListRequest()
2078
+ model.from_json_string(json.dumps(args))
2079
+ start_time = time.time()
2080
+ while True:
2081
+ rsp = client.DescribeDomainVipList(model)
2082
+ result = rsp.to_json_string()
2083
+ try:
2084
+ json_obj = json.loads(result)
2085
+ except TypeError as e:
2086
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2087
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2088
+ break
2089
+ cur_time = time.time()
2090
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2091
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2092
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2093
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2094
+ else:
2095
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2096
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2097
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2098
+
2099
+
2048
2100
  def doDescribeDomainShareInfo(args, parsed_globals):
2049
2101
  g_param = parse_global_arg(parsed_globals)
2050
2102
 
@@ -2305,6 +2357,58 @@ def doCreateSubDomainsAnalyticsFile(args, parsed_globals):
2305
2357
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2306
2358
 
2307
2359
 
2360
+ def doDescribeVasList(args, parsed_globals):
2361
+ g_param = parse_global_arg(parsed_globals)
2362
+
2363
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
2364
+ cred = credential.CVMRoleCredential()
2365
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
2366
+ cred = credential.STSAssumeRoleCredential(
2367
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
2368
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
2369
+ )
2370
+ elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_WEB_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
2371
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
2372
+ else:
2373
+ cred = credential.Credential(
2374
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
2375
+ )
2376
+ http_profile = HttpProfile(
2377
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
2378
+ reqMethod="POST",
2379
+ endpoint=g_param[OptionsDefine.Endpoint],
2380
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
2381
+ )
2382
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
2383
+ if g_param[OptionsDefine.Language]:
2384
+ profile.language = g_param[OptionsDefine.Language]
2385
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
2386
+ client = mod.DnspodClient(cred, g_param[OptionsDefine.Region], profile)
2387
+ client._sdkVersion += ("_CLI_" + __version__)
2388
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
2389
+ model = models.DescribeVasListRequest()
2390
+ model.from_json_string(json.dumps(args))
2391
+ start_time = time.time()
2392
+ while True:
2393
+ rsp = client.DescribeVasList(model)
2394
+ result = rsp.to_json_string()
2395
+ try:
2396
+ json_obj = json.loads(result)
2397
+ except TypeError as e:
2398
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
2399
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
2400
+ break
2401
+ cur_time = time.time()
2402
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
2403
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
2404
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
2405
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
2406
+ else:
2407
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
2408
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
2409
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
2410
+
2411
+
2308
2412
  def doDeleteSnapshot(args, parsed_globals):
2309
2413
  g_param = parse_global_arg(parsed_globals)
2310
2414
 
@@ -4643,11 +4747,13 @@ ACTION_MAP = {
4643
4747
  "ModifyRecordToGroup": doModifyRecordToGroup,
4644
4748
  "ModifyTXTRecord": doModifyTXTRecord,
4645
4749
  "DeleteDomain": doDeleteDomain,
4750
+ "DescribeDomainVipList": doDescribeDomainVipList,
4646
4751
  "DescribeDomainShareInfo": doDescribeDomainShareInfo,
4647
4752
  "DeleteDomainCustomLine": doDeleteDomainCustomLine,
4648
4753
  "DescribeDomainAliasList": doDescribeDomainAliasList,
4649
4754
  "DescribeSnapshotList": doDescribeSnapshotList,
4650
4755
  "CreateSubDomainsAnalyticsFile": doCreateSubDomainsAnalyticsFile,
4756
+ "DescribeVasList": doDescribeVasList,
4651
4757
  "DeleteSnapshot": doDeleteSnapshot,
4652
4758
  "CreateDeal": doCreateDeal,
4653
4759
  "ModifyDomainToGroup": doModifyDomainToGroup,