tccli 3.0.1343.1__py2.py3-none-any.whl → 3.0.1344.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 (79) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +6 -0
  3. tccli/services/ams/v20201229/api.json +46 -46
  4. tccli/services/ams/v20201229/examples.json +1 -1
  5. tccli/services/batch/batch_client.py +53 -0
  6. tccli/services/batch/v20170312/api.json +125 -0
  7. tccli/services/batch/v20170312/examples.json +8 -0
  8. tccli/services/bh/v20230418/api.json +282 -1
  9. tccli/services/bh/v20230418/examples.json +3 -3
  10. tccli/services/bi/v20220105/api.json +9 -0
  11. tccli/services/ccc/v20200210/api.json +9 -0
  12. tccli/services/cdb/v20170320/api.json +38 -38
  13. tccli/services/cdb/v20170320/examples.json +3 -3
  14. tccli/services/cdwch/cdwch_client.py +53 -0
  15. tccli/services/cdwch/v20200915/api.json +410 -0
  16. tccli/services/cdwch/v20200915/examples.json +8 -0
  17. tccli/services/cdwdoris/v20211228/api.json +22 -2
  18. tccli/services/cfg/v20210820/api.json +72 -0
  19. tccli/services/ckafka/v20190819/api.json +21 -1
  20. tccli/services/csip/csip_client.py +163 -4
  21. tccli/services/csip/v20221121/api.json +967 -164
  22. tccli/services/csip/v20221121/examples.json +29 -5
  23. tccli/services/cvm/v20170312/api.json +16 -5
  24. tccli/services/cvm/v20170312/examples.json +1 -1
  25. tccli/services/dlc/v20210125/api.json +61 -0
  26. tccli/services/emr/emr_client.py +167 -8
  27. tccli/services/emr/v20190103/api.json +809 -14
  28. tccli/services/emr/v20190103/examples.json +24 -0
  29. tccli/services/es/v20250101/examples.json +2 -2
  30. tccli/services/ess/v20201111/api.json +15 -6
  31. tccli/services/essbasic/v20210526/api.json +2 -2
  32. tccli/services/gs/v20191118/api.json +40 -1
  33. tccli/services/gs/v20191118/examples.json +2 -2
  34. tccli/services/hunyuan/v20230901/api.json +1 -1
  35. tccli/services/igtm/__init__.py +4 -0
  36. tccli/services/igtm/igtm_client.py +1373 -0
  37. tccli/services/igtm/v20231024/api.json +3569 -0
  38. tccli/services/igtm/v20231024/examples.json +207 -0
  39. tccli/services/ims/v20201229/api.json +20 -28
  40. tccli/services/ioa/ioa_client.py +114 -8
  41. tccli/services/ioa/v20220601/api.json +218 -3
  42. tccli/services/ioa/v20220601/examples.json +16 -0
  43. tccli/services/iss/v20230517/api.json +11 -2
  44. tccli/services/kms/v20190118/api.json +4 -4
  45. tccli/services/lighthouse/v20200324/api.json +1 -1
  46. tccli/services/mps/v20190612/api.json +43 -5
  47. tccli/services/ocr/v20181119/api.json +127 -118
  48. tccli/services/partners/v20180321/api.json +1 -1
  49. tccli/services/securitylake/__init__.py +4 -0
  50. tccli/services/securitylake/securitylake_client.py +207 -0
  51. tccli/services/securitylake/v20240117/api.json +723 -0
  52. tccli/services/securitylake/v20240117/examples.json +13 -0
  53. tccli/services/tcbr/v20220217/api.json +70 -0
  54. tccli/services/tdmq/v20200217/api.json +263 -5
  55. tccli/services/tdmq/v20200217/examples.json +1 -1
  56. tccli/services/teo/v20220901/api.json +40 -30
  57. tccli/services/teo/v20220901/examples.json +19 -19
  58. tccli/services/tione/tione_client.py +57 -4
  59. tccli/services/tione/v20211111/api.json +283 -1
  60. tccli/services/tione/v20211111/examples.json +8 -0
  61. tccli/services/tke/v20180525/api.json +37 -28
  62. tccli/services/tms/v20201229/api.json +14 -21
  63. tccli/services/trocket/v20230308/api.json +80 -80
  64. tccli/services/trocket/v20230308/examples.json +1 -1
  65. tccli/services/tsf/tsf_client.py +61 -8
  66. tccli/services/tsf/v20180326/api.json +3161 -2106
  67. tccli/services/tsf/v20180326/examples.json +8 -0
  68. tccli/services/vdb/v20230616/api.json +49 -0
  69. tccli/services/vdb/v20230616/examples.json +1 -1
  70. tccli/services/vm/v20210922/api.json +8 -8
  71. tccli/services/vpc/v20170312/api.json +1 -1
  72. tccli/services/wav/v20210129/api.json +10 -10
  73. tccli/services/wav/v20210129/examples.json +3 -3
  74. tccli/services/wedata/v20210820/api.json +11 -0
  75. {tccli-3.0.1343.1.dist-info → tccli-3.0.1344.1.dist-info}/METADATA +2 -2
  76. {tccli-3.0.1343.1.dist-info → tccli-3.0.1344.1.dist-info}/RECORD +79 -71
  77. {tccli-3.0.1343.1.dist-info → tccli-3.0.1344.1.dist-info}/WHEEL +0 -0
  78. {tccli-3.0.1343.1.dist-info → tccli-3.0.1344.1.dist-info}/entry_points.txt +0 -0
  79. {tccli-3.0.1343.1.dist-info → tccli-3.0.1344.1.dist-info}/license_files/LICENSE +0 -0
@@ -1850,7 +1850,7 @@
1850
1850
  },
1851
1851
  {
1852
1852
  "disabled": false,
1853
- "document": "订单的状态(1:未支付;2:已支付;3:发货中;4:已发货;5:发货失败;6:已退款;7:已关单;8:订单过期;9:订单已失效;10:产品已失效;11:代付拒绝;12:支付中)",
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",
@@ -0,0 +1,4 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ from tccli.services.securitylake.securitylake_client import action_caller
4
+
@@ -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
+