tccli 3.0.1378.1__py2.py3-none-any.whl → 3.0.1380.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/apm/v20210622/api.json +22 -0
- tccli/services/cbs/v20170312/api.json +6 -6
- tccli/services/cbs/v20170312/examples.json +6 -6
- tccli/services/dcdb/dcdb_client.py +243 -31
- tccli/services/dcdb/v20180411/api.json +348 -0
- tccli/services/dcdb/v20180411/examples.json +32 -0
- tccli/services/dts/v20211206/api.json +78 -1
- tccli/services/dts/v20211206/examples.json +2 -2
- tccli/services/emr/v20190103/api.json +1 -1
- tccli/services/ess/v20201111/api.json +21 -1
- tccli/services/iotexplorer/iotexplorer_client.py +269 -57
- tccli/services/iotexplorer/v20190423/api.json +357 -0
- tccli/services/iotexplorer/v20190423/examples.json +32 -0
- tccli/services/lkeap/v20240522/api.json +18 -18
- tccli/services/mariadb/mariadb_client.py +220 -8
- tccli/services/mariadb/v20170312/api.json +330 -0
- tccli/services/mariadb/v20170312/examples.json +32 -0
- tccli/services/ocr/v20181119/api.json +8 -8
- tccli/services/teo/v20220901/api.json +1 -1
- tccli/services/trtc/v20190722/api.json +1 -1
- tccli/services/tsf/v20180326/examples.json +1 -1
- tccli/services/vclm/v20240523/api.json +1 -1
- tccli/services/waf/v20180125/api.json +46 -3
- tccli/services/waf/v20180125/examples.json +8 -0
- tccli/services/waf/waf_client.py +53 -0
- tccli/services/wedata/v20210820/api.json +926 -555
- tccli/services/wedata/v20210820/examples.json +9 -17
- tccli/services/wedata/wedata_client.py +57 -110
- tccli/services/wsa/v20250508/api.json +1 -1
- {tccli-3.0.1378.1.dist-info → tccli-3.0.1380.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1378.1.dist-info → tccli-3.0.1380.1.dist-info}/RECORD +35 -35
- {tccli-3.0.1378.1.dist-info → tccli-3.0.1380.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1378.1.dist-info → tccli-3.0.1380.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1378.1.dist-info → tccli-3.0.1380.1.dist-info}/license_files/LICENSE +0 -0
@@ -277,58 +277,6 @@ def doDescribeFirmwareUpdateStatus(args, parsed_globals):
|
|
277
277
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
278
278
|
|
279
279
|
|
280
|
-
def doDescribeModelDefinition(args, parsed_globals):
|
281
|
-
g_param = parse_global_arg(parsed_globals)
|
282
|
-
|
283
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
284
|
-
cred = credential.CVMRoleCredential()
|
285
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
286
|
-
cred = credential.STSAssumeRoleCredential(
|
287
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
288
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
289
|
-
)
|
290
|
-
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):
|
291
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
292
|
-
else:
|
293
|
-
cred = credential.Credential(
|
294
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
295
|
-
)
|
296
|
-
http_profile = HttpProfile(
|
297
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
298
|
-
reqMethod="POST",
|
299
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
300
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
301
|
-
)
|
302
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
303
|
-
if g_param[OptionsDefine.Language]:
|
304
|
-
profile.language = g_param[OptionsDefine.Language]
|
305
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
306
|
-
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
307
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
308
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
309
|
-
model = models.DescribeModelDefinitionRequest()
|
310
|
-
model.from_json_string(json.dumps(args))
|
311
|
-
start_time = time.time()
|
312
|
-
while True:
|
313
|
-
rsp = client.DescribeModelDefinition(model)
|
314
|
-
result = rsp.to_json_string()
|
315
|
-
try:
|
316
|
-
json_obj = json.loads(result)
|
317
|
-
except TypeError as e:
|
318
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
319
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
320
|
-
break
|
321
|
-
cur_time = time.time()
|
322
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
323
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
324
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
325
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
326
|
-
else:
|
327
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
328
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
329
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
330
|
-
|
331
|
-
|
332
280
|
def doDescribeAISearchTaskAsync(args, parsed_globals):
|
333
281
|
g_param = parse_global_arg(parsed_globals)
|
334
282
|
|
@@ -1213,6 +1161,58 @@ def doGetLoRaGatewayList(args, parsed_globals):
|
|
1213
1161
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1214
1162
|
|
1215
1163
|
|
1164
|
+
def doBindCloudStorageUser(args, parsed_globals):
|
1165
|
+
g_param = parse_global_arg(parsed_globals)
|
1166
|
+
|
1167
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1168
|
+
cred = credential.CVMRoleCredential()
|
1169
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1170
|
+
cred = credential.STSAssumeRoleCredential(
|
1171
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1172
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1173
|
+
)
|
1174
|
+
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):
|
1175
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1176
|
+
else:
|
1177
|
+
cred = credential.Credential(
|
1178
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1179
|
+
)
|
1180
|
+
http_profile = HttpProfile(
|
1181
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1182
|
+
reqMethod="POST",
|
1183
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1184
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1185
|
+
)
|
1186
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1187
|
+
if g_param[OptionsDefine.Language]:
|
1188
|
+
profile.language = g_param[OptionsDefine.Language]
|
1189
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1190
|
+
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
1191
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1192
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1193
|
+
model = models.BindCloudStorageUserRequest()
|
1194
|
+
model.from_json_string(json.dumps(args))
|
1195
|
+
start_time = time.time()
|
1196
|
+
while True:
|
1197
|
+
rsp = client.BindCloudStorageUser(model)
|
1198
|
+
result = rsp.to_json_string()
|
1199
|
+
try:
|
1200
|
+
json_obj = json.loads(result)
|
1201
|
+
except TypeError as e:
|
1202
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1203
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1204
|
+
break
|
1205
|
+
cur_time = time.time()
|
1206
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1207
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1208
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1209
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1210
|
+
else:
|
1211
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1212
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1213
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1214
|
+
|
1215
|
+
|
1216
1216
|
def doReleaseStudioProduct(args, parsed_globals):
|
1217
1217
|
g_param = parse_global_arg(parsed_globals)
|
1218
1218
|
|
@@ -2773,6 +2773,58 @@ def doDescribeVideoLicense(args, parsed_globals):
|
|
2773
2773
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2774
2774
|
|
2775
2775
|
|
2776
|
+
def doGetTWeTalkProductConfigList(args, parsed_globals):
|
2777
|
+
g_param = parse_global_arg(parsed_globals)
|
2778
|
+
|
2779
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2780
|
+
cred = credential.CVMRoleCredential()
|
2781
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2782
|
+
cred = credential.STSAssumeRoleCredential(
|
2783
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2784
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2785
|
+
)
|
2786
|
+
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):
|
2787
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2788
|
+
else:
|
2789
|
+
cred = credential.Credential(
|
2790
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2791
|
+
)
|
2792
|
+
http_profile = HttpProfile(
|
2793
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2794
|
+
reqMethod="POST",
|
2795
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2796
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2797
|
+
)
|
2798
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2799
|
+
if g_param[OptionsDefine.Language]:
|
2800
|
+
profile.language = g_param[OptionsDefine.Language]
|
2801
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2802
|
+
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
2803
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2804
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2805
|
+
model = models.GetTWeTalkProductConfigListRequest()
|
2806
|
+
model.from_json_string(json.dumps(args))
|
2807
|
+
start_time = time.time()
|
2808
|
+
while True:
|
2809
|
+
rsp = client.GetTWeTalkProductConfigList(model)
|
2810
|
+
result = rsp.to_json_string()
|
2811
|
+
try:
|
2812
|
+
json_obj = json.loads(result)
|
2813
|
+
except TypeError as e:
|
2814
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2815
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2816
|
+
break
|
2817
|
+
cur_time = time.time()
|
2818
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2819
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2820
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2821
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2822
|
+
else:
|
2823
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2824
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2825
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2826
|
+
|
2827
|
+
|
2776
2828
|
def doChangeP2PRoute(args, parsed_globals):
|
2777
2829
|
g_param = parse_global_arg(parsed_globals)
|
2778
2830
|
|
@@ -2981,6 +3033,58 @@ def doInheritCloudStorageUser(args, parsed_globals):
|
|
2981
3033
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2982
3034
|
|
2983
3035
|
|
3036
|
+
def doModifyTWeTalkProductConfig(args, parsed_globals):
|
3037
|
+
g_param = parse_global_arg(parsed_globals)
|
3038
|
+
|
3039
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3040
|
+
cred = credential.CVMRoleCredential()
|
3041
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3042
|
+
cred = credential.STSAssumeRoleCredential(
|
3043
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3044
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3045
|
+
)
|
3046
|
+
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):
|
3047
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3048
|
+
else:
|
3049
|
+
cred = credential.Credential(
|
3050
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3051
|
+
)
|
3052
|
+
http_profile = HttpProfile(
|
3053
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3054
|
+
reqMethod="POST",
|
3055
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3056
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3057
|
+
)
|
3058
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3059
|
+
if g_param[OptionsDefine.Language]:
|
3060
|
+
profile.language = g_param[OptionsDefine.Language]
|
3061
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3062
|
+
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
3063
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3064
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3065
|
+
model = models.ModifyTWeTalkProductConfigRequest()
|
3066
|
+
model.from_json_string(json.dumps(args))
|
3067
|
+
start_time = time.time()
|
3068
|
+
while True:
|
3069
|
+
rsp = client.ModifyTWeTalkProductConfig(model)
|
3070
|
+
result = rsp.to_json_string()
|
3071
|
+
try:
|
3072
|
+
json_obj = json.loads(result)
|
3073
|
+
except TypeError as e:
|
3074
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3075
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3076
|
+
break
|
3077
|
+
cur_time = time.time()
|
3078
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3079
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3080
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3081
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3082
|
+
else:
|
3083
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3084
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3085
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3086
|
+
|
3087
|
+
|
2984
3088
|
def doTransferTWeCallDevice(args, parsed_globals):
|
2985
3089
|
g_param = parse_global_arg(parsed_globals)
|
2986
3090
|
|
@@ -3189,6 +3293,58 @@ def doCreateDevice(args, parsed_globals):
|
|
3189
3293
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3190
3294
|
|
3191
3295
|
|
3296
|
+
def doCreateTWeTalkProductConfig(args, parsed_globals):
|
3297
|
+
g_param = parse_global_arg(parsed_globals)
|
3298
|
+
|
3299
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3300
|
+
cred = credential.CVMRoleCredential()
|
3301
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3302
|
+
cred = credential.STSAssumeRoleCredential(
|
3303
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3304
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3305
|
+
)
|
3306
|
+
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):
|
3307
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3308
|
+
else:
|
3309
|
+
cred = credential.Credential(
|
3310
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3311
|
+
)
|
3312
|
+
http_profile = HttpProfile(
|
3313
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3314
|
+
reqMethod="POST",
|
3315
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3316
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3317
|
+
)
|
3318
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3319
|
+
if g_param[OptionsDefine.Language]:
|
3320
|
+
profile.language = g_param[OptionsDefine.Language]
|
3321
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3322
|
+
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
3323
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3324
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3325
|
+
model = models.CreateTWeTalkProductConfigRequest()
|
3326
|
+
model.from_json_string(json.dumps(args))
|
3327
|
+
start_time = time.time()
|
3328
|
+
while True:
|
3329
|
+
rsp = client.CreateTWeTalkProductConfig(model)
|
3330
|
+
result = rsp.to_json_string()
|
3331
|
+
try:
|
3332
|
+
json_obj = json.loads(result)
|
3333
|
+
except TypeError as e:
|
3334
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3335
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3336
|
+
break
|
3337
|
+
cur_time = time.time()
|
3338
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3339
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3340
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3341
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3342
|
+
else:
|
3343
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3344
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3345
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3346
|
+
|
3347
|
+
|
3192
3348
|
def doDeleteFenceBind(args, parsed_globals):
|
3193
3349
|
g_param = parse_global_arg(parsed_globals)
|
3194
3350
|
|
@@ -6309,6 +6465,58 @@ def doDescribeProject(args, parsed_globals):
|
|
6309
6465
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6310
6466
|
|
6311
6467
|
|
6468
|
+
def doDescribeTWeTalkProductConfig(args, parsed_globals):
|
6469
|
+
g_param = parse_global_arg(parsed_globals)
|
6470
|
+
|
6471
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
6472
|
+
cred = credential.CVMRoleCredential()
|
6473
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
6474
|
+
cred = credential.STSAssumeRoleCredential(
|
6475
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
6476
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
6477
|
+
)
|
6478
|
+
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):
|
6479
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
6480
|
+
else:
|
6481
|
+
cred = credential.Credential(
|
6482
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
6483
|
+
)
|
6484
|
+
http_profile = HttpProfile(
|
6485
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
6486
|
+
reqMethod="POST",
|
6487
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
6488
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
6489
|
+
)
|
6490
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
6491
|
+
if g_param[OptionsDefine.Language]:
|
6492
|
+
profile.language = g_param[OptionsDefine.Language]
|
6493
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
6494
|
+
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
6495
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
6496
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6497
|
+
model = models.DescribeTWeTalkProductConfigRequest()
|
6498
|
+
model.from_json_string(json.dumps(args))
|
6499
|
+
start_time = time.time()
|
6500
|
+
while True:
|
6501
|
+
rsp = client.DescribeTWeTalkProductConfig(model)
|
6502
|
+
result = rsp.to_json_string()
|
6503
|
+
try:
|
6504
|
+
json_obj = json.loads(result)
|
6505
|
+
except TypeError as e:
|
6506
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
6507
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
6508
|
+
break
|
6509
|
+
cur_time = time.time()
|
6510
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
6511
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
6512
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
6513
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
6514
|
+
else:
|
6515
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
6516
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
6517
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6518
|
+
|
6519
|
+
|
6312
6520
|
def doGetStudioProductList(args, parsed_globals):
|
6313
6521
|
g_param = parse_global_arg(parsed_globals)
|
6314
6522
|
|
@@ -8545,7 +8753,7 @@ def doResumeWeCallDevice(args, parsed_globals):
|
|
8545
8753
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8546
8754
|
|
8547
8755
|
|
8548
|
-
def
|
8756
|
+
def doDescribeModelDefinition(args, parsed_globals):
|
8549
8757
|
g_param = parse_global_arg(parsed_globals)
|
8550
8758
|
|
8551
8759
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -8574,11 +8782,11 @@ def doBindCloudStorageUser(args, parsed_globals):
|
|
8574
8782
|
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
8575
8783
|
client._sdkVersion += ("_CLI_" + __version__)
|
8576
8784
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
8577
|
-
model = models.
|
8785
|
+
model = models.DescribeModelDefinitionRequest()
|
8578
8786
|
model.from_json_string(json.dumps(args))
|
8579
8787
|
start_time = time.time()
|
8580
8788
|
while True:
|
8581
|
-
rsp = client.
|
8789
|
+
rsp = client.DescribeModelDefinition(model)
|
8582
8790
|
result = rsp.to_json_string()
|
8583
8791
|
try:
|
8584
8792
|
json_obj = json.loads(result)
|
@@ -8873,7 +9081,6 @@ ACTION_MAP = {
|
|
8873
9081
|
"ModifyStudioProduct": doModifyStudioProduct,
|
8874
9082
|
"DescribeDevicePackages": doDescribeDevicePackages,
|
8875
9083
|
"DescribeFirmwareUpdateStatus": doDescribeFirmwareUpdateStatus,
|
8876
|
-
"DescribeModelDefinition": doDescribeModelDefinition,
|
8877
9084
|
"DescribeAISearchTaskAsync": doDescribeAISearchTaskAsync,
|
8878
9085
|
"DescribeP2PRoute": doDescribeP2PRoute,
|
8879
9086
|
"DescribeCloudStorageEventsWithAITasks": doDescribeCloudStorageEventsWithAITasks,
|
@@ -8891,6 +9098,7 @@ ACTION_MAP = {
|
|
8891
9098
|
"ListEventHistory": doListEventHistory,
|
8892
9099
|
"DeleteDevice": doDeleteDevice,
|
8893
9100
|
"GetLoRaGatewayList": doGetLoRaGatewayList,
|
9101
|
+
"BindCloudStorageUser": doBindCloudStorageUser,
|
8894
9102
|
"ReleaseStudioProduct": doReleaseStudioProduct,
|
8895
9103
|
"DescribeCloudStorageThumbnailList": doDescribeCloudStorageThumbnailList,
|
8896
9104
|
"CreateTRTCSignaturesWithRoomId": doCreateTRTCSignaturesWithRoomId,
|
@@ -8921,14 +9129,17 @@ ACTION_MAP = {
|
|
8921
9129
|
"DescribeCloudStorageUsers": doDescribeCloudStorageUsers,
|
8922
9130
|
"TransferCloudStorage": doTransferCloudStorage,
|
8923
9131
|
"DescribeVideoLicense": doDescribeVideoLicense,
|
9132
|
+
"GetTWeTalkProductConfigList": doGetTWeTalkProductConfigList,
|
8924
9133
|
"ChangeP2PRoute": doChangeP2PRoute,
|
8925
9134
|
"SearchStudioProduct": doSearchStudioProduct,
|
8926
9135
|
"ModifyTopicRule": doModifyTopicRule,
|
8927
9136
|
"InheritCloudStorageUser": doInheritCloudStorageUser,
|
9137
|
+
"ModifyTWeTalkProductConfig": doModifyTWeTalkProductConfig,
|
8928
9138
|
"TransferTWeCallDevice": doTransferTWeCallDevice,
|
8929
9139
|
"ListFirmwares": doListFirmwares,
|
8930
9140
|
"PublishFirmwareUpdateMessage": doPublishFirmwareUpdateMessage,
|
8931
9141
|
"CreateDevice": doCreateDevice,
|
9142
|
+
"CreateTWeTalkProductConfig": doCreateTWeTalkProductConfig,
|
8932
9143
|
"DeleteFenceBind": doDeleteFenceBind,
|
8933
9144
|
"DescribeFenceEventList": doDescribeFenceEventList,
|
8934
9145
|
"DescribeFirmwareTask": doDescribeFirmwareTask,
|
@@ -8989,6 +9200,7 @@ ACTION_MAP = {
|
|
8989
9200
|
"GetFamilyDeviceUserList": doGetFamilyDeviceUserList,
|
8990
9201
|
"ModifyCloudStorageAIService": doModifyCloudStorageAIService,
|
8991
9202
|
"DescribeProject": doDescribeProject,
|
9203
|
+
"DescribeTWeTalkProductConfig": doDescribeTWeTalkProductConfig,
|
8992
9204
|
"GetStudioProductList": doGetStudioProductList,
|
8993
9205
|
"InvokeVideosKeywordsAnalyzer": doInvokeVideosKeywordsAnalyzer,
|
8994
9206
|
"DescribeTWeSeeRecognitionTask": doDescribeTWeSeeRecognitionTask,
|
@@ -9032,7 +9244,7 @@ ACTION_MAP = {
|
|
9032
9244
|
"ModifyModelDefinition": doModifyModelDefinition,
|
9033
9245
|
"UnbindDevices": doUnbindDevices,
|
9034
9246
|
"ResumeWeCallDevice": doResumeWeCallDevice,
|
9035
|
-
"
|
9247
|
+
"DescribeModelDefinition": doDescribeModelDefinition,
|
9036
9248
|
"DescribeTWeSeeConfig": doDescribeTWeSeeConfig,
|
9037
9249
|
"CreatePositionSpace": doCreatePositionSpace,
|
9038
9250
|
"DescribeDeviceFirmWare": doDescribeDeviceFirmWare,
|