tccli 3.0.1347.1__py2.py3-none-any.whl → 3.0.1349.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 (174) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/__init__.py +3 -76
  3. tccli/services/ai3d/__init__.py +4 -0
  4. tccli/services/{smpn/smpn_client.py → ai3d/ai3d_client.py} +17 -17
  5. tccli/services/ai3d/v20250513/api.json +239 -0
  6. tccli/services/ai3d/v20250513/examples.json +21 -0
  7. tccli/services/aiart/v20221229/api.json +3 -3
  8. tccli/services/autoscaling/v20180419/api.json +11 -0
  9. tccli/services/batch/v20170312/api.json +44 -0
  10. tccli/services/cdb/v20170320/api.json +8 -8
  11. tccli/services/cdb/v20170320/examples.json +1 -1
  12. tccli/services/cdn/v20180606/api.json +5 -5
  13. tccli/services/cdwdoris/v20211228/api.json +145 -7
  14. tccli/services/cfg/v20210820/api.json +20 -0
  15. tccli/services/cfs/v20190719/api.json +10 -10
  16. tccli/services/cfw/cfw_client.py +53 -0
  17. tccli/services/cfw/v20190904/api.json +272 -0
  18. tccli/services/cfw/v20190904/examples.json +8 -0
  19. tccli/services/csip/csip_client.py +833 -144
  20. tccli/services/csip/v20221121/api.json +3304 -1436
  21. tccli/services/csip/v20221121/examples.json +104 -0
  22. tccli/services/cvm/v20170312/api.json +64 -1
  23. tccli/services/cwp/v20180228/api.json +9 -0
  24. tccli/services/cwp/v20180228/examples.json +6 -0
  25. tccli/services/emr/v20190103/api.json +217 -2
  26. tccli/services/es/v20250101/api.json +22 -0
  27. tccli/services/ess/v20201111/api.json +10 -1
  28. tccli/services/essbasic/v20210526/api.json +3 -3
  29. tccli/services/gs/v20191118/api.json +38 -0
  30. tccli/services/igtm/igtm_client.py +159 -0
  31. tccli/services/igtm/v20231024/api.json +577 -0
  32. tccli/services/igtm/v20231024/examples.json +24 -0
  33. tccli/services/iotexplorer/v20190423/api.json +3 -3
  34. tccli/services/lcic/lcic_client.py +53 -0
  35. tccli/services/lcic/v20220817/api.json +53 -0
  36. tccli/services/lcic/v20220817/examples.json +8 -0
  37. tccli/services/live/v20180801/api.json +203 -1
  38. tccli/services/live/v20180801/examples.json +1 -1
  39. tccli/services/lke/v20231130/api.json +248 -2
  40. tccli/services/lke/v20231130/examples.json +1 -1
  41. tccli/services/lkeap/v20240522/api.json +1 -1
  42. tccli/services/mrs/v20200910/api.json +10 -0
  43. tccli/services/nlp/nlp_client.py +4 -322
  44. tccli/services/nlp/v20190408/api.json +0 -459
  45. tccli/services/nlp/v20190408/examples.json +0 -48
  46. tccli/services/ocr/v20181119/api.json +97 -11
  47. tccli/services/omics/v20221128/api.json +38 -0
  48. tccli/services/redis/v20180412/api.json +6 -6
  49. tccli/services/redis/v20180412/examples.json +1 -1
  50. tccli/services/ses/v20201002/api.json +100 -5
  51. tccli/services/tcb/v20180608/api.json +1 -1
  52. tccli/services/tcb/v20180608/examples.json +1 -1
  53. tccli/services/tdmq/v20200217/api.json +19 -0
  54. tccli/services/teo/teo_client.py +281 -16
  55. tccli/services/teo/v20220901/api.json +611 -6
  56. tccli/services/teo/v20220901/examples.json +48 -2
  57. tccli/services/tione/v20211111/api.json +16 -0
  58. tccli/services/tke/tke_client.py +57 -4
  59. tccli/services/tke/v20180525/api.json +24 -24
  60. tccli/services/tke/v20220501/api.json +52 -0
  61. tccli/services/tke/v20220501/examples.json +8 -0
  62. tccli/services/tmt/v20180321/api.json +4 -4
  63. tccli/services/tsf/v20180326/api.json +4 -4
  64. tccli/services/vclm/v20240523/api.json +3 -3
  65. tccli/services/vod/v20180717/api.json +5 -5
  66. tccli/services/vod/v20180717/examples.json +9 -9
  67. tccli/services/vpc/v20170312/api.json +1 -1
  68. tccli/services/vrs/v20200824/api.json +1 -1
  69. {tccli-3.0.1347.1.dist-info → tccli-3.0.1349.1.dist-info}/METADATA +2 -2
  70. {tccli-3.0.1347.1.dist-info → tccli-3.0.1349.1.dist-info}/RECORD +73 -171
  71. tccli/services/cis/__init__.py +0 -4
  72. tccli/services/cis/cis_client.py +0 -525
  73. tccli/services/cis/v20180408/api.json +0 -737
  74. tccli/services/cis/v20180408/examples.json +0 -93
  75. tccli/services/dataintegration/__init__.py +0 -4
  76. tccli/services/dataintegration/dataintegration_client.py +0 -207
  77. tccli/services/dataintegration/v20220613/api.json +0 -87
  78. tccli/services/dataintegration/v20220613/examples.json +0 -13
  79. tccli/services/dtf/__init__.py +0 -4
  80. tccli/services/dtf/dtf_client.py +0 -207
  81. tccli/services/dtf/v20200506/api.json +0 -274
  82. tccli/services/dtf/v20200506/examples.json +0 -13
  83. tccli/services/gpm/__init__.py +0 -4
  84. tccli/services/gpm/gpm_client.py +0 -1108
  85. tccli/services/gpm/v20200820/api.json +0 -1959
  86. tccli/services/gpm/v20200820/examples.json +0 -149
  87. tccli/services/gse/__init__.py +0 -4
  88. tccli/services/gse/gse_client.py +0 -4076
  89. tccli/services/gse/v20191112/api.json +0 -7095
  90. tccli/services/gse/v20191112/examples.json +0 -615
  91. tccli/services/iecp/__init__.py +0 -4
  92. tccli/services/iecp/iecp_client.py +0 -4500
  93. tccli/services/iecp/v20210914/api.json +0 -9770
  94. tccli/services/iecp/v20210914/examples.json +0 -691
  95. tccli/services/iir/__init__.py +0 -4
  96. tccli/services/iir/iir_client.py +0 -207
  97. tccli/services/iir/v20200417/api.json +0 -204
  98. tccli/services/iir/v20200417/examples.json +0 -13
  99. tccli/services/iottid/__init__.py +0 -4
  100. tccli/services/iottid/iottid_client.py +0 -631
  101. tccli/services/iottid/v20190411/api.json +0 -553
  102. tccli/services/iottid/v20190411/examples.json +0 -95
  103. tccli/services/mgobe/__init__.py +0 -4
  104. tccli/services/mgobe/mgobe_client.py +0 -530
  105. tccli/services/mgobe/v20190929/api.json +0 -52
  106. tccli/services/mgobe/v20190929/examples.json +0 -13
  107. tccli/services/mgobe/v20201014/api.json +0 -671
  108. tccli/services/mgobe/v20201014/examples.json +0 -61
  109. tccli/services/mvj/__init__.py +0 -4
  110. tccli/services/mvj/mvj_client.py +0 -207
  111. tccli/services/mvj/v20190926/api.json +0 -123
  112. tccli/services/mvj/v20190926/examples.json +0 -19
  113. tccli/services/pds/__init__.py +0 -4
  114. tccli/services/pds/pds_client.py +0 -260
  115. tccli/services/pds/v20210701/api.json +0 -193
  116. tccli/services/pds/v20210701/examples.json +0 -21
  117. tccli/services/smpn/__init__.py +0 -4
  118. tccli/services/smpn/v20190822/api.json +0 -191
  119. tccli/services/smpn/v20190822/examples.json +0 -21
  120. tccli/services/solar/__init__.py +0 -4
  121. tccli/services/solar/solar_client.py +0 -1055
  122. tccli/services/solar/v20181011/api.json +0 -1760
  123. tccli/services/solar/v20181011/examples.json +0 -125
  124. tccli/services/tan/__init__.py +0 -4
  125. tccli/services/tan/tan_client.py +0 -207
  126. tccli/services/tan/v20220420/api.json +0 -65
  127. tccli/services/tan/v20220420/examples.json +0 -19
  128. tccli/services/tav/__init__.py +0 -4
  129. tccli/services/tav/tav_client.py +0 -366
  130. tccli/services/tav/v20190118/api.json +0 -262
  131. tccli/services/tav/v20190118/examples.json +0 -37
  132. tccli/services/tbm/__init__.py +0 -4
  133. tccli/services/tbm/tbm_client.py +0 -631
  134. tccli/services/tbm/v20180129/api.json +0 -1037
  135. tccli/services/tbm/v20180129/examples.json +0 -77
  136. tccli/services/tcex/__init__.py +0 -4
  137. tccli/services/tcex/tcex_client.py +0 -260
  138. tccli/services/tcex/v20200727/api.json +0 -158
  139. tccli/services/tcex/v20200727/examples.json +0 -21
  140. tccli/services/tci/__init__.py +0 -4
  141. tccli/services/tci/tci_client.py +0 -2327
  142. tccli/services/tci/v20190318/api.json +0 -4958
  143. tccli/services/tci/v20190318/examples.json +0 -333
  144. tccli/services/tic/__init__.py +0 -4
  145. tccli/services/tic/tic_client.py +0 -843
  146. tccli/services/tic/v20201117/api.json +0 -1067
  147. tccli/services/tic/v20201117/examples.json +0 -121
  148. tccli/services/ticm/__init__.py +0 -4
  149. tccli/services/ticm/ticm_client.py +0 -313
  150. tccli/services/ticm/v20181127/api.json +0 -1391
  151. tccli/services/ticm/v20181127/examples.json +0 -53
  152. tccli/services/tics/__init__.py +0 -4
  153. tccli/services/tics/tics_client.py +0 -366
  154. tccli/services/tics/v20181115/api.json +0 -694
  155. tccli/services/tics/v20181115/examples.json +0 -37
  156. tccli/services/tiems/__init__.py +0 -4
  157. tccli/services/tiems/tiems_client.py +0 -1479
  158. tccli/services/tiems/v20190416/api.json +0 -3144
  159. tccli/services/tiems/v20190416/examples.json +0 -217
  160. tccli/services/trdp/__init__.py +0 -4
  161. tccli/services/trdp/trdp_client.py +0 -207
  162. tccli/services/trdp/v20220726/api.json +0 -843
  163. tccli/services/trdp/v20220726/examples.json +0 -13
  164. tccli/services/ump/__init__.py +0 -4
  165. tccli/services/ump/ump_client.py +0 -1055
  166. tccli/services/ump/v20200918/api.json +0 -2168
  167. tccli/services/ump/v20200918/examples.json +0 -141
  168. tccli/services/youmall/__init__.py +0 -4
  169. tccli/services/youmall/v20180228/api.json +0 -3572
  170. tccli/services/youmall/v20180228/examples.json +0 -313
  171. tccli/services/youmall/youmall_client.py +0 -1797
  172. {tccli-3.0.1347.1.dist-info → tccli-3.0.1349.1.dist-info}/WHEEL +0 -0
  173. {tccli-3.0.1347.1.dist-info → tccli-3.0.1349.1.dist-info}/entry_points.txt +0 -0
  174. {tccli-3.0.1347.1.dist-info → tccli-3.0.1349.1.dist-info}/license_files/LICENSE +0 -0
