tccli 3.0.1343.1__py2.py3-none-any.whl → 3.0.1345.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 +6 -0
- tccli/services/aiart/aiart_client.py +167 -61
- tccli/services/aiart/v20221229/api.json +253 -0
- tccli/services/aiart/v20221229/examples.json +16 -0
- tccli/services/ams/v20201229/api.json +46 -46
- tccli/services/ams/v20201229/examples.json +1 -1
- tccli/services/apm/v20210622/api.json +228 -0
- tccli/services/apm/v20210622/examples.json +1 -1
- tccli/services/batch/batch_client.py +53 -0
- tccli/services/batch/v20170312/api.json +127 -2
- tccli/services/batch/v20170312/examples.json +8 -0
- tccli/services/bh/v20230418/api.json +282 -1
- tccli/services/bh/v20230418/examples.json +3 -3
- tccli/services/bi/v20220105/api.json +9 -0
- tccli/services/ccc/ccc_client.py +61 -8
- tccli/services/ccc/v20200210/api.json +130 -0
- tccli/services/ccc/v20200210/examples.json +8 -0
- tccli/services/cdb/v20170320/api.json +103 -103
- tccli/services/cdb/v20170320/examples.json +5 -5
- tccli/services/cdwch/cdwch_client.py +53 -0
- tccli/services/cdwch/v20200915/api.json +410 -0
- tccli/services/cdwch/v20200915/examples.json +8 -0
- tccli/services/cdwdoris/v20211228/api.json +22 -2
- tccli/services/cfg/v20210820/api.json +72 -0
- tccli/services/ckafka/v20190819/api.json +21 -1
- tccli/services/csip/csip_client.py +326 -8
- tccli/services/csip/v20221121/api.json +2015 -335
- tccli/services/csip/v20221121/examples.json +65 -5
- tccli/services/cvm/v20170312/api.json +16 -5
- tccli/services/cvm/v20170312/examples.json +1 -1
- tccli/services/dlc/v20210125/api.json +61 -0
- tccli/services/emr/emr_client.py +167 -8
- tccli/services/emr/v20190103/api.json +831 -15
- tccli/services/emr/v20190103/examples.json +24 -0
- tccli/services/es/v20250101/examples.json +2 -2
- tccli/services/ess/v20201111/api.json +57 -8
- tccli/services/essbasic/v20210526/api.json +23 -3
- tccli/services/gs/v20191118/api.json +41 -2
- tccli/services/gs/v20191118/examples.json +2 -2
- tccli/services/hunyuan/v20230901/api.json +1 -1
- tccli/services/igtm/__init__.py +4 -0
- tccli/services/igtm/igtm_client.py +1373 -0
- tccli/services/igtm/v20231024/api.json +3569 -0
- tccli/services/igtm/v20231024/examples.json +207 -0
- tccli/services/ims/v20201229/api.json +20 -28
- tccli/services/ioa/ioa_client.py +114 -8
- tccli/services/ioa/v20220601/api.json +218 -3
- tccli/services/ioa/v20220601/examples.json +16 -0
- tccli/services/iss/v20230517/api.json +11 -2
- tccli/services/kms/v20190118/api.json +4 -4
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/mps/v20190612/api.json +45 -7
- tccli/services/oceanus/v20190422/api.json +168 -8
- tccli/services/ocr/v20181119/api.json +127 -118
- tccli/services/partners/v20180321/api.json +1 -1
- tccli/services/redis/v20180412/api.json +9 -0
- tccli/services/securitylake/__init__.py +4 -0
- tccli/services/securitylake/securitylake_client.py +207 -0
- tccli/services/securitylake/v20240117/api.json +723 -0
- tccli/services/securitylake/v20240117/examples.json +13 -0
- tccli/services/tcbr/v20220217/api.json +70 -0
- tccli/services/tdmq/v20200217/api.json +263 -5
- tccli/services/tdmq/v20200217/examples.json +1 -1
- tccli/services/teo/v20220901/api.json +40 -30
- tccli/services/teo/v20220901/examples.json +19 -19
- tccli/services/tione/tione_client.py +57 -4
- tccli/services/tione/v20211111/api.json +283 -1
- tccli/services/tione/v20211111/examples.json +8 -0
- tccli/services/tke/v20180525/api.json +37 -28
- tccli/services/tms/v20201229/api.json +14 -21
- tccli/services/trocket/v20230308/api.json +81 -81
- tccli/services/trocket/v20230308/examples.json +1 -1
- tccli/services/trtc/v20190722/api.json +29 -0
- tccli/services/tsf/tsf_client.py +61 -8
- tccli/services/tsf/v20180326/api.json +3161 -2106
- tccli/services/tsf/v20180326/examples.json +8 -0
- tccli/services/vdb/v20230616/api.json +49 -0
- tccli/services/vdb/v20230616/examples.json +1 -1
- tccli/services/vm/v20210922/api.json +8 -8
- tccli/services/vpc/v20170312/api.json +1 -1
- tccli/services/waf/v20180125/api.json +52 -2
- tccli/services/wav/v20210129/api.json +10 -10
- tccli/services/wav/v20210129/examples.json +3 -3
- tccli/services/wedata/v20210820/api.json +11 -0
- {tccli-3.0.1343.1.dist-info → tccli-3.0.1345.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1343.1.dist-info → tccli-3.0.1345.1.dist-info}/RECORD +90 -82
- {tccli-3.0.1343.1.dist-info → tccli-3.0.1345.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1343.1.dist-info → tccli-3.0.1345.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1343.1.dist-info → tccli-3.0.1345.1.dist-info}/license_files/LICENSE +0 -0
@@ -1850,7 +1850,7 @@
|
|
1850
1850
|
},
|
1851
1851
|
{
|
1852
1852
|
"disabled": false,
|
1853
|
-
"document": "
|
1853
|
+
"document": "子订单状态(1-待支付,2-已支付,3-发货中,4-已发货,5-发货失败,6-已退款,7-已取消,8-已过期,9-已失效,12-支付中,13-退款中,30-处理中)\n\n控制台订单状态为以上状态的组合:未支付(1) 处理中(2,3,5,12,13,30) 已取消(7) 交易成功(4) 已过期(8) 已退款(6) 订单错误(9)",
|
1854
1854
|
"example": "1",
|
1855
1855
|
"member": "uint64",
|
1856
1856
|
"name": "Status",
|
@@ -8998,6 +8998,15 @@
|
|
8998
8998
|
"name": "AutoBackupType",
|
8999
8999
|
"required": false,
|
9000
9000
|
"type": "int"
|
9001
|
+
},
|
9002
|
+
{
|
9003
|
+
"disabled": false,
|
9004
|
+
"document": "全量备份文件保存天数。单位:天。",
|
9005
|
+
"example": "7",
|
9006
|
+
"member": "int64",
|
9007
|
+
"name": "BackupStorageDays",
|
9008
|
+
"required": false,
|
9009
|
+
"type": "int"
|
9001
9010
|
}
|
9002
9011
|
],
|
9003
9012
|
"type": "object"
|
@@ -0,0 +1,207 @@
|
|
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.securitylake.v20240117 import securitylake_client as securitylake_client_v20240117
|
15
|
+
from tencentcloud.securitylake.v20240117 import models as models_v20240117
|
16
|
+
|
17
|
+
from jmespath import search
|
18
|
+
import time
|
19
|
+
|
20
|
+
def doDescribeSecurityAlarmTableList(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.SecuritylakeClient(cred, g_param[OptionsDefine.Region], profile)
|
47
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
48
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
49
|
+
model = models.DescribeSecurityAlarmTableListRequest()
|
50
|
+
model.from_json_string(json.dumps(args))
|
51
|
+
start_time = time.time()
|
52
|
+
while True:
|
53
|
+
rsp = client.DescribeSecurityAlarmTableList(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
|
+
"v20240117": securitylake_client_v20240117,
|
74
|
+
|
75
|
+
}
|
76
|
+
|
77
|
+
MODELS_MAP = {
|
78
|
+
"v20240117": models_v20240117,
|
79
|
+
|
80
|
+
}
|
81
|
+
|
82
|
+
ACTION_MAP = {
|
83
|
+
"DescribeSecurityAlarmTableList": doDescribeSecurityAlarmTableList,
|
84
|
+
|
85
|
+
}
|
86
|
+
|
87
|
+
AVAILABLE_VERSION_LIST = [
|
88
|
+
"v20240117",
|
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["securitylake"][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["securitylake"][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
|
+
|