tccli 3.0.1274.1__py2.py3-none-any.whl → 3.0.1276.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 +0 -9
- tccli/services/ams/v20201229/api.json +82 -0
- tccli/services/asr/v20190614/api.json +1 -1
- tccli/services/batch/v20170312/api.json +24 -24
- tccli/services/cdwdoris/v20211228/api.json +19 -0
- tccli/services/cfw/v20190904/api.json +6 -6
- tccli/services/clb/v20180317/api.json +32 -4
- tccli/services/cloudstudio/v20230508/api.json +1 -1
- tccli/services/cvm/v20170312/api.json +48 -37
- tccli/services/cynosdb/v20190107/api.json +14 -4
- tccli/services/dlc/v20210125/api.json +17 -15
- tccli/services/dlc/v20210125/examples.json +4 -4
- tccli/services/dts/v20211206/api.json +1 -1
- tccli/services/emr/v20190103/api.json +24 -24
- tccli/services/es/v20180416/api.json +2 -2
- tccli/services/es/v20180416/examples.json +4 -4
- tccli/services/ess/ess_client.py +53 -0
- tccli/services/ess/v20201111/api.json +403 -322
- tccli/services/ess/v20201111/examples.json +16 -2
- tccli/services/essbasic/essbasic_client.py +53 -0
- tccli/services/essbasic/v20210526/api.json +310 -238
- tccli/services/essbasic/v20210526/examples.json +14 -0
- tccli/services/faceid/v20180301/api.json +3 -3
- tccli/services/lcic/v20220817/api.json +3 -3
- tccli/services/lighthouse/v20200324/api.json +6 -6
- tccli/services/live/v20180801/api.json +371 -380
- tccli/services/lke/lke_client.py +53 -0
- tccli/services/lke/v20231130/api.json +72 -2
- tccli/services/lke/v20231130/examples.json +8 -0
- tccli/services/ocr/v20181119/api.json +17 -7
- tccli/services/ocr/v20181119/examples.json +4 -4
- tccli/services/organization/v20210331/api.json +19 -0
- tccli/services/rce/v20201103/api.json +15 -15
- tccli/services/taf/v20200210/api.json +9 -9
- tccli/services/tcbr/v20220217/api.json +18 -0
- tccli/services/teo/v20220901/api.json +2 -2
- tccli/services/teo/v20220901/examples.json +1 -1
- tccli/services/tke/v20180525/api.json +328 -323
- tccli/services/tke/v20180525/examples.json +2 -2
- tccli/services/tke/v20220501/api.json +8 -8
- tccli/services/tse/v20201207/api.json +84 -4
- tccli/services/vm/v20201229/api.json +428 -78
- tccli/services/vm/v20210922/api.json +482 -82
- tccli/services/vpc/v20170312/api.json +2 -2
- tccli/services/weilingwith/v20230427/api.json +20 -20
- {tccli-3.0.1274.1.dist-info → tccli-3.0.1276.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1274.1.dist-info → tccli-3.0.1276.1.dist-info}/RECORD +51 -63
- tccli/services/lp/__init__.py +0 -4
- tccli/services/lp/lp_client.py +0 -207
- tccli/services/lp/v20200224/api.json +0 -311
- tccli/services/lp/v20200224/examples.json +0 -13
- tccli/services/rkp/__init__.py +0 -4
- tccli/services/rkp/rkp_client.py +0 -313
- tccli/services/rkp/v20191209/api.json +0 -564
- tccli/services/rkp/v20191209/examples.json +0 -29
- tccli/services/rp/__init__.py +0 -4
- tccli/services/rp/rp_client.py +0 -207
- tccli/services/rp/v20200224/api.json +0 -290
- tccli/services/rp/v20200224/examples.json +0 -13
- {tccli-3.0.1274.1.dist-info → tccli-3.0.1276.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1274.1.dist-info → tccli-3.0.1276.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1274.1.dist-info → tccli-3.0.1276.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/lp/lp_client.py
DELETED
@@ -1,207 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
import os
|
3
|
-
import sys
|
4
|
-
import six
|
5
|
-
import json
|
6
|
-
import tccli.options_define as OptionsDefine
|
7
|
-
import tccli.format_output as FormatOutput
|
8
|
-
from tccli import __version__
|
9
|
-
from tccli.utils import Utils
|
10
|
-
from tccli.exceptions import ConfigurationError, ClientError, ParamError
|
11
|
-
from tencentcloud.common import credential
|
12
|
-
from tencentcloud.common.profile.http_profile import HttpProfile
|
13
|
-
from tencentcloud.common.profile.client_profile import ClientProfile
|
14
|
-
from tencentcloud.lp.v20200224 import lp_client as lp_client_v20200224
|
15
|
-
from tencentcloud.lp.v20200224 import models as models_v20200224
|
16
|
-
|
17
|
-
from jmespath import search
|
18
|
-
import time
|
19
|
-
|
20
|
-
def doQueryLoginProtection(args, parsed_globals):
|
21
|
-
g_param = parse_global_arg(parsed_globals)
|
22
|
-
|
23
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
24
|
-
cred = credential.CVMRoleCredential()
|
25
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
26
|
-
cred = credential.STSAssumeRoleCredential(
|
27
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
28
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
29
|
-
)
|
30
|
-
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):
|
31
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
32
|
-
else:
|
33
|
-
cred = credential.Credential(
|
34
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
35
|
-
)
|
36
|
-
http_profile = HttpProfile(
|
37
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
38
|
-
reqMethod="POST",
|
39
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
40
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
41
|
-
)
|
42
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
43
|
-
if g_param[OptionsDefine.Language]:
|
44
|
-
profile.language = g_param[OptionsDefine.Language]
|
45
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
46
|
-
client = mod.LpClient(cred, g_param[OptionsDefine.Region], profile)
|
47
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
48
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
-
model = models.QueryLoginProtectionRequest()
|
50
|
-
model.from_json_string(json.dumps(args))
|
51
|
-
start_time = time.time()
|
52
|
-
while True:
|
53
|
-
rsp = client.QueryLoginProtection(model)
|
54
|
-
result = rsp.to_json_string()
|
55
|
-
try:
|
56
|
-
json_obj = json.loads(result)
|
57
|
-
except TypeError as e:
|
58
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
59
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
60
|
-
break
|
61
|
-
cur_time = time.time()
|
62
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
63
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
64
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
65
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
66
|
-
else:
|
67
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
68
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
69
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
70
|
-
|
71
|
-
|
72
|
-
CLIENT_MAP = {
|
73
|
-
"v20200224": lp_client_v20200224,
|
74
|
-
|
75
|
-
}
|
76
|
-
|
77
|
-
MODELS_MAP = {
|
78
|
-
"v20200224": models_v20200224,
|
79
|
-
|
80
|
-
}
|
81
|
-
|
82
|
-
ACTION_MAP = {
|
83
|
-
"QueryLoginProtection": doQueryLoginProtection,
|
84
|
-
|
85
|
-
}
|
86
|
-
|
87
|
-
AVAILABLE_VERSION_LIST = [
|
88
|
-
"v20200224",
|
89
|
-
|
90
|
-
]
|
91
|
-
|
92
|
-
|
93
|
-
def action_caller():
|
94
|
-
return ACTION_MAP
|
95
|
-
|
96
|
-
|
97
|
-
def parse_global_arg(parsed_globals):
|
98
|
-
g_param = parsed_globals
|
99
|
-
cvm_role_flag = True
|
100
|
-
for param in parsed_globals.keys():
|
101
|
-
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
|
102
|
-
OptionsDefine.RoleSessionName]:
|
103
|
-
if parsed_globals[param] is not None:
|
104
|
-
cvm_role_flag = False
|
105
|
-
break
|
106
|
-
is_exist_profile = True
|
107
|
-
if not parsed_globals["profile"]:
|
108
|
-
is_exist_profile = False
|
109
|
-
g_param["profile"] = os.environ.get("TCCLI_PROFILE", "default")
|
110
|
-
|
111
|
-
configure_path = os.path.join(os.path.expanduser("~"), ".tccli")
|
112
|
-
is_conf_exist, conf_path = Utils.file_existed(configure_path, g_param["profile"] + ".configure")
|
113
|
-
is_cred_exist, cred_path = Utils.file_existed(configure_path, g_param["profile"] + ".credential")
|
114
|
-
|
115
|
-
conf = {}
|
116
|
-
cred = {}
|
117
|
-
|
118
|
-
if is_conf_exist:
|
119
|
-
conf = Utils.load_json_msg(conf_path)
|
120
|
-
if is_cred_exist:
|
121
|
-
cred = Utils.load_json_msg(cred_path)
|
122
|
-
|
123
|
-
if not (isinstance(conf, dict) and isinstance(cred, dict)):
|
124
|
-
raise ConfigurationError(
|
125
|
-
"file: %s or %s is not json format"
|
126
|
-
% (g_param["profile"] + ".configure", g_param["profile"] + ".credential"))
|
127
|
-
|
128
|
-
if OptionsDefine.Token not in cred:
|
129
|
-
cred[OptionsDefine.Token] = None
|
130
|
-
|
131
|
-
if not is_exist_profile:
|
132
|
-
if os.environ.get(OptionsDefine.ENV_SECRET_ID) and os.environ.get(OptionsDefine.ENV_SECRET_KEY):
|
133
|
-
cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
|
134
|
-
cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
|
135
|
-
cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
|
136
|
-
cvm_role_flag = False
|
137
|
-
|
138
|
-
if os.environ.get(OptionsDefine.ENV_REGION):
|
139
|
-
conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
|
140
|
-
|
141
|
-
if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
|
142
|
-
cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
|
143
|
-
cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
|
144
|
-
cvm_role_flag = False
|
145
|
-
|
146
|
-
if cvm_role_flag:
|
147
|
-
if "type" in cred and cred["type"] == "cvm-role":
|
148
|
-
g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
|
149
|
-
|
150
|
-
for param in g_param.keys():
|
151
|
-
if g_param[param] is None:
|
152
|
-
if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.Token]:
|
153
|
-
if param in cred:
|
154
|
-
g_param[param] = cred[param]
|
155
|
-
elif not (g_param[OptionsDefine.UseCVMRole.replace('-', '_')]
|
156
|
-
or os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN)):
|
157
|
-
raise ConfigurationError("%s is invalid" % param)
|
158
|
-
elif param in [OptionsDefine.Region, OptionsDefine.Output, OptionsDefine.Language]:
|
159
|
-
if param in conf[OptionsDefine.SysParam]:
|
160
|
-
g_param[param] = conf[OptionsDefine.SysParam][param]
|
161
|
-
elif param != OptionsDefine.Language:
|
162
|
-
raise ConfigurationError("%s is invalid" % param)
|
163
|
-
elif param.replace('_', '-') in [OptionsDefine.RoleArn, OptionsDefine.RoleSessionName]:
|
164
|
-
if param.replace('_', '-') in cred:
|
165
|
-
g_param[param] = cred[param.replace('_', '-')]
|
166
|
-
|
167
|
-
try:
|
168
|
-
if g_param[OptionsDefine.ServiceVersion]:
|
169
|
-
g_param[OptionsDefine.Version] = "v" + g_param[OptionsDefine.ServiceVersion].replace('-', '')
|
170
|
-
else:
|
171
|
-
version = conf["lp"][OptionsDefine.Version]
|
172
|
-
g_param[OptionsDefine.Version] = "v" + version.replace('-', '')
|
173
|
-
|
174
|
-
if g_param[OptionsDefine.Endpoint] is None:
|
175
|
-
g_param[OptionsDefine.Endpoint] = conf["lp"][OptionsDefine.Endpoint]
|
176
|
-
g_param["sts_cred_endpoint"] = conf.get("sts", {}).get("endpoint")
|
177
|
-
except Exception as err:
|
178
|
-
raise ConfigurationError("config file:%s error, %s" % (conf_path, str(err)))
|
179
|
-
|
180
|
-
if g_param[OptionsDefine.Version] not in AVAILABLE_VERSION_LIST:
|
181
|
-
raise Exception("available versions: %s" % " ".join(AVAILABLE_VERSION_LIST))
|
182
|
-
|
183
|
-
if g_param[OptionsDefine.Waiter]:
|
184
|
-
param = eval(g_param[OptionsDefine.Waiter])
|
185
|
-
if 'expr' not in param:
|
186
|
-
raise Exception('`expr` in `--waiter` must be defined')
|
187
|
-
if 'to' not in param:
|
188
|
-
raise Exception('`to` in `--waiter` must be defined')
|
189
|
-
if 'timeout' not in param:
|
190
|
-
if 'waiter' in conf and 'timeout' in conf['waiter']:
|
191
|
-
param['timeout'] = conf['waiter']['timeout']
|
192
|
-
else:
|
193
|
-
param['timeout'] = 180
|
194
|
-
if 'interval' not in param:
|
195
|
-
if 'waiter' in conf and 'interval' in conf['waiter']:
|
196
|
-
param['interval'] = conf['waiter']['interval']
|
197
|
-
else:
|
198
|
-
param['interval'] = 5
|
199
|
-
param['interval'] = min(param['interval'], param['timeout'])
|
200
|
-
g_param['OptionsDefine.WaiterInfo'] = param
|
201
|
-
|
202
|
-
if six.PY2:
|
203
|
-
for key, value in g_param.items():
|
204
|
-
if isinstance(value, six.text_type):
|
205
|
-
g_param[key] = value.encode('utf-8')
|
206
|
-
return g_param
|
207
|
-
|
@@ -1,311 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"actions": {
|
3
|
-
"QueryLoginProtection": {
|
4
|
-
"document": "登录保护服务(LoginProtection,LP)针对网站和 APP 的用户登录场景,实时检测是否存在盗号、撞库等恶意登录行为,帮助开发者发现异常登录,降低恶意用户登录给业务带来的风险。",
|
5
|
-
"input": "QueryLoginProtectionRequest",
|
6
|
-
"name": "登录保护",
|
7
|
-
"output": "QueryLoginProtectionResponse",
|
8
|
-
"status": "online"
|
9
|
-
}
|
10
|
-
},
|
11
|
-
"metadata": {
|
12
|
-
"apiVersion": "2020-02-24",
|
13
|
-
"api_brief": null,
|
14
|
-
"serviceNameCN": "登录保护",
|
15
|
-
"serviceShortName": "lp"
|
16
|
-
},
|
17
|
-
"objects": {
|
18
|
-
"QueryLoginProtectionRequest": {
|
19
|
-
"document": "QueryLoginProtection请求参数结构体",
|
20
|
-
"members": [
|
21
|
-
{
|
22
|
-
"document": "登录来源的外网 IP。",
|
23
|
-
"member": "string",
|
24
|
-
"name": "LoginIp",
|
25
|
-
"required": true,
|
26
|
-
"type": "string"
|
27
|
-
},
|
28
|
-
{
|
29
|
-
"document": "用户 ID 不同的 accountType 对应不同的用户 ID。如果是 QQ,则填入对应的 openid,微信用户则填入对应的 openid/unionid,手机号则填入对应真实用户手机号(如13123456789)。",
|
30
|
-
"member": "string",
|
31
|
-
"name": "Uid",
|
32
|
-
"required": true,
|
33
|
-
"type": "string"
|
34
|
-
},
|
35
|
-
{
|
36
|
-
"document": "登录时间戳,单位:秒。",
|
37
|
-
"member": "string",
|
38
|
-
"name": "LoginTime",
|
39
|
-
"required": true,
|
40
|
-
"type": "string"
|
41
|
-
},
|
42
|
-
{
|
43
|
-
"document": "用户账号类型(QQ 开放帐号、微信开放账号需要 提交工单 由腾讯云进行资格审核):\n1:QQ 开放帐号。\n2:微信开放账号。\n4:手机号。\n0:其他。\n10004:手机号 MD5。",
|
44
|
-
"member": "string",
|
45
|
-
"name": "AccountType",
|
46
|
-
"required": true,
|
47
|
-
"type": "string"
|
48
|
-
},
|
49
|
-
{
|
50
|
-
"document": "accountType 是 QQ 或微信开放账号时,该参数必填,表示 QQ 或微信分配给网站或应用的 AppID,用来唯一标识网站或应用。",
|
51
|
-
"member": "string",
|
52
|
-
"name": "AppIdU",
|
53
|
-
"required": false,
|
54
|
-
"type": "string"
|
55
|
-
},
|
56
|
-
{
|
57
|
-
"document": "accountType 是 QQ 或微信开放账号时,用于标识 QQ 或微信用户登录后关联业务自身的账号 ID。",
|
58
|
-
"member": "string",
|
59
|
-
"name": "AssociateAccount",
|
60
|
-
"required": false,
|
61
|
-
"type": "string"
|
62
|
-
},
|
63
|
-
{
|
64
|
-
"document": "昵称,UTF-8 编码。",
|
65
|
-
"member": "string",
|
66
|
-
"name": "NickName",
|
67
|
-
"required": false,
|
68
|
-
"type": "string"
|
69
|
-
},
|
70
|
-
{
|
71
|
-
"document": "手机号:国家代码-手机号, 如0086-15912345687(0086前不需要+号)。",
|
72
|
-
"member": "string",
|
73
|
-
"name": "PhoneNumber",
|
74
|
-
"required": false,
|
75
|
-
"type": "string"
|
76
|
-
},
|
77
|
-
{
|
78
|
-
"document": "用户邮箱地址(非系统自动生成)。",
|
79
|
-
"member": "string",
|
80
|
-
"name": "EmailAddress",
|
81
|
-
"required": false,
|
82
|
-
"type": "string"
|
83
|
-
},
|
84
|
-
{
|
85
|
-
"document": "注册来源的外网 IP。",
|
86
|
-
"member": "string",
|
87
|
-
"name": "RegisterTime",
|
88
|
-
"required": false,
|
89
|
-
"type": "string"
|
90
|
-
},
|
91
|
-
{
|
92
|
-
"document": "地址。",
|
93
|
-
"member": "string",
|
94
|
-
"name": "Address",
|
95
|
-
"required": false,
|
96
|
-
"type": "string"
|
97
|
-
},
|
98
|
-
{
|
99
|
-
"document": "用户 HTTP 请求中的 cookie 进行2次 hash 的值,只要保证相同 cookie 的 hash 值一致即可。",
|
100
|
-
"member": "string",
|
101
|
-
"name": "CookieHash",
|
102
|
-
"required": false,
|
103
|
-
"type": "string"
|
104
|
-
},
|
105
|
-
{
|
106
|
-
"document": "登录来源:\n0:其他\n1:PC 网页\n2:移动页面\n3:App\n4:微信公众号",
|
107
|
-
"member": "string",
|
108
|
-
"name": "LoginSource",
|
109
|
-
"required": false,
|
110
|
-
"type": "string"
|
111
|
-
},
|
112
|
-
{
|
113
|
-
"document": "登录方式:\n0:其他\n1:手动帐号密码输入\n2:动态短信密码登录\n3:二维码扫描登录",
|
114
|
-
"member": "string",
|
115
|
-
"name": "LoginType",
|
116
|
-
"required": false,
|
117
|
-
"type": "string"
|
118
|
-
},
|
119
|
-
{
|
120
|
-
"document": "用户 HTTP 请求的 referer 值。",
|
121
|
-
"member": "string",
|
122
|
-
"name": "Referer",
|
123
|
-
"required": false,
|
124
|
-
"type": "string"
|
125
|
-
},
|
126
|
-
{
|
127
|
-
"document": "登录成功后跳转页面。",
|
128
|
-
"member": "string",
|
129
|
-
"name": "JumpUrl",
|
130
|
-
"required": false,
|
131
|
-
"type": "string"
|
132
|
-
},
|
133
|
-
{
|
134
|
-
"document": "用户 HTTP 请求的 userAgent。",
|
135
|
-
"member": "string",
|
136
|
-
"name": "UserAgent",
|
137
|
-
"required": false,
|
138
|
-
"type": "string"
|
139
|
-
},
|
140
|
-
{
|
141
|
-
"document": "用户 HTTP 请求中的 x_forward_for。",
|
142
|
-
"member": "string",
|
143
|
-
"name": "XForwardedFor",
|
144
|
-
"required": false,
|
145
|
-
"type": "string"
|
146
|
-
},
|
147
|
-
{
|
148
|
-
"document": "用户操作过程中鼠标单击次数。",
|
149
|
-
"member": "string",
|
150
|
-
"name": "MouseClickCount",
|
151
|
-
"required": false,
|
152
|
-
"type": "string"
|
153
|
-
},
|
154
|
-
{
|
155
|
-
"document": "用户操作过程中键盘单击次数。",
|
156
|
-
"member": "string",
|
157
|
-
"name": "KeyboardClickCount",
|
158
|
-
"required": false,
|
159
|
-
"type": "string"
|
160
|
-
},
|
161
|
-
{
|
162
|
-
"document": "注册结果:\n0:失败\n1:成功",
|
163
|
-
"member": "string",
|
164
|
-
"name": "Result",
|
165
|
-
"required": false,
|
166
|
-
"type": "string"
|
167
|
-
},
|
168
|
-
{
|
169
|
-
"document": "失败原因:\n0:其他\n1:参数错误\n2:帐号冲突\n3:验证错误",
|
170
|
-
"member": "string",
|
171
|
-
"name": "Reason",
|
172
|
-
"required": false,
|
173
|
-
"type": "string"
|
174
|
-
},
|
175
|
-
{
|
176
|
-
"document": "登录耗时,单位:秒。",
|
177
|
-
"member": "string",
|
178
|
-
"name": "LoginSpend",
|
179
|
-
"required": false,
|
180
|
-
"type": "string"
|
181
|
-
},
|
182
|
-
{
|
183
|
-
"document": "MAC 地址或设备唯一标识。",
|
184
|
-
"member": "string",
|
185
|
-
"name": "MacAddress",
|
186
|
-
"required": false,
|
187
|
-
"type": "string"
|
188
|
-
},
|
189
|
-
{
|
190
|
-
"document": "手机制造商 ID,如果手机注册,请带上此信息。",
|
191
|
-
"member": "string",
|
192
|
-
"name": "VendorId",
|
193
|
-
"required": false,
|
194
|
-
"type": "string"
|
195
|
-
},
|
196
|
-
{
|
197
|
-
"document": "App 客户端版本。",
|
198
|
-
"member": "string",
|
199
|
-
"name": "AppVersion",
|
200
|
-
"required": false,
|
201
|
-
"type": "string"
|
202
|
-
},
|
203
|
-
{
|
204
|
-
"document": "手机设备号。",
|
205
|
-
"member": "string",
|
206
|
-
"name": "Imei",
|
207
|
-
"required": false,
|
208
|
-
"type": "string"
|
209
|
-
},
|
210
|
-
{
|
211
|
-
"document": "业务 ID 网站或应用在多个业务中使用此服务,通过此 ID 区分统计数据。",
|
212
|
-
"member": "string",
|
213
|
-
"name": "BusinessId",
|
214
|
-
"required": false,
|
215
|
-
"type": "string"
|
216
|
-
},
|
217
|
-
{
|
218
|
-
"document": "1:微信公众号\n2:微信小程序",
|
219
|
-
"member": "string",
|
220
|
-
"name": "WxSubType",
|
221
|
-
"required": false,
|
222
|
-
"type": "string"
|
223
|
-
},
|
224
|
-
{
|
225
|
-
"document": "Token 签名随机数,微信小程序必填,建议16个字符。",
|
226
|
-
"member": "string",
|
227
|
-
"name": "RandNum",
|
228
|
-
"required": false,
|
229
|
-
"type": "string"
|
230
|
-
},
|
231
|
-
{
|
232
|
-
"document": "如果是微信小程序,该字段为以 ssesion_key 为 key 去签名随机数radnNum得到的值(hmac_sha256 签名算法)。\n如果是微信公众号或第三方登录,则为授权的 access_token(注意:不是普通 access_token,具体看 微信官方文档)。",
|
233
|
-
"member": "string",
|
234
|
-
"name": "WxToken",
|
235
|
-
"required": false,
|
236
|
-
"type": "string"
|
237
|
-
}
|
238
|
-
],
|
239
|
-
"type": "object"
|
240
|
-
},
|
241
|
-
"QueryLoginProtectionResponse": {
|
242
|
-
"document": "QueryLoginProtection返回参数结构体",
|
243
|
-
"members": [
|
244
|
-
{
|
245
|
-
"document": "AssociateAccount\n\naccountType 是 QQ 或微信开放账号时,用于标识 QQ 或微信用户登录后关联业务自身的账号 ID。\nLoginTime\n\n操作时间。\nUid\n\n用户 ID 不同的 accountType 对应不同的用户 ID。如果是 QQ,则填入对应的 openid,微信用户则填入对应的 openid/unionid,手机号则填入对应真实用户手机号(如13123456789)。\nLoginIp\n\n登录 IP。\nLevel\n\n0:表示无恶意。\n1 - 4:恶意等级由低到高。\nRiskType\n\n风险类型。\n出参不用填\"Req业务侧错误码。成功时返回 Success,错误时返回具体业务错误原因。uestId\"等公共出参, 详细解释>>>\n注意:此字段可能返回 null,表示取不到有效值。",
|
246
|
-
"member": "string",
|
247
|
-
"name": "CodeDesc",
|
248
|
-
"type": "string",
|
249
|
-
"value_allowed_null": true
|
250
|
-
},
|
251
|
-
{
|
252
|
-
"document": "accountType 是 QQ 或微信开放账号时,用于标识 QQ 或微信用户登录后关联业务自身的账号 ID。\n注意:此字段可能返回 null,表示取不到有效值。",
|
253
|
-
"member": "string",
|
254
|
-
"name": "AssociateAccount",
|
255
|
-
"type": "string",
|
256
|
-
"value_allowed_null": true
|
257
|
-
},
|
258
|
-
{
|
259
|
-
"document": "操作时间。\n注意:此字段可能返回 null,表示取不到有效值。",
|
260
|
-
"member": "string",
|
261
|
-
"name": "LoginTime",
|
262
|
-
"type": "string",
|
263
|
-
"value_allowed_null": true
|
264
|
-
},
|
265
|
-
{
|
266
|
-
"document": "用户 ID 不同的 accountType 对应不同的用户 ID。如果是 QQ,则填入对应的 openid,微信用户则填入对应的 openid/unionid,手机号则填入对应真实用户手机号(如13123456789)。\n注意:此字段可能返回 null,表示取不到有效值。",
|
267
|
-
"member": "string",
|
268
|
-
"name": "Uid",
|
269
|
-
"type": "string",
|
270
|
-
"value_allowed_null": true
|
271
|
-
},
|
272
|
-
{
|
273
|
-
"document": "登录 IP。\n注意:此字段可能返回 null,表示取不到有效值。",
|
274
|
-
"member": "string",
|
275
|
-
"name": "LoginIp",
|
276
|
-
"type": "string",
|
277
|
-
"value_allowed_null": true
|
278
|
-
},
|
279
|
-
{
|
280
|
-
"document": "0:表示无恶意。\n1 - 4:恶意等级由低到高。",
|
281
|
-
"member": "int64",
|
282
|
-
"name": "Level",
|
283
|
-
"type": "int",
|
284
|
-
"value_allowed_null": false
|
285
|
-
},
|
286
|
-
{
|
287
|
-
"document": "风险类型。",
|
288
|
-
"member": "int64",
|
289
|
-
"name": "RiskType",
|
290
|
-
"type": "list",
|
291
|
-
"value_allowed_null": false
|
292
|
-
},
|
293
|
-
{
|
294
|
-
"document": "accountType 是 QQ 或微信开放账号时,用于标识 QQ 或微信用户登录后关联业务自身的账号 ID。\n注意:此字段可能返回 null,表示取不到有效值。",
|
295
|
-
"member": "string",
|
296
|
-
"name": "RootId",
|
297
|
-
"type": "string",
|
298
|
-
"value_allowed_null": true
|
299
|
-
},
|
300
|
-
{
|
301
|
-
"document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
|
302
|
-
"member": "string",
|
303
|
-
"name": "RequestId",
|
304
|
-
"type": "string"
|
305
|
-
}
|
306
|
-
],
|
307
|
-
"type": "object"
|
308
|
-
}
|
309
|
-
},
|
310
|
-
"version": "1.0"
|
311
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"actions": {
|
3
|
-
"QueryLoginProtection": [
|
4
|
-
{
|
5
|
-
"document": "",
|
6
|
-
"input": "https://lp.tencentcloudapi.com/?Action=QueryLoginProtection\r\n&AccountType=10004\r\n&Uid=bfd81ee3ed27ad31c95ca75e21365973\r\n&LoginIp=101.231.62.66\r\n&LoginTime=1582029456\r\n&<公共请求参数>",
|
7
|
-
"output": "{\n \"Response\": {\n \"Level\": 1,\n \"LoginIp\": \"101.231.62.66\",\n \"LoginTime\": \"1582029456\",\n \"RiskType\": [\n 1,\n 22\n ],\n \"CodeDesc\": \"Success\",\n \"Uid\": \"bfd81ee3ed27ad31c95ca75e21365973\"\n }\n}",
|
8
|
-
"title": "登录保护接口示例"
|
9
|
-
}
|
10
|
-
]
|
11
|
-
},
|
12
|
-
"version": "1.0"
|
13
|
-
}
|
tccli/services/rkp/__init__.py
DELETED