@@ -1,260 +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.pds.v20210701 import pds_client as pds_client_v20210701
15
- from tencentcloud.pds.v20210701 import models as models_v20210701
16
-
17
- from jmespath import search
18
- import time
19
-
20
- def doDescribeStockEstimation(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.PdsClient(cred, g_param[OptionsDefine.Region], profile)
47
- client._sdkVersion += ("_CLI_" + __version__)
48
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
- model = models.DescribeStockEstimationRequest()
50
- model.from_json_string(json.dumps(args))
51
- start_time = time.time()
52
- while True:
53
- rsp = client.DescribeStockEstimation(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
- def doDescribeNewUserAcquisition(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.PdsClient(cred, g_param[OptionsDefine.Region], profile)
99
- client._sdkVersion += ("_CLI_" + __version__)
100
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
101
- model = models.DescribeNewUserAcquisitionRequest()
102
- model.from_json_string(json.dumps(args))
103
- start_time = time.time()
104
- while True:
105
- rsp = client.DescribeNewUserAcquisition(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
- CLIENT_MAP = {
125
- "v20210701": pds_client_v20210701,
126
-
127
- }
128
-
129
- MODELS_MAP = {
130
- "v20210701": models_v20210701,
131
-
132
- }
133
-
134
- ACTION_MAP = {
135
- "DescribeStockEstimation": doDescribeStockEstimation,
136
- "DescribeNewUserAcquisition": doDescribeNewUserAcquisition,
137
-
138
- }
139
-
140
- AVAILABLE_VERSION_LIST = [
141
- "v20210701",
142
-
143
- ]
144
-
145
-
146
- def action_caller():
147
- return ACTION_MAP
148
-
149
-
150
- def parse_global_arg(parsed_globals):
151
- g_param = parsed_globals
152
- cvm_role_flag = True
153
- for param in parsed_globals.keys():
154
- if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.RoleArn,
155
- OptionsDefine.RoleSessionName]:
156
- if parsed_globals[param] is not None:
157
- cvm_role_flag = False
158
- break
159
- is_exist_profile = True
160
- if not parsed_globals["profile"]:
161
- is_exist_profile = False
162
- g_param["profile"] = os.environ.get("TCCLI_PROFILE", "default")
163
-
164
- configure_path = os.path.join(os.path.expanduser("~"), ".tccli")
165
- is_conf_exist, conf_path = Utils.file_existed(configure_path, g_param["profile"] + ".configure")
166
- is_cred_exist, cred_path = Utils.file_existed(configure_path, g_param["profile"] + ".credential")
167
-
168
- conf = {}
169
- cred = {}
170
-
171
- if is_conf_exist:
172
- conf = Utils.load_json_msg(conf_path)
173
- if is_cred_exist:
174
- cred = Utils.load_json_msg(cred_path)
175
-
176
- if not (isinstance(conf, dict) and isinstance(cred, dict)):
177
- raise ConfigurationError(
178
- "file: %s or %s is not json format"
179
- % (g_param["profile"] + ".configure", g_param["profile"] + ".credential"))
180
-
181
- if OptionsDefine.Token not in cred:
182
- cred[OptionsDefine.Token] = None
183
-
184
- if not is_exist_profile:
185
- if os.environ.get(OptionsDefine.ENV_SECRET_ID) and os.environ.get(OptionsDefine.ENV_SECRET_KEY):
186
- cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
187
- cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
188
- cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
189
- cvm_role_flag = False
190
-
191
- if os.environ.get(OptionsDefine.ENV_REGION):
192
- conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
193
-
194
- if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
195
- cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
196
- cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
197
- cvm_role_flag = False
198
-
199
- if cvm_role_flag:
200
- if "type" in cred and cred["type"] == "cvm-role":
201
- g_param[OptionsDefine.UseCVMRole.replace('-', '_')] = True
202
-
203
- for param in g_param.keys():
204
- if g_param[param] is None:
205
- if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.Token]:
206
- if param in cred:
207
- g_param[param] = cred[param]
208
- elif not (g_param[OptionsDefine.UseCVMRole.replace('-', '_')]
209
- or os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN)):
210
- raise ConfigurationError("%s is invalid" % param)
211
- elif param in [OptionsDefine.Region, OptionsDefine.Output, OptionsDefine.Language]:
212
- if param in conf[OptionsDefine.SysParam]:
213
- g_param[param] = conf[OptionsDefine.SysParam][param]
214
- elif param != OptionsDefine.Language:
215
- raise ConfigurationError("%s is invalid" % param)
216
- elif param.replace('_', '-') in [OptionsDefine.RoleArn, OptionsDefine.RoleSessionName]:
217
- if param.replace('_', '-') in cred:
218
- g_param[param] = cred[param.replace('_', '-')]
219
-
220
- try:
221
- if g_param[OptionsDefine.ServiceVersion]:
222
- g_param[OptionsDefine.Version] = "v" + g_param[OptionsDefine.ServiceVersion].replace('-', '')
223
- else:
224
- version = conf["pds"][OptionsDefine.Version]
225
- g_param[OptionsDefine.Version] = "v" + version.replace('-', '')
226
-
227
- if g_param[OptionsDefine.Endpoint] is None:
228
- g_param[OptionsDefine.Endpoint] = conf["pds"][OptionsDefine.Endpoint]
229
- g_param["sts_cred_endpoint"] = conf.get("sts", {}).get("endpoint")
230
- except Exception as err:
231
- raise ConfigurationError("config file:%s error, %s" % (conf_path, str(err)))
232
-
233
- if g_param[OptionsDefine.Version] not in AVAILABLE_VERSION_LIST:
234
- raise Exception("available versions: %s" % " ".join(AVAILABLE_VERSION_LIST))
235
-
236
- if g_param[OptionsDefine.Waiter]:
237
- param = eval(g_param[OptionsDefine.Waiter])
238
- if 'expr' not in param:
239
- raise Exception('`expr` in `--waiter` must be defined')
240
- if 'to' not in param:
241
- raise Exception('`to` in `--waiter` must be defined')
242
- if 'timeout' not in param:
243
- if 'waiter' in conf and 'timeout' in conf['waiter']:
244
- param['timeout'] = conf['waiter']['timeout']
245
- else:
246
- param['timeout'] = 180
247
- if 'interval' not in param:
248
- if 'waiter' in conf and 'interval' in conf['waiter']:
249
- param['interval'] = conf['waiter']['interval']
250
- else:
251
- param['interval'] = 5
252
- param['interval'] = min(param['interval'], param['timeout'])
253
- g_param['OptionsDefine.WaiterInfo'] = param
254
-
255
- if six.PY2:
256
- for key, value in g_param.items():
257
- if isinstance(value, six.text_type):
258
- g_param[key] = value.encode('utf-8')
259
- return g_param
260
-
@@ -1,193 +0,0 @@
1
- {
2
- "actions": {
3
- "DescribeNewUserAcquisition": {
4
- "document": "判断新用户信誉值",
5
- "input": "DescribeNewUserAcquisitionRequest",
6
- "name": "拉新判断服务",
7
- "output": "DescribeNewUserAcquisitionResponse",
8
- "status": "online"
9
- },
10
- "DescribeStockEstimation": {
11
- "document": "查询存量判断服务",
12
- "input": "DescribeStockEstimationRequest",
13
- "name": "存量判断服务",
14
- "output": "DescribeStockEstimationResponse",
15
- "status": "online"
16
- }
17
- },
18
- "metadata": {
19
- "apiVersion": "2021-07-01",
20
- "api_brief": "调用此api接口使用私域安全产品服务,通过此接口获得用户安全安全分。",
21
- "serviceNameCN": "私域安全",
22
- "serviceShortName": "pds"
23
- },
24
- "objects": {
25
- "DescribeNewUserAcquisitionRequest": {
26
- "document": "DescribeNewUserAcquisition请求参数结构体",
27
- "members": [
28
- {
29
- "disabled": false,
30
- "document": "用户信息",
31
- "example": "无",
32
- "member": "UserInfos",
33
- "name": "ServiceParams",
34
- "required": true,
35
- "type": "object"
36
- }
37
- ],
38
- "type": "object"
39
- },
40
- "DescribeNewUserAcquisitionResponse": {
41
- "document": "DescribeNewUserAcquisition返回参数结构体",
42
- "members": [
43
- {
44
- "disabled": false,
45
- "document": "用户信誉分,1-5从低到高",
46
- "example": "无",
47
- "member": "Score",
48
- "name": "ServiceRsp",
49
- "required": true,
50
- "type": "object",
51
- "value_allowed_null": false
52
- },
53
- {
54
- "document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
55
- "member": "string",
56
- "name": "RequestId",
57
- "type": "string"
58
- }
59
- ],
60
- "type": "object"
61
- },
62
- "DescribeStockEstimationRequest": {
63
- "document": "DescribeStockEstimation请求参数结构体",
64
- "members": [
65
- {
66
- "disabled": false,
67
- "document": "用户信息",
68
- "example": "无",
69
- "member": "UserInfos",
70
- "name": "ServiceParams",
71
- "required": true,
72
- "type": "object"
73
- }
74
- ],
75
- "type": "object"
76
- },
77
- "DescribeStockEstimationResponse": {
78
- "document": "DescribeStockEstimation返回参数结构体",
79
- "members": [
80
- {
81
- "disabled": false,
82
- "document": "用户信誉分,1-5从低到高",
83
- "example": "无",
84
- "member": "Score",
85
- "name": "ServiceRsp",
86
- "required": true,
87
- "type": "object",
88
- "value_allowed_null": false
89
- },
90
- {
91
- "document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
92
- "member": "string",
93
- "name": "RequestId",
94
- "type": "string"
95
- }
96
- ],
97
- "type": "object"
98
- },
99
- "Score": {
100
- "document": "信誉分,1-5从低到高",
101
- "members": [
102
- {
103
- "disabled": false,
104
- "document": "信誉分,1-5从低到高",
105
- "example": "1",
106
- "member": "int64",
107
- "name": "Star",
108
- "required": true,
109
- "type": "int",
110
- "value_allowed_null": false
111
- }
112
- ],
113
- "usage": "out"
114
- },
115
- "UserInfos": {
116
- "document": "用户信息",
117
- "members": [
118
- {
119
- "disabled": false,
120
- "document": "用户的手机号",
121
- "example": "13800138000",
122
- "member": "string",
123
- "name": "PhoneNum",
124
- "required": true,
125
- "type": "string",
126
- "value_allowed_null": false
127
- },
128
- {
129
- "disabled": false,
130
- "document": "用户的微信OpenID",
131
- "example": "oOpAR5aURf7wgM_WLPtzSeixpozs",
132
- "member": "string",
133
- "name": "Openid",
134
- "required": true,
135
- "type": "string",
136
- "value_allowed_null": false
137
- },
138
- {
139
- "disabled": false,
140
- "document": "用户移动设备的客户端IP",
141
- "example": "192.168.0.1",
142
- "member": "string",
143
- "name": "IP",
144
- "required": false,
145
- "type": "string",
146
- "value_allowed_null": false
147
- },
148
- {
149
- "disabled": false,
150
- "document": "用户WiFi的BSSID",
151
- "example": "FF:FF:FF:FF:FF:FF",
152
- "member": "string",
153
- "name": "WiFiBssid",
154
- "required": false,
155
- "type": "string",
156
- "value_allowed_null": false
157
- },
158
- {
159
- "disabled": false,
160
- "document": "用户Android设备的IMEI",
161
- "example": "861144041825914",
162
- "member": "string",
163
- "name": "IMEI",
164
- "required": false,
165
- "type": "string",
166
- "value_allowed_null": false
167
- },
168
- {
169
- "disabled": false,
170
- "document": "用户Android设备的OAID",
171
- "example": "a919ac7f-7fcc-42ee-97e3-755a4f22a017",
172
- "member": "string",
173
- "name": "OAID",
174
- "required": false,
175
- "type": "string",
176
- "value_allowed_null": false
177
- },
178
- {
179
- "disabled": false,
180
- "document": "用户iOS设备的IDFA",
181
- "example": "04D3E988-6A31-4AFC-883A-5547F78EC644",
182
- "member": "string",
183
- "name": "IDFA",
184
- "required": false,
185
- "type": "string",
186
- "value_allowed_null": false
187
- }
188
- ],
189
- "usage": "in"
190
- }
191
- },
192
- "version": "1.0"
193
- }
@@ -1,21 +0,0 @@
1
- {
2
- "actions": {
3
- "DescribeNewUserAcquisition": [
4
- {
5
- "document": "",
6
- "input": "POST / HTTP/1.1\nHost: pds.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeNewUserAcquisition\n<公共请求参数>\n\n{\n \"ServiceParams\": {\n \"Openid\": \"xx\",\n \"IP\": \"xx\",\n \"PhoneNum\": \"xx\"\n }\n}",
7
- "output": "{\n \"Response\": {\n \"ServiceRsp\": {\n \"Star\": 0\n },\n \"RequestId\": \"xx\"\n }\n}",
8
- "title": "查询用户信誉值"
9
- }
10
- ],
11
- "DescribeStockEstimation": [
12
- {
13
- "document": "",
14
- "input": "POST / HTTP/1.1\nHost: pds.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeStockEstimation\n<公共请求参数>\n\n{\n \"ServiceParams\": {\n \"Openid\": \"xx\",\n \"PhoneNum\": \"xx\",\n \"IP\": \"xx\"\n }\n}",
15
- "output": "{\n \"Response\": {\n \"ServiceRsp\": {\n \"Star\": 0\n },\n \"RequestId\": \"xx\"\n }\n}",
16
- "title": "查询用户信誉分"
17
- }
18
- ]
19
- },
20
- "version": "1.0"
21
- }
@@ -1,4 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- from tccli.services.smpn.smpn_client import action_caller
4
-
@@ -1,191 +0,0 @@
1
- {
2
- "actions": {
3
- "DescribeSmpnChp": {
4
- "document": "不在使用的API\n\n查询号码的标记和标记次数",
5
- "input": "DescribeSmpnChpRequest",
6
- "name": "终端骚扰保护",
7
- "output": "DescribeSmpnChpResponse",
8
- "status": "deprecated"
9
- },
10
- "DescribeSmpnFnr": {
11
- "document": "不在使用的API\n\n虚假号码识别",
12
- "input": "DescribeSmpnFnrRequest",
13
- "name": "虚假号码识别",
14
- "output": "DescribeSmpnFnrResponse",
15
- "status": "deprecated"
16
- }
17
- },
18
- "metadata": {
19
- "apiVersion": "2019-08-22",
20
- "api_brief": "介绍如何使用API对营销号码安全进行操作,包括企业认证、终端骚扰保护、虚假号码识别等。",
21
- "serviceNameCN": "营销号码安全",
22
- "serviceShortName": "smpn"
23
- },
24
- "objects": {
25
- "CHPRequest": {
26
- "document": "终端骚扰保护请求内容",
27
- "members": [
28
- {
29
- "disabled": false,
30
- "document": "电话号码",
31
- "example": "",
32
- "member": "string",
33
- "name": "PhoneNumber",
34
- "required": true,
35
- "type": "string",
36
- "value_allowed_null": false
37
- }
38
- ],
39
- "usage": "in"
40
- },
41
- "CHPResponse": {
42
- "document": "终端骚扰保护",
43
- "members": [
44
- {
45
- "disabled": false,
46
- "document": "标记类型\n 0: 无标记\n 50:骚扰电话\n 51:房产中介\n 52:保险理财\n 53:广告推销\n 54:诈骗电话\n 55:快递电话\n 56:出租车专车",
47
- "example": "",
48
- "member": "int64",
49
- "name": "TagType",
50
- "required": true,
51
- "type": "int",
52
- "value_allowed_null": false
53
- },
54
- {
55
- "disabled": false,
56
- "document": "标记次数",
57
- "example": "",
58
- "member": "int64",
59
- "name": "TagCount",
60
- "required": true,
61
- "type": "int",
62
- "value_allowed_null": false
63
- }
64
- ],
65
- "usage": "out"
66
- },
67
- "DescribeSmpnChpRequest": {
68
- "document": "DescribeSmpnChp请求参数结构体",
69
- "members": [
70
- {
71
- "disabled": false,
72
- "document": "客户用于计费的资源Id",
73
- "example": "",
74
- "member": "string",
75
- "name": "ResourceId",
76
- "required": true,
77
- "type": "string"
78
- },
79
- {
80
- "disabled": false,
81
- "document": "终端骚扰保护请求",
82
- "example": "",
83
- "member": "CHPRequest",
84
- "name": "RequestData",
85
- "required": true,
86
- "type": "object"
87
- }
88
- ],
89
- "type": "object"
90
- },
91
- "DescribeSmpnChpResponse": {
92
- "document": "DescribeSmpnChp返回参数结构体",
93
- "members": [
94
- {
95
- "disabled": false,
96
- "document": "终端骚扰保护回应",
97
- "example": "",
98
- "member": "CHPResponse",
99
- "name": "ResponseData",
100
- "type": "object",
101
- "value_allowed_null": false
102
- },
103
- {
104
- "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
105
- "member": "string",
106
- "name": "RequestId",
107
- "type": "string"
108
- }
109
- ],
110
- "type": "object"
111
- },
112
- "DescribeSmpnFnrRequest": {
113
- "document": "DescribeSmpnFnr请求参数结构体",
114
- "members": [
115
- {
116
- "disabled": false,
117
- "document": "虚假号码识别请求内容",
118
- "example": "",
119
- "member": "FNRRequest",
120
- "name": "RequestData",
121
- "required": true,
122
- "type": "object"
123
- },
124
- {
125
- "disabled": false,
126
- "document": "用于计费的资源ID",
127
- "example": "",
128
- "member": "string",
129
- "name": "ResourceId",
130
- "required": true,
131
- "type": "string"
132
- }
133
- ],
134
- "type": "object"
135
- },
136
- "DescribeSmpnFnrResponse": {
137
- "document": "DescribeSmpnFnr返回参数结构体",
138
- "members": [
139
- {
140
- "disabled": false,
141
- "document": "虚假号码识别回应内容",
142
- "example": "",
143
- "member": "FNRResponse",
144
- "name": "ResponseData",
145
- "type": "object",
146
- "value_allowed_null": false
147
- },
148
- {
149
- "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
150
- "member": "string",
151
- "name": "RequestId",
152
- "type": "string"
153
- }
154
- ],
155
- "type": "object"
156
- },
157
- "FNRRequest": {
158
- "document": "虚假号码识别请求",
159
- "members": [
160
- {
161
- "disabled": false,
162
- "document": "电话号码",
163
- "example": "",
164
- "member": "string",
165
- "name": "PhoneNumber",
166
- "required": true,
167
- "type": "string",
168
- "value_allowed_null": false
169
- }
170
- ],
171
- "usage": "in"
172
- },
173
- "FNRResponse": {
174
- "document": "虚假号码识别回应",
175
- "members": [
176
- {
177
- "disabled": false,
178
- "document": "虚假号码描述",
179
- "example": "",
180
- "member": "int64",
181
- "name": "Status",
182
- "required": true,
183
- "type": "int",
184
- "value_allowed_null": false
185
- }
186
- ],
187
- "usage": "out"
188
- }
189
- },
190
- "version": "1.0"
191
- }