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.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +2 -1
- tccli/services/asr/v20190614/api.json +18 -18
- tccli/services/batch/v20170312/api.json +14 -14
- tccli/services/bh/bh_client.py +623 -93
- tccli/services/bh/v20230418/api.json +1054 -32
- tccli/services/bh/v20230418/examples.json +93 -1
- tccli/services/billing/billing_client.py +4 -57
- tccli/services/billing/v20180709/api.json +3 -305
- tccli/services/billing/v20180709/examples.json +2 -10
- tccli/services/bpaas/v20181217/api.json +56 -56
- tccli/services/cat/cat_client.py +61 -8
- tccli/services/cat/v20180409/api.json +115 -0
- tccli/services/cat/v20180409/examples.json +20 -0
- tccli/services/cbs/v20170312/api.json +9 -7
- tccli/services/cbs/v20170312/examples.json +2 -2
- tccli/services/ccc/ccc_client.py +216 -4
- tccli/services/ccc/v20200210/api.json +364 -6
- tccli/services/ccc/v20200210/examples.json +32 -0
- tccli/services/cdb/v20170320/api.json +23 -14
- tccli/services/cdb/v20170320/examples.json +3 -3
- tccli/services/cdc/cdc_client.py +173 -67
- tccli/services/cdc/v20201214/api.json +96 -0
- tccli/services/cdc/v20201214/examples.json +16 -0
- tccli/services/cdn/v20180606/api.json +365 -279
- tccli/services/cdwch/v20200915/api.json +21 -21
- tccli/services/cdwdoris/v20211228/api.json +21 -1
- tccli/services/cdwdoris/v20211228/examples.json +4 -4
- tccli/services/cdwpg/v20201230/api.json +375 -360
- tccli/services/cdwpg/v20201230/examples.json +1 -1
- tccli/services/cfw/cfw_client.py +53 -0
- tccli/services/cfw/v20190904/api.json +201 -5
- tccli/services/cfw/v20190904/examples.json +8 -0
- tccli/services/chc/chc_client.py +57 -4
- tccli/services/chc/v20230418/api.json +108 -1
- tccli/services/chc/v20230418/examples.json +8 -0
- tccli/services/ckafka/ckafka_client.py +408 -302
- tccli/services/ckafka/v20190819/api.json +197 -2
- tccli/services/ckafka/v20190819/examples.json +16 -0
- tccli/services/clb/v20180317/api.json +439 -379
- tccli/services/clb/v20180317/examples.json +7 -7
- tccli/services/cls/cls_client.py +53 -0
- tccli/services/cls/v20201016/api.json +86 -3
- tccli/services/cls/v20201016/examples.json +11 -3
- tccli/services/cvm/v20170312/api.json +165 -147
- tccli/services/cvm/v20170312/examples.json +6 -6
- tccli/services/cwp/v20180228/api.json +93 -14
- tccli/services/cwp/v20180228/examples.json +7 -7
- tccli/services/cynosdb/cynosdb_client.py +171 -12
- tccli/services/cynosdb/v20190107/api.json +252 -3
- tccli/services/cynosdb/v20190107/examples.json +24 -0
- tccli/services/dbbrain/dbbrain_client.py +57 -4
- tccli/services/dbbrain/v20210527/api.json +62 -0
- tccli/services/dbbrain/v20210527/examples.json +8 -0
- tccli/services/dc/v20180410/api.json +1 -1
- tccli/services/dlc/dlc_client.py +53 -0
- tccli/services/dlc/v20210125/api.json +816 -655
- tccli/services/dlc/v20210125/examples.json +73 -59
- tccli/services/dsgc/v20190723/api.json +18 -0
- tccli/services/dts/v20211206/api.json +4 -4
- tccli/services/dts/v20211206/examples.json +6 -0
- tccli/services/emr/emr_client.py +53 -0
- tccli/services/emr/v20190103/api.json +127 -0
- tccli/services/emr/v20190103/examples.json +8 -0
- tccli/services/es/es_client.py +686 -151
- tccli/services/es/v20180416/api.json +509 -436
- tccli/services/es/v20180416/examples.json +43 -49
- tccli/services/es/v20250101/api.json +1391 -0
- tccli/services/es/v20250101/examples.json +85 -0
- tccli/services/ess/ess_client.py +53 -0
- tccli/services/ess/v20201111/api.json +142 -21
- tccli/services/ess/v20201111/examples.json +14 -0
- tccli/services/essbasic/essbasic_client.py +53 -0
- tccli/services/essbasic/v20210526/api.json +112 -9
- tccli/services/essbasic/v20210526/examples.json +8 -0
- tccli/services/gaap/v20180529/api.json +321 -312
- tccli/services/gaap/v20180529/examples.json +2 -2
- tccli/services/gs/gs_client.py +538 -8
- tccli/services/gs/v20191118/api.json +947 -44
- tccli/services/gs/v20191118/examples.json +87 -1
- tccli/services/gwlb/v20240906/api.json +56 -37
- tccli/services/gwlb/v20240906/examples.json +11 -5
- tccli/services/hunyuan/hunyuan_client.py +175 -69
- tccli/services/hunyuan/v20230901/api.json +191 -1
- tccli/services/hunyuan/v20230901/examples.json +17 -1
- tccli/services/ioa/ioa_client.py +227 -15
- tccli/services/ioa/v20220601/api.json +479 -0
- tccli/services/ioa/v20220601/examples.json +44 -0
- tccli/services/iotexplorer/iotexplorer_client.py +322 -4
- tccli/services/iotexplorer/v20190423/api.json +865 -52
- tccli/services/iotexplorer/v20190423/examples.json +64 -16
- tccli/services/iotvideo/iotvideo_client.py +57 -4
- tccli/services/iotvideo/v20211125/api.json +146 -0
- tccli/services/iotvideo/v20211125/examples.json +8 -0
- tccli/services/iotvideoindustry/v20201201/api.json +1 -1
- tccli/services/kms/v20190118/api.json +38 -2
- tccli/services/lcic/v20220817/api.json +66 -1
- tccli/services/lcic/v20220817/examples.json +1 -1
- tccli/services/lighthouse/lighthouse_client.py +0 -106
- tccli/services/lighthouse/v20200324/api.json +11 -98
- tccli/services/lighthouse/v20200324/examples.json +0 -16
- tccli/services/live/v20180801/api.json +1 -1
- tccli/services/lke/v20231130/api.json +208 -10
- tccli/services/lke/v20231130/examples.json +10 -10
- tccli/services/lkeap/lkeap_client.py +53 -0
- tccli/services/lkeap/v20240522/api.json +48 -4
- tccli/services/lkeap/v20240522/examples.json +8 -0
- tccli/services/mna/mna_client.py +4 -163
- tccli/services/mna/v20210119/api.json +0 -524
- tccli/services/mna/v20210119/examples.json +0 -24
- tccli/services/monitor/monitor_client.py +114 -8
- tccli/services/monitor/v20180724/api.json +129 -18
- tccli/services/monitor/v20180724/examples.json +17 -1
- tccli/services/mps/v20190612/api.json +1223 -1031
- tccli/services/mps/v20190612/examples.json +1 -1
- tccli/services/nlp/v20190408/examples.json +1 -1
- tccli/services/oceanus/v20190422/api.json +12 -12
- tccli/services/oceanus/v20190422/examples.json +15 -3
- tccli/services/ocr/v20181119/api.json +13 -3
- tccli/services/postgres/v20170312/api.json +2 -2
- tccli/services/privatedns/v20201028/api.json +30 -11
- tccli/services/privatedns/v20201028/examples.json +10 -10
- tccli/services/rce/v20201103/api.json +3 -3
- tccli/services/ses/v20201002/api.json +10 -1
- tccli/services/smop/v20201203/api.json +2 -2
- tccli/services/sqlserver/v20180328/api.json +1 -1
- tccli/services/ssm/v20190923/api.json +27 -0
- tccli/services/sts/sts_client.py +53 -0
- tccli/services/sts/v20180813/api.json +101 -1
- tccli/services/sts/v20180813/examples.json +8 -0
- tccli/services/taf/taf_client.py +0 -53
- tccli/services/taf/v20200210/api.json +0 -138
- tccli/services/taf/v20200210/examples.json +0 -8
- tccli/services/tan/v20220420/api.json +2 -2
- tccli/services/tat/v20201028/api.json +2 -2
- tccli/services/tcb/v20180608/api.json +29 -1
- tccli/services/tcbr/v20220217/api.json +32 -0
- tccli/services/tccatalog/v20241024/api.json +1 -1
- tccli/services/tccatalog/v20241024/examples.json +1 -1
- tccli/services/tcr/v20190924/api.json +5 -5
- tccli/services/tcr/v20190924/examples.json +2 -2
- tccli/services/tcss/v20201101/api.json +84 -34
- tccli/services/tcss/v20201101/examples.json +2809 -0
- tccli/services/tdmq/v20200217/api.json +40 -0
- tccli/services/tdmq/v20200217/examples.json +1 -1
- tccli/services/tds/tds_client.py +53 -0
- tccli/services/tds/v20220801/api.json +265 -0
- tccli/services/tds/v20220801/examples.json +8 -0
- tccli/services/tem/v20210701/api.json +664 -575
- tccli/services/tem/v20210701/examples.json +2 -2
- tccli/services/teo/v20220901/api.json +236 -208
- tccli/services/teo/v20220901/examples.json +13 -13
- tccli/services/tione/tione_client.py +53 -0
- tccli/services/tione/v20211111/api.json +256 -0
- tccli/services/tione/v20211111/examples.json +8 -0
- tccli/services/tke/v20180525/api.json +1 -1
- tccli/services/trocket/trocket_client.py +489 -12
- tccli/services/trocket/v20230308/api.json +925 -146
- tccli/services/trocket/v20230308/examples.json +72 -0
- tccli/services/trtc/v20190722/api.json +13 -19
- tccli/services/trtc/v20190722/examples.json +8 -8
- tccli/services/tse/v20201207/api.json +1016 -995
- tccli/services/tse/v20201207/examples.json +2 -2
- tccli/services/tsf/v20180326/api.json +510 -465
- tccli/services/tsf/v20180326/examples.json +4 -4
- tccli/services/tts/v20190823/api.json +10 -10
- tccli/services/vclm/v20240523/api.json +2 -2
- tccli/services/vcube/v20220410/api.json +10 -0
- tccli/services/vdb/v20230616/api.json +10 -0
- tccli/services/vdb/v20230616/examples.json +1 -1
- tccli/services/vpc/v20170312/api.json +824 -254
- tccli/services/vpc/v20170312/examples.json +66 -10
- tccli/services/vpc/vpc_client.py +383 -12
- tccli/services/vrs/v20200824/api.json +9 -0
- tccli/services/waf/v20180125/api.json +8113 -5814
- tccli/services/waf/v20180125/examples.json +90 -0
- tccli/services/waf/waf_client.py +559 -82
- tccli/services/wedata/v20210820/api.json +1379 -24
- tccli/services/wedata/v20210820/examples.json +25 -1
- tccli/services/wedata/wedata_client.py +171 -12
- tccli/services/weilingwith/v20230427/api.json +1 -1
- tccli/services/weilingwith/v20230427/examples.json +3 -3
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/RECORD +187 -184
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1300.3.dist-info → tccli-3.0.1302.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/sts/sts_client.py
CHANGED
@@ -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/
|
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": "",
|
tccli/services/taf/taf_client.py
CHANGED
@@ -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": "
|
8
|
+
"status": "deprecated"
|
9
9
|
}
|
10
10
|
},
|
11
11
|
"metadata": {
|
@@ -862,7 +862,7 @@
|
|
862
862
|
},
|
863
863
|
{
|
864
864
|
"disabled": false,
|
865
|
-
"document": "
|
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"
|
@@ -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\": \"
|
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": "
|
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": "
|
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": "
|
5597
|
-
"example": "
|
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\":
|
507
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
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
|
],
|