tccli 3.0.1248.1__py2.py3-none-any.whl → 3.0.1250.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/aiart/aiart_client.py +113 -7
- tccli/services/aiart/v20221229/api.json +191 -0
- tccli/services/aiart/v20221229/examples.json +16 -0
- tccli/services/batch/v20170312/api.json +1 -1
- tccli/services/cbs/v20170312/api.json +6 -0
- tccli/services/cdb/v20170320/api.json +9 -0
- tccli/services/cfw/v20190904/api.json +5 -3
- tccli/services/cmq/cmq_client.py +4 -799
- tccli/services/cmq/v20190304/api.json +135 -1329
- tccli/services/cmq/v20190304/examples.json +0 -120
- tccli/services/config/config_client.py +110 -4
- tccli/services/config/v20220802/api.json +374 -0
- tccli/services/config/v20220802/examples.json +16 -0
- tccli/services/cvm/v20170312/api.json +1 -1
- tccli/services/dc/v20180410/api.json +50 -48
- tccli/services/dc/v20180410/examples.json +8 -8
- tccli/services/ecm/v20190719/api.json +64 -62
- tccli/services/ecm/v20190719/examples.json +5 -5
- tccli/services/es/v20180416/api.json +10 -0
- tccli/services/ess/v20201111/api.json +163 -163
- tccli/services/ess/v20201111/examples.json +15 -21
- tccli/services/essbasic/v20210526/api.json +89 -89
- tccli/services/essbasic/v20210526/examples.json +2 -2
- tccli/services/hai/hai_client.py +60 -7
- tccli/services/hai/v20230812/api.json +195 -0
- tccli/services/hai/v20230812/examples.json +8 -0
- tccli/services/iotexplorer/iotexplorer_client.py +228 -16
- tccli/services/iotexplorer/v20190423/api.json +536 -0
- tccli/services/iotexplorer/v20190423/examples.json +32 -0
- tccli/services/iotvideo/iotvideo_client.py +53 -0
- tccli/services/iotvideo/v20211125/api.json +80 -0
- tccli/services/iotvideo/v20211125/examples.json +8 -0
- tccli/services/lkeap/v20240522/api.json +13 -13
- tccli/services/lkeap/v20240522/examples.json +2 -2
- tccli/services/mna/v20210119/api.json +24 -24
- tccli/services/mna/v20210119/examples.json +2 -2
- tccli/services/redis/v20180412/api.json +181 -181
- tccli/services/redis/v20180412/examples.json +1 -1
- tccli/services/sms/v20190711/api.json +48 -0
- tccli/services/sms/v20210111/api.json +48 -0
- tccli/services/tcb/v20180608/api.json +173 -145
- tccli/services/tcb/v20180608/examples.json +8 -8
- tccli/services/tcr/v20190924/api.json +5 -5
- tccli/services/tke/v20220501/api.json +1 -1
- tccli/services/trro/v20220325/api.json +71 -61
- tccli/services/trro/v20220325/examples.json +1 -1
- tccli/services/trtc/v20190722/api.json +114 -114
- tccli/services/tse/v20201207/api.json +18 -0
- tccli/services/vpc/v20170312/api.json +35 -33
- tccli/services/vpc/v20170312/examples.json +18 -18
- tccli/services/wedata/v20210820/api.json +80 -2
- tccli/services/wedata/v20210820/examples.json +1 -1
- {tccli-3.0.1248.1.dist-info → tccli-3.0.1250.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1248.1.dist-info → tccli-3.0.1250.1.dist-info}/RECORD +58 -58
- {tccli-3.0.1248.1.dist-info → tccli-3.0.1250.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1248.1.dist-info → tccli-3.0.1250.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1248.1.dist-info → tccli-3.0.1250.1.dist-info}/license_files/LICENSE +0 -0
@@ -433,7 +433,7 @@ def doCreateCloudStorageAIService(args, parsed_globals):
|
|
433
433
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
434
434
|
|
435
435
|
|
436
|
-
def
|
436
|
+
def doGetProjectList(args, parsed_globals):
|
437
437
|
g_param = parse_global_arg(parsed_globals)
|
438
438
|
|
439
439
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -462,11 +462,11 @@ def doInvokeCloudStorageAIServiceTask(args, parsed_globals):
|
|
462
462
|
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
463
463
|
client._sdkVersion += ("_CLI_" + __version__)
|
464
464
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
465
|
-
model = models.
|
465
|
+
model = models.GetProjectListRequest()
|
466
466
|
model.from_json_string(json.dumps(args))
|
467
467
|
start_time = time.time()
|
468
468
|
while True:
|
469
|
-
rsp = client.
|
469
|
+
rsp = client.GetProjectList(model)
|
470
470
|
result = rsp.to_json_string()
|
471
471
|
try:
|
472
472
|
json_obj = json.loads(result)
|
@@ -901,7 +901,7 @@ def doListEventHistory(args, parsed_globals):
|
|
901
901
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
902
902
|
|
903
903
|
|
904
|
-
def
|
904
|
+
def doDeleteDevice(args, parsed_globals):
|
905
905
|
g_param = parse_global_arg(parsed_globals)
|
906
906
|
|
907
907
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -930,11 +930,11 @@ def doDescribeStudioProduct(args, parsed_globals):
|
|
930
930
|
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
931
931
|
client._sdkVersion += ("_CLI_" + __version__)
|
932
932
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
933
|
-
model = models.
|
933
|
+
model = models.DeleteDeviceRequest()
|
934
934
|
model.from_json_string(json.dumps(args))
|
935
935
|
start_time = time.time()
|
936
936
|
while True:
|
937
|
-
rsp = client.
|
937
|
+
rsp = client.DeleteDevice(model)
|
938
938
|
result = rsp.to_json_string()
|
939
939
|
try:
|
940
940
|
json_obj = json.loads(result)
|
@@ -1421,6 +1421,58 @@ def doDeletePositionSpace(args, parsed_globals):
|
|
1421
1421
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1422
1422
|
|
1423
1423
|
|
1424
|
+
def doDescribeActivateDevice(args, parsed_globals):
|
1425
|
+
g_param = parse_global_arg(parsed_globals)
|
1426
|
+
|
1427
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1428
|
+
cred = credential.CVMRoleCredential()
|
1429
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1430
|
+
cred = credential.STSAssumeRoleCredential(
|
1431
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1432
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1433
|
+
)
|
1434
|
+
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):
|
1435
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1436
|
+
else:
|
1437
|
+
cred = credential.Credential(
|
1438
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1439
|
+
)
|
1440
|
+
http_profile = HttpProfile(
|
1441
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1442
|
+
reqMethod="POST",
|
1443
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1444
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1445
|
+
)
|
1446
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1447
|
+
if g_param[OptionsDefine.Language]:
|
1448
|
+
profile.language = g_param[OptionsDefine.Language]
|
1449
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1450
|
+
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
1451
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1452
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1453
|
+
model = models.DescribeActivateDeviceRequest()
|
1454
|
+
model.from_json_string(json.dumps(args))
|
1455
|
+
start_time = time.time()
|
1456
|
+
while True:
|
1457
|
+
rsp = client.DescribeActivateDevice(model)
|
1458
|
+
result = rsp.to_json_string()
|
1459
|
+
try:
|
1460
|
+
json_obj = json.loads(result)
|
1461
|
+
except TypeError as e:
|
1462
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1463
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1464
|
+
break
|
1465
|
+
cur_time = time.time()
|
1466
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1467
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1468
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1469
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1470
|
+
else:
|
1471
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1472
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1473
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1474
|
+
|
1475
|
+
|
1424
1476
|
def doDescribeBindedProducts(args, parsed_globals):
|
1425
1477
|
g_param = parse_global_arg(parsed_globals)
|
1426
1478
|
|
@@ -1993,6 +2045,58 @@ def doDescribeCloudStorageDate(args, parsed_globals):
|
|
1993
2045
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1994
2046
|
|
1995
2047
|
|
2048
|
+
def doDescribeFreeCloudStorageNum(args, parsed_globals):
|
2049
|
+
g_param = parse_global_arg(parsed_globals)
|
2050
|
+
|
2051
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2052
|
+
cred = credential.CVMRoleCredential()
|
2053
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2054
|
+
cred = credential.STSAssumeRoleCredential(
|
2055
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2056
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2057
|
+
)
|
2058
|
+
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):
|
2059
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2060
|
+
else:
|
2061
|
+
cred = credential.Credential(
|
2062
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2063
|
+
)
|
2064
|
+
http_profile = HttpProfile(
|
2065
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2066
|
+
reqMethod="POST",
|
2067
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2068
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2069
|
+
)
|
2070
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2071
|
+
if g_param[OptionsDefine.Language]:
|
2072
|
+
profile.language = g_param[OptionsDefine.Language]
|
2073
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2074
|
+
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
2075
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2076
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2077
|
+
model = models.DescribeFreeCloudStorageNumRequest()
|
2078
|
+
model.from_json_string(json.dumps(args))
|
2079
|
+
start_time = time.time()
|
2080
|
+
while True:
|
2081
|
+
rsp = client.DescribeFreeCloudStorageNum(model)
|
2082
|
+
result = rsp.to_json_string()
|
2083
|
+
try:
|
2084
|
+
json_obj = json.loads(result)
|
2085
|
+
except TypeError as e:
|
2086
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2087
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2088
|
+
break
|
2089
|
+
cur_time = time.time()
|
2090
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2091
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2092
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2093
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2094
|
+
else:
|
2095
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2096
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2097
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2098
|
+
|
2099
|
+
|
1996
2100
|
def doEnableTopicRule(args, parsed_globals):
|
1997
2101
|
g_param = parse_global_arg(parsed_globals)
|
1998
2102
|
|
@@ -2201,6 +2305,58 @@ def doTransferCloudStorage(args, parsed_globals):
|
|
2201
2305
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2202
2306
|
|
2203
2307
|
|
2308
|
+
def doDescribeVideoLicense(args, parsed_globals):
|
2309
|
+
g_param = parse_global_arg(parsed_globals)
|
2310
|
+
|
2311
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2312
|
+
cred = credential.CVMRoleCredential()
|
2313
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2314
|
+
cred = credential.STSAssumeRoleCredential(
|
2315
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2316
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2317
|
+
)
|
2318
|
+
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):
|
2319
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2320
|
+
else:
|
2321
|
+
cred = credential.Credential(
|
2322
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2323
|
+
)
|
2324
|
+
http_profile = HttpProfile(
|
2325
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2326
|
+
reqMethod="POST",
|
2327
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2328
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2329
|
+
)
|
2330
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2331
|
+
if g_param[OptionsDefine.Language]:
|
2332
|
+
profile.language = g_param[OptionsDefine.Language]
|
2333
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2334
|
+
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
2335
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2336
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2337
|
+
model = models.DescribeVideoLicenseRequest()
|
2338
|
+
model.from_json_string(json.dumps(args))
|
2339
|
+
start_time = time.time()
|
2340
|
+
while True:
|
2341
|
+
rsp = client.DescribeVideoLicense(model)
|
2342
|
+
result = rsp.to_json_string()
|
2343
|
+
try:
|
2344
|
+
json_obj = json.loads(result)
|
2345
|
+
except TypeError as e:
|
2346
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2347
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2348
|
+
break
|
2349
|
+
cur_time = time.time()
|
2350
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2351
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2352
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2353
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2354
|
+
else:
|
2355
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2356
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2357
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2358
|
+
|
2359
|
+
|
2204
2360
|
def doSearchStudioProduct(args, parsed_globals):
|
2205
2361
|
g_param = parse_global_arg(parsed_globals)
|
2206
2362
|
|
@@ -4385,7 +4541,7 @@ def doUploadFirmware(args, parsed_globals):
|
|
4385
4541
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4386
4542
|
|
4387
4543
|
|
4388
|
-
def
|
4544
|
+
def doInvokeCloudStorageAIServiceTask(args, parsed_globals):
|
4389
4545
|
g_param = parse_global_arg(parsed_globals)
|
4390
4546
|
|
4391
4547
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4414,11 +4570,63 @@ def doGetProjectList(args, parsed_globals):
|
|
4414
4570
|
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
4415
4571
|
client._sdkVersion += ("_CLI_" + __version__)
|
4416
4572
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4417
|
-
model = models.
|
4573
|
+
model = models.InvokeCloudStorageAIServiceTaskRequest()
|
4418
4574
|
model.from_json_string(json.dumps(args))
|
4419
4575
|
start_time = time.time()
|
4420
4576
|
while True:
|
4421
|
-
rsp = client.
|
4577
|
+
rsp = client.InvokeCloudStorageAIServiceTask(model)
|
4578
|
+
result = rsp.to_json_string()
|
4579
|
+
try:
|
4580
|
+
json_obj = json.loads(result)
|
4581
|
+
except TypeError as e:
|
4582
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4583
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4584
|
+
break
|
4585
|
+
cur_time = time.time()
|
4586
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4587
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4588
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4589
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4590
|
+
else:
|
4591
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4592
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4593
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4594
|
+
|
4595
|
+
|
4596
|
+
def doDescribeActivateLicenseService(args, parsed_globals):
|
4597
|
+
g_param = parse_global_arg(parsed_globals)
|
4598
|
+
|
4599
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4600
|
+
cred = credential.CVMRoleCredential()
|
4601
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4602
|
+
cred = credential.STSAssumeRoleCredential(
|
4603
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4604
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4605
|
+
)
|
4606
|
+
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):
|
4607
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4608
|
+
else:
|
4609
|
+
cred = credential.Credential(
|
4610
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4611
|
+
)
|
4612
|
+
http_profile = HttpProfile(
|
4613
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4614
|
+
reqMethod="POST",
|
4615
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4616
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4617
|
+
)
|
4618
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4619
|
+
if g_param[OptionsDefine.Language]:
|
4620
|
+
profile.language = g_param[OptionsDefine.Language]
|
4621
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4622
|
+
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
4623
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4624
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4625
|
+
model = models.DescribeActivateLicenseServiceRequest()
|
4626
|
+
model.from_json_string(json.dumps(args))
|
4627
|
+
start_time = time.time()
|
4628
|
+
while True:
|
4629
|
+
rsp = client.DescribeActivateLicenseService(model)
|
4422
4630
|
result = rsp.to_json_string()
|
4423
4631
|
try:
|
4424
4632
|
json_obj = json.loads(result)
|
@@ -6517,7 +6725,7 @@ def doModifyPositionFence(args, parsed_globals):
|
|
6517
6725
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6518
6726
|
|
6519
6727
|
|
6520
|
-
def
|
6728
|
+
def doDescribeStudioProduct(args, parsed_globals):
|
6521
6729
|
g_param = parse_global_arg(parsed_globals)
|
6522
6730
|
|
6523
6731
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -6546,11 +6754,11 @@ def doDeleteDevice(args, parsed_globals):
|
|
6546
6754
|
client = mod.IotexplorerClient(cred, g_param[OptionsDefine.Region], profile)
|
6547
6755
|
client._sdkVersion += ("_CLI_" + __version__)
|
6548
6756
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
6549
|
-
model = models.
|
6757
|
+
model = models.DescribeStudioProductRequest()
|
6550
6758
|
model.from_json_string(json.dumps(args))
|
6551
6759
|
start_time = time.time()
|
6552
6760
|
while True:
|
6553
|
-
rsp = client.
|
6761
|
+
rsp = client.DescribeStudioProduct(model)
|
6554
6762
|
result = rsp.to_json_string()
|
6555
6763
|
try:
|
6556
6764
|
json_obj = json.loads(result)
|
@@ -7992,7 +8200,7 @@ ACTION_MAP = {
|
|
7992
8200
|
"DescribeDevice": doDescribeDevice,
|
7993
8201
|
"DescribeTopicPolicy": doDescribeTopicPolicy,
|
7994
8202
|
"CreateCloudStorageAIService": doCreateCloudStorageAIService,
|
7995
|
-
"
|
8203
|
+
"GetProjectList": doGetProjectList,
|
7996
8204
|
"CallDeviceActionSync": doCallDeviceActionSync,
|
7997
8205
|
"DescribeGatewayBindDevices": doDescribeGatewayBindDevices,
|
7998
8206
|
"DeleteStudioProduct": doDeleteStudioProduct,
|
@@ -8001,7 +8209,7 @@ ACTION_MAP = {
|
|
8001
8209
|
"DescribeDeviceBindGateway": doDescribeDeviceBindGateway,
|
8002
8210
|
"GetDeviceLocationHistory": doGetDeviceLocationHistory,
|
8003
8211
|
"ListEventHistory": doListEventHistory,
|
8004
|
-
"
|
8212
|
+
"DeleteDevice": doDeleteDevice,
|
8005
8213
|
"GetLoRaGatewayList": doGetLoRaGatewayList,
|
8006
8214
|
"ReleaseStudioProduct": doReleaseStudioProduct,
|
8007
8215
|
"DescribeCloudStorageThumbnailList": doDescribeCloudStorageThumbnailList,
|
@@ -8011,6 +8219,7 @@ ACTION_MAP = {
|
|
8011
8219
|
"DescribePackageConsumeTasks": doDescribePackageConsumeTasks,
|
8012
8220
|
"DescribeCloudStoragePackageConsumeStats": doDescribeCloudStoragePackageConsumeStats,
|
8013
8221
|
"DeletePositionSpace": doDeletePositionSpace,
|
8222
|
+
"DescribeActivateDevice": doDescribeActivateDevice,
|
8014
8223
|
"DescribeBindedProducts": doDescribeBindedProducts,
|
8015
8224
|
"ModifyLoRaGateway": doModifyLoRaGateway,
|
8016
8225
|
"ControlDeviceData": doControlDeviceData,
|
@@ -8022,10 +8231,12 @@ ACTION_MAP = {
|
|
8022
8231
|
"CancelAssignTWeCallLicense": doCancelAssignTWeCallLicense,
|
8023
8232
|
"CreateStudioProduct": doCreateStudioProduct,
|
8024
8233
|
"DescribeCloudStorageDate": doDescribeCloudStorageDate,
|
8234
|
+
"DescribeFreeCloudStorageNum": doDescribeFreeCloudStorageNum,
|
8025
8235
|
"EnableTopicRule": doEnableTopicRule,
|
8026
8236
|
"DescribeGatewaySubDeviceList": doDescribeGatewaySubDeviceList,
|
8027
8237
|
"DescribeCloudStorageUsers": doDescribeCloudStorageUsers,
|
8028
8238
|
"TransferCloudStorage": doTransferCloudStorage,
|
8239
|
+
"DescribeVideoLicense": doDescribeVideoLicense,
|
8029
8240
|
"SearchStudioProduct": doSearchStudioProduct,
|
8030
8241
|
"ModifyTopicRule": doModifyTopicRule,
|
8031
8242
|
"InheritCloudStorageUser": doInheritCloudStorageUser,
|
@@ -8068,7 +8279,8 @@ ACTION_MAP = {
|
|
8068
8279
|
"PublishRRPCMessage": doPublishRRPCMessage,
|
8069
8280
|
"DescribeCloudStorage": doDescribeCloudStorage,
|
8070
8281
|
"UploadFirmware": doUploadFirmware,
|
8071
|
-
"
|
8282
|
+
"InvokeCloudStorageAIServiceTask": doInvokeCloudStorageAIServiceTask,
|
8283
|
+
"DescribeActivateLicenseService": doDescribeActivateLicenseService,
|
8072
8284
|
"CreateFreeCloudStorage": doCreateFreeCloudStorage,
|
8073
8285
|
"GetTWeCallPkgList": doGetTWeCallPkgList,
|
8074
8286
|
"UpdateDevicesEnableState": doUpdateDevicesEnableState,
|
@@ -8109,7 +8321,7 @@ ACTION_MAP = {
|
|
8109
8321
|
"PublishMessage": doPublishMessage,
|
8110
8322
|
"DescribeDeviceDataHistory": doDescribeDeviceDataHistory,
|
8111
8323
|
"ModifyPositionFence": doModifyPositionFence,
|
8112
|
-
"
|
8324
|
+
"DescribeStudioProduct": doDescribeStudioProduct,
|
8113
8325
|
"DescribePositionFenceList": doDescribePositionFenceList,
|
8114
8326
|
"DeleteLoRaFrequency": doDeleteLoRaFrequency,
|
8115
8327
|
"DescribePackageConsumeTask": doDescribePackageConsumeTask,
|