tccli 3.0.1300.3__py2.py3-none-any.whl → 3.0.1302.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 (187) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +2 -1
  3. tccli/services/asr/v20190614/api.json +18 -18
  4. tccli/services/batch/v20170312/api.json +14 -14
  5. tccli/services/bh/bh_client.py +623 -93
  6. tccli/services/bh/v20230418/api.json +1054 -32
  7. tccli/services/bh/v20230418/examples.json +93 -1
  8. tccli/services/billing/billing_client.py +4 -57
  9. tccli/services/billing/v20180709/api.json +3 -305
  10. tccli/services/billing/v20180709/examples.json +2 -10
  11. tccli/services/bpaas/v20181217/api.json +56 -56
  12. tccli/services/cat/cat_client.py +61 -8
  13. tccli/services/cat/v20180409/api.json +115 -0
  14. tccli/services/cat/v20180409/examples.json +20 -0
  15. tccli/services/cbs/v20170312/api.json +9 -7
  16. tccli/services/cbs/v20170312/examples.json +2 -2
  17. tccli/services/ccc/ccc_client.py +216 -4
  18. tccli/services/ccc/v20200210/api.json +364 -6
  19. tccli/services/ccc/v20200210/examples.json +32 -0
  20. tccli/services/cdb/v20170320/api.json +23 -14
  21. tccli/services/cdb/v20170320/examples.json +3 -3
  22. tccli/services/cdc/cdc_client.py +173 -67
  23. tccli/services/cdc/v20201214/api.json +96 -0
  24. tccli/services/cdc/v20201214/examples.json +16 -0
  25. tccli/services/cdn/v20180606/api.json +365 -279
  26. tccli/services/cdwch/v20200915/api.json +21 -21
  27. tccli/services/cdwdoris/v20211228/api.json +21 -1
  28. tccli/services/cdwdoris/v20211228/examples.json +4 -4
  29. tccli/services/cdwpg/v20201230/api.json +375 -360
  30. tccli/services/cdwpg/v20201230/examples.json +1 -1
  31. tccli/services/cfw/cfw_client.py +53 -0
  32. tccli/services/cfw/v20190904/api.json +201 -5
  33. tccli/services/cfw/v20190904/examples.json +8 -0
  34. tccli/services/chc/chc_client.py +57 -4
  35. tccli/services/chc/v20230418/api.json +108 -1
  36. tccli/services/chc/v20230418/examples.json +8 -0
  37. tccli/services/ckafka/ckafka_client.py +408 -302
  38. tccli/services/ckafka/v20190819/api.json +197 -2
  39. tccli/services/ckafka/v20190819/examples.json +16 -0
  40. tccli/services/clb/v20180317/api.json +439 -379
  41. tccli/services/clb/v20180317/examples.json +7 -7
  42. tccli/services/cls/cls_client.py +53 -0
  43. tccli/services/cls/v20201016/api.json +86 -3
  44. tccli/services/cls/v20201016/examples.json +11 -3
  45. tccli/services/cvm/v20170312/api.json +165 -147
  46. tccli/services/cvm/v20170312/examples.json +6 -6
  47. tccli/services/cwp/v20180228/api.json +93 -14
  48. tccli/services/cwp/v20180228/examples.json +7 -7
  49. tccli/services/cynosdb/cynosdb_client.py +171 -12
  50. tccli/services/cynosdb/v20190107/api.json +252 -3
  51. tccli/services/cynosdb/v20190107/examples.json +24 -0
  52. tccli/services/dbbrain/dbbrain_client.py +57 -4
  53. tccli/services/dbbrain/v20210527/api.json +62 -0
  54. tccli/services/dbbrain/v20210527/examples.json +8 -0
  55. tccli/services/dc/v20180410/api.json +1 -1
  56. tccli/services/dlc/dlc_client.py +53 -0
  57. tccli/services/dlc/v20210125/api.json +816 -655
  58. tccli/services/dlc/v20210125/examples.json +73 -59
  59. tccli/services/dsgc/v20190723/api.json +18 -0
  60. tccli/services/dts/v20211206/api.json +4 -4
  61. tccli/services/dts/v20211206/examples.json +6 -0
  62. tccli/services/emr/emr_client.py +53 -0
  63. tccli/services/emr/v20190103/api.json +127 -0
  64. tccli/services/emr/v20190103/examples.json +8 -0
  65. tccli/services/es/es_client.py +686 -151
  66. tccli/services/es/v20180416/api.json +509 -436
  67. tccli/services/es/v20180416/examples.json +43 -49
  68. tccli/services/es/v20250101/api.json +1391 -0
  69. tccli/services/es/v20250101/examples.json +85 -0
  70. tccli/services/ess/ess_client.py +53 -0
  71. tccli/services/ess/v20201111/api.json +142 -21
  72. tccli/services/ess/v20201111/examples.json +14 -0
  73. tccli/services/essbasic/essbasic_client.py +53 -0
  74. tccli/services/essbasic/v20210526/api.json +112 -9
  75. tccli/services/essbasic/v20210526/examples.json +8 -0
  76. tccli/services/gaap/v20180529/api.json +321 -312
  77. tccli/services/gaap/v20180529/examples.json +2 -2
  78. tccli/services/gs/gs_client.py +538 -8
  79. tccli/services/gs/v20191118/api.json +947 -44
  80. tccli/services/gs/v20191118/examples.json +87 -1
  81. tccli/services/gwlb/v20240906/api.json +56 -37
  82. tccli/services/gwlb/v20240906/examples.json +11 -5
  83. tccli/services/hunyuan/hunyuan_client.py +175 -69
  84. tccli/services/hunyuan/v20230901/api.json +191 -1
  85. tccli/services/hunyuan/v20230901/examples.json +17 -1
  86. tccli/services/ioa/ioa_client.py +227 -15
  87. tccli/services/ioa/v20220601/api.json +479 -0
  88. tccli/services/ioa/v20220601/examples.json +44 -0
  89. tccli/services/iotexplorer/iotexplorer_client.py +322 -4
  90. tccli/services/iotexplorer/v20190423/api.json +865 -52
  91. tccli/services/iotexplorer/v20190423/examples.json +64 -16
  92. tccli/services/iotvideo/iotvideo_client.py +57 -4
  93. tccli/services/iotvideo/v20211125/api.json +146 -0
  94. tccli/services/iotvideo/v20211125/examples.json +8 -0
  95. tccli/services/iotvideoindustry/v20201201/api.json +1 -1
  96. tccli/services/kms/v20190118/api.json +38 -2
  97. tccli/services/lcic/v20220817/api.json +66 -1
  98. tccli/services/lcic/v20220817/examples.json +1 -1
  99. tccli/services/lighthouse/lighthouse_client.py +0 -106
  100. tccli/services/lighthouse/v20200324/api.json +11 -98
  101. tccli/services/lighthouse/v20200324/examples.json +0 -16
  102. tccli/services/live/v20180801/api.json +1 -1
  103. tccli/services/lke/v20231130/api.json +208 -10
  104. tccli/services/lke/v20231130/examples.json +10 -10
  105. tccli/services/lkeap/lkeap_client.py +53 -0
  106. tccli/services/lkeap/v20240522/api.json +48 -4
  107. tccli/services/lkeap/v20240522/examples.json +8 -0
  108. tccli/services/mna/mna_client.py +4 -163
  109. tccli/services/mna/v20210119/api.json +0 -524
  110. tccli/services/mna/v20210119/examples.json +0 -24
  111. tccli/services/monitor/monitor_client.py +114 -8
  112. tccli/services/monitor/v20180724/api.json +129 -18
  113. tccli/services/monitor/v20180724/examples.json +17 -1
  114. tccli/services/mps/v20190612/api.json +1223 -1031
  115. tccli/services/mps/v20190612/examples.json +1 -1
  116. tccli/services/nlp/v20190408/examples.json +1 -1
  117. tccli/services/oceanus/v20190422/api.json +12 -12
  118. tccli/services/oceanus/v20190422/examples.json +15 -3
  119. tccli/services/ocr/v20181119/api.json +13 -3
  120. tccli/services/postgres/v20170312/api.json +2 -2
  121. tccli/services/privatedns/v20201028/api.json +30 -11
  122. tccli/services/privatedns/v20201028/examples.json +10 -10
  123. tccli/services/rce/v20201103/api.json +3 -3
  124. tccli/services/ses/v20201002/api.json +10 -1
  125. tccli/services/smop/v20201203/api.json +2 -2
  126. tccli/services/sqlserver/v20180328/api.json +1 -1
  127. tccli/services/ssm/v20190923/api.json +27 -0
  128. tccli/services/sts/sts_client.py +53 -0
  129. tccli/services/sts/v20180813/api.json +101 -1
  130. tccli/services/sts/v20180813/examples.json +8 -0
  131. tccli/services/taf/taf_client.py +0 -53
  132. tccli/services/taf/v20200210/api.json +0 -138
  133. tccli/services/taf/v20200210/examples.json +0 -8
  134. tccli/services/tan/v20220420/api.json +2 -2
  135. tccli/services/tat/v20201028/api.json +2 -2
  136. tccli/services/tcb/v20180608/api.json +29 -1
  137. tccli/services/tcbr/v20220217/api.json +32 -0
  138. tccli/services/tccatalog/v20241024/api.json +1 -1
  139. tccli/services/tccatalog/v20241024/examples.json +1 -1
  140. tccli/services/tcr/v20190924/api.json +5 -5
  141. tccli/services/tcr/v20190924/examples.json +2 -2
  142. tccli/services/tcss/v20201101/api.json +84 -34
  143. tccli/services/tcss/v20201101/examples.json +2809 -0
  144. tccli/services/tdmq/v20200217/api.json +40 -0
  145. tccli/services/tdmq/v20200217/examples.json +1 -1
  146. tccli/services/tds/tds_client.py +53 -0
  147. tccli/services/tds/v20220801/api.json +265 -0
  148. tccli/services/tds/v20220801/examples.json +8 -0
  149. tccli/services/tem/v20210701/api.json +664 -575
  150. tccli/services/tem/v20210701/examples.json +2 -2
  151. tccli/services/teo/v20220901/api.json +236 -208
  152. tccli/services/teo/v20220901/examples.json +13 -13
  153. tccli/services/tione/tione_client.py +53 -0
  154. tccli/services/tione/v20211111/api.json +256 -0
  155. tccli/services/tione/v20211111/examples.json +8 -0
  156. tccli/services/tke/v20180525/api.json +1 -1
  157. tccli/services/trocket/trocket_client.py +489 -12
  158. tccli/services/trocket/v20230308/api.json +925 -146
  159. tccli/services/trocket/v20230308/examples.json +72 -0
  160. tccli/services/trtc/v20190722/api.json +13 -19
  161. tccli/services/trtc/v20190722/examples.json +8 -8
  162. tccli/services/tse/v20201207/api.json +1016 -995
  163. tccli/services/tse/v20201207/examples.json +2 -2
  164. tccli/services/tsf/v20180326/api.json +510 -465
  165. tccli/services/tsf/v20180326/examples.json +4 -4
  166. tccli/services/tts/v20190823/api.json +10 -10
  167. tccli/services/vclm/v20240523/api.json +2 -2
  168. tccli/services/vcube/v20220410/api.json +10 -0
  169. tccli/services/vdb/v20230616/api.json +10 -0
  170. tccli/services/vdb/v20230616/examples.json +1 -1
  171. tccli/services/vpc/v20170312/api.json +824 -254
  172. tccli/services/vpc/v20170312/examples.json +66 -10
  173. tccli/services/vpc/vpc_client.py +383 -12
  174. tccli/services/vrs/v20200824/api.json +9 -0
  175. tccli/services/waf/v20180125/api.json +8113 -5814
  176. tccli/services/waf/v20180125/examples.json +90 -0
  177. tccli/services/waf/waf_client.py +559 -82
  178. tccli/services/wedata/v20210820/api.json +1379 -24
  179. tccli/services/wedata/v20210820/examples.json +25 -1
  180. tccli/services/wedata/wedata_client.py +171 -12
  181. tccli/services/weilingwith/v20230427/api.json +1 -1
  182. tccli/services/weilingwith/v20230427/examples.json +3 -3
  183. {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/METADATA +2 -2
  184. {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/RECORD +187 -184
  185. {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/WHEEL +0 -0
  186. {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/entry_points.txt +0 -0
  187. {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/license_files/LICENSE +0 -0
@@ -225,6 +225,58 @@ def doAssumeRoleWithWebIdentity(args, parsed_globals):
225
225
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
226
226
 
227
227
 
228
+ def doGetSessionToken(args, parsed_globals):
229
+ g_param = parse_global_arg(parsed_globals)
230
+
231
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
232
+ cred = credential.CVMRoleCredential()
233
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
234
+ cred = credential.STSAssumeRoleCredential(
235
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
236
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
237
+ )
238
+ 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):
239
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
240
+ else:
241
+ cred = credential.Credential(
242
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
243
+ )
244
+ http_profile = HttpProfile(
245
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
246
+ reqMethod="POST",
247
+ endpoint=g_param[OptionsDefine.Endpoint],
248
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
249
+ )
250
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
251
+ if g_param[OptionsDefine.Language]:
252
+ profile.language = g_param[OptionsDefine.Language]
253
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
254
+ client = mod.StsClient(cred, g_param[OptionsDefine.Region], profile)
255
+ client._sdkVersion += ("_CLI_" + __version__)
256
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
257
+ model = models.GetSessionTokenRequest()
258
+ model.from_json_string(json.dumps(args))
259
+ start_time = time.time()
260
+ while True:
261
+ rsp = client.GetSessionToken(model)
262
+ result = rsp.to_json_string()
263
+ try:
264
+ json_obj = json.loads(result)
265
+ except TypeError as e:
266
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
267
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
268
+ break
269
+ cur_time = time.time()
270
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
271
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
272
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
273
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
274
+ else:
275
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
276
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
277
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
278
+
279
+
228
280
  def doGetCallerIdentity(args, parsed_globals):
229
281
  g_param = parse_global_arg(parsed_globals)
230
282
 
@@ -344,6 +396,7 @@ ACTION_MAP = {
344
396
  "QueryApiKey": doQueryApiKey,
345
397
  "AssumeRole": doAssumeRole,
346
398
  "AssumeRoleWithWebIdentity": doAssumeRoleWithWebIdentity,
399
+ "GetSessionToken": doGetSessionToken,
347
400
  "GetCallerIdentity": doGetCallerIdentity,
348
401
  "AssumeRoleWithSAML": doAssumeRoleWithSAML,
349
402
 
@@ -35,6 +35,13 @@
35
35
  "output": "GetFederationTokenResponse",
36
36
  "status": "online"
37
37
  },
38
+ "GetSessionToken": {
39
+ "document": "获取MFA临时证书",
40
+ "input": "GetSessionTokenRequest",
41
+ "name": "获取MFA临时证书",
42
+ "output": "GetSessionTokenResponse",
43
+ "status": "online"
44
+ },
38
45
  "QueryApiKey": {
39
46
  "document": "拉取API密钥列表",
40
47
  "input": "QueryApiKeyRequest",
@@ -92,7 +99,7 @@
92
99
  {
93
100
  "disabled": false,
94
101
  "document": "角色的资源描述,可在[访问管理](https://console.cloud.tencent.com/cam/role),点击角色名获取。\n普通角色:\nqcs::cam::uin/12345678:role/4611686018427397919、qcs::cam::uin/12345678:roleName/testRoleName\n服务角色:\nqcs::cam::uin/12345678:role/tencentcloudServiceRole/4611686018427397920、qcs::cam::uin/12345678:role/tencentcloudServiceRoleName/testServiceRoleName",
95
- "example": "qcs::cam::uin/100015158414:roleName/readOnlyRole",
102
+ "example": "qcs::cam::uin/10001:roleName/readOnlyRole",
96
103
  "member": "string",
97
104
  "name": "RoleArn",
98
105
  "required": true,
@@ -151,6 +158,24 @@
151
158
  "name": "SourceIdentity",
152
159
  "required": false,
153
160
  "type": "string"
161
+ },
162
+ {
163
+ "disabled": false,
164
+ "document": "MFA序列号,与进行调用的CAM用户关联的MFA设备的标识号。格式qcs::cam:uin/${ownerUin}::mfa/${mfaType}。mfaType支持softToken(软token)",
165
+ "example": "qcs::cam:uin/10001::mfa/softToken",
166
+ "member": "string",
167
+ "name": "SerialNumber",
168
+ "required": false,
169
+ "type": "string"
170
+ },
171
+ {
172
+ "disabled": false,
173
+ "document": "mfa身份验证码。",
174
+ "example": "482724",
175
+ "member": "string",
176
+ "name": "TokenCode",
177
+ "required": false,
178
+ "type": "string"
154
179
  }
155
180
  ],
156
181
  "type": "object"
@@ -556,6 +581,81 @@
556
581
  ],
557
582
  "type": "object"
558
583
  },
584
+ "GetSessionTokenRequest": {
585
+ "document": "GetSessionToken请求参数结构体",
586
+ "members": [
587
+ {
588
+ "disabled": false,
589
+ "document": "MFA序列号,与进行调用的CAM用户关联的MFA设备的标识号。格式qcs::cam:uin/${ownerUin}::mfa/${mfaType}。mfaType支持softToken(软token)",
590
+ "example": "qcs::cam:uin/10001::mfa/softToken",
591
+ "member": "string",
592
+ "name": "SerialNumber",
593
+ "required": true,
594
+ "type": "string"
595
+ },
596
+ {
597
+ "disabled": false,
598
+ "document": "mfa身份验证码。",
599
+ "example": "482724",
600
+ "member": "string",
601
+ "name": "TokenCode",
602
+ "required": true,
603
+ "type": "string"
604
+ },
605
+ {
606
+ "disabled": false,
607
+ "document": "指定临时证书的有效期,单位:秒,默认1800秒,主账号最长可设定有效期为7200秒,子账号最长可设定有效期为129600秒。",
608
+ "example": "1800",
609
+ "member": "int64",
610
+ "name": "DurationSeconds",
611
+ "required": false,
612
+ "type": "int"
613
+ }
614
+ ],
615
+ "type": "object"
616
+ },
617
+ "GetSessionTokenResponse": {
618
+ "document": "GetSessionToken返回参数结构体",
619
+ "members": [
620
+ {
621
+ "disabled": false,
622
+ "document": "临时访问凭证",
623
+ "example": "{\"Token\":\"da1e***\",\"TmpSecretId\":\"AKID***\",\"TmpSecretKey\":\"q95K***\"}",
624
+ "member": "Credentials",
625
+ "name": "Credentials",
626
+ "output_required": true,
627
+ "type": "object",
628
+ "value_allowed_null": false
629
+ },
630
+ {
631
+ "disabled": false,
632
+ "document": "证书无效的时间,返回 Unix 时间戳,精确到秒",
633
+ "example": "1686664553",
634
+ "member": "uint64",
635
+ "name": "ExpiredTime",
636
+ "output_required": true,
637
+ "type": "int",
638
+ "value_allowed_null": false
639
+ },
640
+ {
641
+ "disabled": false,
642
+ "document": "临时访问凭证的过期时间,以 iso8601 格式的 UTC 时间表示",
643
+ "example": "2018-12-04T09:06:16Z",
644
+ "member": "string",
645
+ "name": "Expiration",
646
+ "output_required": true,
647
+ "type": "string",
648
+ "value_allowed_null": false
649
+ },
650
+ {
651
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
652
+ "member": "string",
653
+ "name": "RequestId",
654
+ "type": "string"
655
+ }
656
+ ],
657
+ "type": "object"
658
+ },
559
659
  "QueryApiKeyRequest": {
560
660
  "document": "QueryApiKey请求参数结构体",
561
661
  "members": [
@@ -52,6 +52,14 @@
52
52
  "title": "获取临时访问凭证"
53
53
  }
54
54
  ],
55
+ "GetSessionToken": [
56
+ {
57
+ "document": "",
58
+ "input": "POST / HTTP/1.1\nHost: sts.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: GetSessionToken\n<公共请求参数>\n\n{\n \"SerialNumber\": \"qcs::cam:uin/10001::mfa/softToken\",\n \"TokenCode\": \"102342\"\n}",
59
+ "output": "{\n \"Response\": {\n \"Credentials\": {\n \"Token\": \"da1e***\",\n \"TmpSecretId\": \"AKID***\",\n \"TmpSecretKey\": \"q95K***\"\n },\n \"ExpiredTime\": 1744271441,\n \"Expiration\": \"2025-04-10T07:50:41Z\",\n \"RequestId\": \"4rkgc443-9cd2-4f09-9e7a-7d4c43b2a74c\"\n }\n}",
60
+ "title": "获取MFA临时证书"
61
+ }
62
+ ],
55
63
  "QueryApiKey": [
56
64
  {
57
65
  "document": "",
@@ -69,58 +69,6 @@ def doManagePortraitRisk(args, parsed_globals):
69
69
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
70
 
71
71
 
72
- def doManageDeviceRisk(args, parsed_globals):
73
- g_param = parse_global_arg(parsed_globals)
74
-
75
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
76
- cred = credential.CVMRoleCredential()
77
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
78
- cred = credential.STSAssumeRoleCredential(
79
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
80
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
81
- )
82
- 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):
83
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
84
- else:
85
- cred = credential.Credential(
86
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
87
- )
88
- http_profile = HttpProfile(
89
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
90
- reqMethod="POST",
91
- endpoint=g_param[OptionsDefine.Endpoint],
92
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
93
- )
94
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
95
- if g_param[OptionsDefine.Language]:
96
- profile.language = g_param[OptionsDefine.Language]
97
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
98
- client = mod.TafClient(cred, g_param[OptionsDefine.Region], profile)
99
- client._sdkVersion += ("_CLI_" + __version__)
100
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
- model = models.ManageDeviceRiskRequest()
102
- model.from_json_string(json.dumps(args))
103
- start_time = time.time()
104
- while True:
105
- rsp = client.ManageDeviceRisk(model)
106
- result = rsp.to_json_string()
107
- try:
108
- json_obj = json.loads(result)
109
- except TypeError as e:
110
- json_obj = json.loads(result.decode('utf-8')) # python3.3
111
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
112
- break
113
- cur_time = time.time()
114
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
115
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
116
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
117
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
118
- else:
119
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
120
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
121
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
122
-
123
-
124
72
  CLIENT_MAP = {
125
73
  "v20200210": taf_client_v20200210,
126
74
 
@@ -133,7 +81,6 @@ MODELS_MAP = {
133
81
 
134
82
  ACTION_MAP = {
135
83
  "ManagePortraitRisk": doManagePortraitRisk,
136
- "ManageDeviceRisk": doManageDeviceRisk,
137
84
 
138
85
  }
139
86
 
@@ -1,12 +1,5 @@
1
1
  {
2
2
  "actions": {
3
- "ManageDeviceRisk": {
4
- "document": "oaid 设备风险接口",
5
- "input": "ManageDeviceRiskRequest",
6
- "name": "设备风险评分接口",
7
- "output": "ManageDeviceRiskResponse",
8
- "status": "online"
9
- },
10
3
  "ManagePortraitRisk": {
11
4
  "document": "虚假流量识别",
12
5
  "input": "ManagePortraitRiskRequest",
@@ -22,137 +15,6 @@
22
15
  "serviceShortName": "taf"
23
16
  },
24
17
  "objects": {
25
- "ManageDeviceRiskInput": {
26
- "document": "业务入参",
27
- "members": [
28
- {
29
- "disabled": false,
30
- "document": "设备操作平台 1:android",
31
- "example": "1",
32
- "member": "int64",
33
- "name": "OsType",
34
- "required": true,
35
- "type": "int"
36
- },
37
- {
38
- "disabled": false,
39
- "document": "设备类型 6: oaid_md5(32位小写)",
40
- "example": "6",
41
- "member": "int64",
42
- "name": "DeviceType",
43
- "required": true,
44
- "type": "int"
45
- },
46
- {
47
- "disabled": false,
48
- "document": "根据 DeviceType 填写设备标识",
49
- "example": "6c31deb89af12f3bc1aa1e694f919820",
50
- "member": "string",
51
- "name": "DeviceId",
52
- "required": true,
53
- "type": "string"
54
- },
55
- {
56
- "disabled": false,
57
- "document": "用户ip,只支持ipv4",
58
- "example": "81.177.207.88",
59
- "member": "string",
60
- "name": "ClientIp",
61
- "required": true,
62
- "type": "string"
63
- }
64
- ],
65
- "usage": "in"
66
- },
67
- "ManageDeviceRiskOutput": {
68
- "document": "业务出参",
69
- "members": [
70
- {
71
- "disabled": false,
72
- "document": "返回码(0:成功,1002: 参数错误 , 4300: 权限错误,其他:失败)",
73
- "example": "0",
74
- "member": "int64",
75
- "name": "Code",
76
- "output_required": true,
77
- "type": "int",
78
- "value_allowed_null": false
79
- },
80
- {
81
- "disabled": false,
82
- "document": "返回码对应的信息",
83
- "example": "OK",
84
- "member": "string",
85
- "name": "Message",
86
- "output_required": false,
87
- "type": "string",
88
- "value_allowed_null": false
89
- },
90
- {
91
- "disabled": false,
92
- "document": "业务结果\n注意:此字段可能返回 null,表示取不到有效值。",
93
- "example": "无",
94
- "member": "ManageDeviceRiskValueOutput",
95
- "name": "Value",
96
- "output_required": false,
97
- "type": "object",
98
- "value_allowed_null": true
99
- }
100
- ],
101
- "usage": "out"
102
- },
103
- "ManageDeviceRiskRequest": {
104
- "document": "ManageDeviceRisk请求参数结构体",
105
- "members": [
106
- {
107
- "disabled": false,
108
- "document": "业务入参",
109
- "example": "无",
110
- "member": "ManageDeviceRiskInput",
111
- "name": "BusinessSecurityData",
112
- "required": true,
113
- "type": "object"
114
- }
115
- ],
116
- "type": "object"
117
- },
118
- "ManageDeviceRiskResponse": {
119
- "document": "ManageDeviceRisk返回参数结构体",
120
- "members": [
121
- {
122
- "disabled": false,
123
- "document": "业务出参",
124
- "example": "无",
125
- "member": "ManageDeviceRiskOutput",
126
- "name": "Data",
127
- "output_required": true,
128
- "type": "object",
129
- "value_allowed_null": false
130
- },
131
- {
132
- "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
133
- "member": "string",
134
- "name": "RequestId",
135
- "type": "string"
136
- }
137
- ],
138
- "type": "object"
139
- },
140
- "ManageDeviceRiskValueOutput": {
141
- "document": "业务出参",
142
- "members": [
143
- {
144
- "disabled": false,
145
- "document": "设备评分",
146
- "example": "100",
147
- "member": "int64",
148
- "name": "Score",
149
- "output_required": true,
150
- "type": "int",
151
- "value_allowed_null": false
152
- }
153
- ],
154
- "usage": "out"
155
- },
156
18
  "ManagePortraitRiskInput": {
157
19
  "document": "业务入参",
158
20
  "members": [
@@ -1,13 +1,5 @@
1
1
  {
2
2
  "actions": {
3
- "ManageDeviceRisk": [
4
- {
5
- "document": "",
6
- "input": "POST / HTTP/1.1\nHost: taf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ManageDeviceRisk\n<公共请求参数>\n\n{\n \"BusinessSecurityData\": {\n \"OsType\": 1,\n \"DeviceType\": 6,\n \"DeviceId\": \"6c31deb89af12f3bc1aa1e694f919820\",\n \"ClientIp\": \"81.177.207.88\"\n }\n}",
7
- "output": "{\n \"Response\": {\n \"Data\": {\n \"Code\": 0,\n \"Message\": \"OK\",\n \"Value\": {\n \"Score\": 100\n }\n },\n \"RequestId\": \"a56981e9-00b2-4bd1-889e-e3733fd4be35\"\n }\n}",
8
- "title": "查询oaid_md5评分"
9
- }
10
- ],
11
3
  "ManagePortraitRisk": [
12
4
  {
13
5
  "document": "",
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "actions": {
3
3
  "CreateBlockNodeRecords": {
4
- "document": "推送节点数据",
4
+ "document": "产品下线\n\n推送节点数据",
5
5
  "input": "CreateBlockNodeRecordsRequest",
6
6
  "name": "推送节点数据",
7
7
  "output": "CreateBlockNodeRecordsResponse",
8
- "status": "online"
8
+ "status": "deprecated"
9
9
  }
10
10
  },
11
11
  "metadata": {
@@ -862,7 +862,7 @@
862
862
  },
863
863
  {
864
864
  "disabled": false,
865
- "document": "该注册码限制tat_agent只能从IpAddressRange所描述公网出口进行注册。默认不做限制。",
865
+ "document": "限制注册码只能从 IpAddressRange 所描述公网出口进行注册。\n\n默认为空,即无任何限制。\n\n取值应为标准 IPv4 或 CIDRv4 格式。例如 192.168.1.1 或 192.168.0.0/16。",
866
866
  "example": "133.12.234.0/24",
867
867
  "member": "string",
868
868
  "name": "IpAddressRange",
@@ -1675,7 +1675,7 @@
1675
1675
  },
1676
1676
  {
1677
1677
  "disabled": false,
1678
- "document": "过滤器列表。参数不支持同时指定 `InstanceIds` 和 `Filters` 。\n\n\n- instance-name\n\n按照【托管实例名称】进行过滤。\n类型:String\n必选:否\n\n- instance-id\n\n按照【托管实例ID】进行过滤。\n类型:String\n必选:否\n\n- register-code-id\n\n按照【托管实例注册码ID】进行过滤。可通过 [DescribeRegisterCodes(查询注册码)](https://cloud.tencent.com/document/api/1340/96925) 接口获取。\n类型:String\n必选:否\n\n- sys-name\n\n按照【操作系统类型】进行过滤,取值:Linux | Windows。\n类型:String\n必选:否\n\n",
1678
+ "document": "过滤器列表。参数不支持同时指定 `InstanceIds` 和 `Filters` 。\n\n\n- instance-name\n\n按照【托管实例名称】进行过滤。\n类型:String\n必选:否\n\n- instance-id\n\n按照【托管实例ID】进行过滤。\n类型:String\n必选:否\n\n- register-code-id\n\n按照【托管实例注册码ID】进行过滤。可通过 [DescribeRegisterCodes(查询注册码)](https://cloud.tencent.com/document/api/1340/96925) 接口获取。\n类型:String\n必选:否\n\n- sys-name\n\n按照【操作系统类型】进行过滤,取值:Linux | Windows。\n类型:String\n必选:否\n\n- tag-key\n\n按照【标签键】进行过滤。\n类型:String\n必选:否\n\n- tag-value\n\n按照【标签值】进行过滤。\n类型:String\n必选:否\n\n- tag:tag-key\n\n按照【标签键值对】进行过滤。 tag-key使用具体的标签键进行替换。\n类型:String\n必选:否\n\n例如 Filter 为 {\"Name\": \"tag:key1\", \"Values\": [\"v1\", \"v2\"] } ,即查询所有标签为 key1:v1 或 key1:v2 的资源。\n\n",
1679
1679
  "example": "[{\"name\":\"register-code-id\",\"value\":\"67c6df82-fa3e-48fb-9c17-07e3e1e9c2c3\"}]",
1680
1680
  "member": "Filter",
1681
1681
  "name": "Filters",
@@ -7373,7 +7373,35 @@
7373
7373
  },
7374
7374
  "DescribeCloudBaseRunVersionRsByConditionRequest": {
7375
7375
  "document": "DescribeCloudBaseRunVersionRsByCondition请求参数结构体",
7376
- "members": [],
7376
+ "members": [
7377
+ {
7378
+ "disabled": false,
7379
+ "document": "环境ID;EnvId和ClusterId不能同时为空",
7380
+ "example": "tcb_jsxjtcx",
7381
+ "member": "string",
7382
+ "name": "EnvId",
7383
+ "required": false,
7384
+ "type": "string"
7385
+ },
7386
+ {
7387
+ "disabled": false,
7388
+ "document": "集群ID;EnvId和ClusterId不能同时为空",
7389
+ "example": "cls-sfdxerf",
7390
+ "member": "string",
7391
+ "name": "ClusterId",
7392
+ "required": false,
7393
+ "type": "string"
7394
+ },
7395
+ {
7396
+ "disabled": false,
7397
+ "document": "过滤网关服务开关",
7398
+ "example": "true",
7399
+ "member": "bool",
7400
+ "name": "FilterGwSwitch",
7401
+ "required": false,
7402
+ "type": "bool"
7403
+ }
7404
+ ],
7377
7405
  "type": "object"
7378
7406
  },
7379
7407
  "DescribeCloudBaseRunVersionRsByConditionResponse": {
@@ -1713,6 +1713,28 @@
1713
1713
  "required": false,
1714
1714
  "type": "string",
1715
1715
  "value_allowed_null": false
1716
+ },
1717
+ {
1718
+ "disabled": false,
1719
+ "document": "内网访问开关 close | open",
1720
+ "example": "close",
1721
+ "member": "string",
1722
+ "name": "InternalAccess",
1723
+ "output_required": false,
1724
+ "required": false,
1725
+ "type": "string",
1726
+ "value_allowed_null": false
1727
+ },
1728
+ {
1729
+ "disabled": false,
1730
+ "document": "内网域名",
1731
+ "example": "https://sdfsdf",
1732
+ "member": "string",
1733
+ "name": "InternalDomain",
1734
+ "output_required": false,
1735
+ "required": false,
1736
+ "type": "string",
1737
+ "value_allowed_null": false
1716
1738
  }
1717
1739
  ],
1718
1740
  "usage": "both"
@@ -1799,6 +1821,16 @@
1799
1821
  "output_required": false,
1800
1822
  "type": "string",
1801
1823
  "value_allowed_null": false
1824
+ },
1825
+ {
1826
+ "disabled": false,
1827
+ "document": "流量类型,目前只有 FLOW",
1828
+ "example": "FLOW",
1829
+ "member": "string",
1830
+ "name": "TrafficType",
1831
+ "output_required": false,
1832
+ "type": "string",
1833
+ "value_allowed_null": false
1802
1834
  }
1803
1835
  ],
1804
1836
  "usage": "out"
@@ -96,7 +96,7 @@
96
96
  {
97
97
  "disabled": false,
98
98
  "document": "需要开白的用户Uin",
99
- "example": "123456789",
99
+ "example": "1256890122",
100
100
  "member": "string",
101
101
  "name": "UserUin",
102
102
  "required": false,
@@ -11,7 +11,7 @@
11
11
  "BindTccVpcEndPointServiceWhiteList": [
12
12
  {
13
13
  "document": "绑定终端节点服务白名单用户",
14
- "input": "POST / HTTP/1.1\nHost: tccatalog.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: BindVpcEndPointServiceWhiteList\n<公共请求参数>\n\n{\n \"EndPointServiceId\": \"vpcsvc-6jsieksl3\",\n \"UserUin\": \"123456789\",\n \"Description\": \"测试用户\"\n}",
14
+ "input": "POST / HTTP/1.1\nHost: tccatalog.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: BindVpcEndPointServiceWhiteList\n<公共请求参数>\n\n{\n \"EndPointServiceId\": \"vpcsvc-6jsieksl3\",\n \"UserUin\": \"1256890122\",\n \"Description\": \"测试用户\"\n}",
15
15
  "output": "{\n \"Response\": {\n \"RequestId\": \"b8sd7dd7-ekd4-4e5e-993e-e5db64fa21c1\"\n }\n}",
16
16
  "title": "绑定终端节点服务白名单用户"
17
17
  }
@@ -1930,7 +1930,7 @@
1930
1930
  },
1931
1931
  {
1932
1932
  "disabled": false,
1933
- "document": "仓库名称",
1933
+ "document": "仓库名称,需满足以下规则:\n1. 长度需 ​大于2且小于245个字符 \n2. 仅允许小写字母、数字及符号 . _ -",
1934
1934
  "example": "nginx",
1935
1935
  "member": "string",
1936
1936
  "name": "RepositoryName",
@@ -4315,7 +4315,7 @@
4315
4315
  {
4316
4316
  "disabled": false,
4317
4317
  "document": "每页个数",
4318
- "example": "20",
4318
+ "example": "5",
4319
4319
  "member": "int64",
4320
4320
  "name": "Limit",
4321
4321
  "required": false,
@@ -5584,7 +5584,7 @@
5584
5584
  },
5585
5585
  {
5586
5586
  "disabled": false,
5587
- "document": "分页Page",
5587
+ "document": "页数,第几页,用于分页",
5588
5588
  "example": "1",
5589
5589
  "member": "int64",
5590
5590
  "name": "Offset",
@@ -5593,8 +5593,8 @@
5593
5593
  },
5594
5594
  {
5595
5595
  "disabled": false,
5596
- "document": "分页PageSize",
5597
- "example": "1",
5596
+ "document": "每页个数,用于分页,最大值为100",
5597
+ "example": "10",
5598
5598
  "member": "int64",
5599
5599
  "name": "Limit",
5600
5600
  "required": false,
@@ -503,8 +503,8 @@
503
503
  "DescribeInstanceAllNamespaces": [
504
504
  {
505
505
  "document": "查询实例内所有的命名空间信息",
506
- "input": "POST / HTTP/1.1\nHost: tcr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeInstanceAllNamespaces\n<公共请求参数>\n\n{\n \"Limit\": 20,\n \"Offset\": 0\n}",
507
- "output": "{\n \"Response\": {\n \"RequestId\": \"d92365c7-3484-4d52-8add-93f682e127bd\"\n }\n}",
506
+ "input": "POST / HTTP/1.1\nHost: tcr.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeInstanceAllNamespaces\n<公共请求参数>\n\n{\n \"Limit\": 5,\n \"Offset\": 0\n}",
507
+ "output": "{\n \"Response\": {\n \"RequestId\": \"63e82e94-0af7-4a8b-a0a3-1f6c59046b6e\"\n }\n}",
508
508
  "title": "查询命名空间信息"
509
509
  }
510
510
  ],