tccli 3.0.1303.1__py2.py3-none-any.whl → 3.0.1306.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/v20221229/api.json +39 -39
- tccli/services/aiart/v20221229/examples.json +11 -11
- tccli/services/ams/v20201229/api.json +28 -34
- tccli/services/ams/v20201229/examples.json +2 -8
- tccli/services/autoscaling/v20180419/api.json +57 -57
- tccli/services/autoscaling/v20180419/examples.json +6 -6
- tccli/services/bi/v20220105/api.json +9 -0
- tccli/services/bi/v20220105/examples.json +1 -1
- tccli/services/cbs/v20170312/api.json +49 -38
- tccli/services/ccc/v20200210/api.json +10 -0
- tccli/services/cdb/v20170320/api.json +9 -9
- tccli/services/cdb/v20170320/examples.json +2 -2
- tccli/services/cdn/v20180606/api.json +61 -58
- tccli/services/cdn/v20180606/examples.json +8 -8
- tccli/services/cfs/v20190719/api.json +12 -2
- tccli/services/cfs/v20190719/examples.json +2 -2
- tccli/services/cfw/cfw_client.py +53 -0
- tccli/services/cfw/v20190904/api.json +539 -0
- tccli/services/cfw/v20190904/examples.json +8 -0
- tccli/services/chc/v20230418/api.json +10 -0
- tccli/services/ckafka/ckafka_client.py +53 -0
- tccli/services/ckafka/v20190819/api.json +242 -8
- tccli/services/ckafka/v20190819/examples.json +8 -0
- tccli/services/clb/v20180317/api.json +8 -8
- tccli/services/cvm/v20170312/api.json +129 -20
- tccli/services/cvm/v20170312/examples.json +1 -1
- tccli/services/cynosdb/v20190107/api.json +9 -9
- tccli/services/dbbrain/v20191016/api.json +11 -10
- tccli/services/dbbrain/v20191016/examples.json +1 -1
- tccli/services/dbbrain/v20210527/api.json +1 -1
- tccli/services/dc/v20180410/api.json +16 -6
- tccli/services/dc/v20180410/examples.json +4 -4
- tccli/services/domain/v20180808/api.json +162 -162
- tccli/services/domain/v20180808/examples.json +34 -34
- tccli/services/drm/v20181115/api.json +52 -65
- tccli/services/drm/v20181115/examples.json +1 -1
- tccli/services/dsgc/v20190723/api.json +10 -0
- tccli/services/dts/v20211206/api.json +0 -9
- tccli/services/dts/v20211206/examples.json +1 -1
- tccli/services/ecdn/v20191012/api.json +12 -12
- tccli/services/emr/v20190103/api.json +10 -0
- tccli/services/gs/gs_client.py +53 -0
- tccli/services/gs/v20191118/api.json +75 -3
- tccli/services/gs/v20191118/examples.json +15 -7
- tccli/services/gwlb/v20240906/api.json +28 -28
- tccli/services/hai/hai_client.py +53 -0
- tccli/services/hai/v20230812/api.json +62 -0
- tccli/services/hai/v20230812/examples.json +8 -0
- tccli/services/hunyuan/v20230901/api.json +4 -4
- tccli/services/ims/v20201229/api.json +14 -5
- tccli/services/ims/v20201229/examples.json +2 -2
- tccli/services/ioa/v20220601/api.json +13 -2
- tccli/services/iotexplorer/v20190423/api.json +62 -3
- tccli/services/iotexplorer/v20190423/examples.json +1 -1
- tccli/services/iotvideoindustry/v20201201/api.json +29 -19
- tccli/services/iotvideoindustry/v20201201/examples.json +2 -2
- tccli/services/iss/iss_client.py +273 -8
- tccli/services/iss/v20230517/api.json +586 -0
- tccli/services/iss/v20230517/examples.json +46 -0
- tccli/services/lcic/v20220817/api.json +1 -1
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/live/v20180801/api.json +18 -18
- tccli/services/lke/v20231130/api.json +50 -6
- tccli/services/lkeap/v20240522/api.json +124 -1
- tccli/services/monitor/v20180724/api.json +1 -1
- tccli/services/mps/v20190612/api.json +283 -290
- tccli/services/mps/v20190612/examples.json +9 -9
- tccli/services/ocr/v20181119/api.json +133 -114
- tccli/services/ocr/v20181119/examples.json +1 -1
- tccli/services/postgres/v20170312/api.json +140 -121
- tccli/services/postgres/v20170312/examples.json +1 -1
- tccli/services/redis/v20180412/api.json +94 -4
- tccli/services/redis/v20180412/examples.json +3 -3
- tccli/services/ses/v20201002/api.json +9 -0
- tccli/services/soe/v20180724/api.json +13 -13
- tccli/services/soe/v20180724/examples.json +2 -2
- tccli/services/tat/v20201028/api.json +19 -19
- tccli/services/tcss/v20201101/api.json +27 -0
- tccli/services/teo/v20220901/api.json +14 -3
- tccli/services/tione/tione_client.py +53 -0
- tccli/services/tione/v20211111/api.json +49 -1
- tccli/services/tione/v20211111/examples.json +8 -0
- tccli/services/trtc/v20190722/api.json +5 -5
- tccli/services/tse/v20201207/api.json +30 -0
- tccli/services/tts/v20190823/api.json +1 -1
- tccli/services/vm/v20210922/api.json +21 -30
- tccli/services/vm/v20210922/examples.json +2 -2
- tccli/services/vod/v20180717/api.json +6 -6
- tccli/services/vod/v20180717/examples.json +1 -1
- tccli/services/vpc/v20170312/api.json +103 -81
- tccli/services/vpc/v20170312/examples.json +3 -3
- tccli/services/vrs/v20200824/api.json +52 -52
- tccli/services/vrs/v20200824/examples.json +2 -2
- tccli/services/wedata/v20210820/api.json +192 -11
- tccli/services/wedata/v20210820/examples.json +8 -0
- tccli/services/wedata/wedata_client.py +53 -0
- {tccli-3.0.1303.1.dist-info → tccli-3.0.1306.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1303.1.dist-info → tccli-3.0.1306.1.dist-info}/RECORD +102 -102
- {tccli-3.0.1303.1.dist-info → tccli-3.0.1306.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1303.1.dist-info → tccli-3.0.1306.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1303.1.dist-info → tccli-3.0.1306.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/iss/iss_client.py
CHANGED
@@ -797,7 +797,7 @@ def doListTasks(args, parsed_globals):
|
|
797
797
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
798
798
|
|
799
799
|
|
800
|
-
def
|
800
|
+
def doAddStreamAuth(args, parsed_globals):
|
801
801
|
g_param = parse_global_arg(parsed_globals)
|
802
802
|
|
803
803
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -826,11 +826,11 @@ def doUpdateRecordTemplate(args, parsed_globals):
|
|
826
826
|
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
827
827
|
client._sdkVersion += ("_CLI_" + __version__)
|
828
828
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
829
|
-
model = models.
|
829
|
+
model = models.AddStreamAuthRequest()
|
830
830
|
model.from_json_string(json.dumps(args))
|
831
831
|
start_time = time.time()
|
832
832
|
while True:
|
833
|
-
rsp = client.
|
833
|
+
rsp = client.AddStreamAuth(model)
|
834
834
|
result = rsp.to_json_string()
|
835
835
|
try:
|
836
836
|
json_obj = json.loads(result)
|
@@ -953,7 +953,7 @@ def doPlayRecord(args, parsed_globals):
|
|
953
953
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
954
954
|
|
955
955
|
|
956
|
-
def
|
956
|
+
def doUpdateRecordTemplate(args, parsed_globals):
|
957
957
|
g_param = parse_global_arg(parsed_globals)
|
958
958
|
|
959
959
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -982,11 +982,11 @@ def doAddStreamAuth(args, parsed_globals):
|
|
982
982
|
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
983
983
|
client._sdkVersion += ("_CLI_" + __version__)
|
984
984
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
985
|
-
model = models.
|
985
|
+
model = models.UpdateRecordTemplateRequest()
|
986
986
|
model.from_json_string(json.dumps(args))
|
987
987
|
start_time = time.time()
|
988
988
|
while True:
|
989
|
-
rsp = client.
|
989
|
+
rsp = client.UpdateRecordTemplate(model)
|
990
990
|
result = rsp.to_json_string()
|
991
991
|
try:
|
992
992
|
json_obj = json.loads(result)
|
@@ -1421,6 +1421,58 @@ def doDescribeVideoBitRate(args, parsed_globals):
|
|
1421
1421
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1422
1422
|
|
1423
1423
|
|
1424
|
+
def doCreateVideoDownloadTask(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.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
1451
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1452
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1453
|
+
model = models.CreateVideoDownloadTaskRequest()
|
1454
|
+
model.from_json_string(json.dumps(args))
|
1455
|
+
start_time = time.time()
|
1456
|
+
while True:
|
1457
|
+
rsp = client.CreateVideoDownloadTask(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 doDescribeRecordBackupPlan(args, parsed_globals):
|
1425
1477
|
g_param = parse_global_arg(parsed_globals)
|
1426
1478
|
|
@@ -2721,6 +2773,58 @@ def doDescribeDevicePreset(args, parsed_globals):
|
|
2721
2773
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2722
2774
|
|
2723
2775
|
|
2776
|
+
def doBatchDeleteVideoDownloadTask(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.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
2803
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2804
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2805
|
+
model = models.BatchDeleteVideoDownloadTaskRequest()
|
2806
|
+
model.from_json_string(json.dumps(args))
|
2807
|
+
start_time = time.time()
|
2808
|
+
while True:
|
2809
|
+
rsp = client.BatchDeleteVideoDownloadTask(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
|
+
|
2724
2828
|
def doDescribeRecordFile(args, parsed_globals):
|
2725
2829
|
g_param = parse_global_arg(parsed_globals)
|
2726
2830
|
|
@@ -2877,6 +2981,58 @@ def doDescribeAITaskResult(args, parsed_globals):
|
|
2877
2981
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2878
2982
|
|
2879
2983
|
|
2984
|
+
def doDescribeGBDeviceAddr(args, parsed_globals):
|
2985
|
+
g_param = parse_global_arg(parsed_globals)
|
2986
|
+
|
2987
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2988
|
+
cred = credential.CVMRoleCredential()
|
2989
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2990
|
+
cred = credential.STSAssumeRoleCredential(
|
2991
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2992
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2993
|
+
)
|
2994
|
+
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):
|
2995
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2996
|
+
else:
|
2997
|
+
cred = credential.Credential(
|
2998
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2999
|
+
)
|
3000
|
+
http_profile = HttpProfile(
|
3001
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3002
|
+
reqMethod="POST",
|
3003
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3004
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3005
|
+
)
|
3006
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3007
|
+
if g_param[OptionsDefine.Language]:
|
3008
|
+
profile.language = g_param[OptionsDefine.Language]
|
3009
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3010
|
+
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
3011
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3012
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3013
|
+
model = models.DescribeGBDeviceAddrRequest()
|
3014
|
+
model.from_json_string(json.dumps(args))
|
3015
|
+
start_time = time.time()
|
3016
|
+
while True:
|
3017
|
+
rsp = client.DescribeGBDeviceAddr(model)
|
3018
|
+
result = rsp.to_json_string()
|
3019
|
+
try:
|
3020
|
+
json_obj = json.loads(result)
|
3021
|
+
except TypeError as e:
|
3022
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3023
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3024
|
+
break
|
3025
|
+
cur_time = time.time()
|
3026
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3027
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3028
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3029
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3030
|
+
else:
|
3031
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3032
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3033
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3034
|
+
|
3035
|
+
|
2880
3036
|
def doListRecordPlanChannels(args, parsed_globals):
|
2881
3037
|
g_param = parse_global_arg(parsed_globals)
|
2882
3038
|
|
@@ -2981,6 +3137,58 @@ def doAddUserDevice(args, parsed_globals):
|
|
2981
3137
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2982
3138
|
|
2983
3139
|
|
3140
|
+
def doDeleteTask(args, parsed_globals):
|
3141
|
+
g_param = parse_global_arg(parsed_globals)
|
3142
|
+
|
3143
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3144
|
+
cred = credential.CVMRoleCredential()
|
3145
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3146
|
+
cred = credential.STSAssumeRoleCredential(
|
3147
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3148
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3149
|
+
)
|
3150
|
+
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):
|
3151
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3152
|
+
else:
|
3153
|
+
cred = credential.Credential(
|
3154
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3155
|
+
)
|
3156
|
+
http_profile = HttpProfile(
|
3157
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3158
|
+
reqMethod="POST",
|
3159
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3160
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3161
|
+
)
|
3162
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3163
|
+
if g_param[OptionsDefine.Language]:
|
3164
|
+
profile.language = g_param[OptionsDefine.Language]
|
3165
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3166
|
+
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
3167
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3168
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3169
|
+
model = models.DeleteTaskRequest()
|
3170
|
+
model.from_json_string(json.dumps(args))
|
3171
|
+
start_time = time.time()
|
3172
|
+
while True:
|
3173
|
+
rsp = client.DeleteTask(model)
|
3174
|
+
result = rsp.to_json_string()
|
3175
|
+
try:
|
3176
|
+
json_obj = json.loads(result)
|
3177
|
+
except TypeError as e:
|
3178
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3179
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3180
|
+
break
|
3181
|
+
cur_time = time.time()
|
3182
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3183
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3184
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3185
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3186
|
+
else:
|
3187
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3188
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3189
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3190
|
+
|
3191
|
+
|
2984
3192
|
def doDeleteOrganization(args, parsed_globals):
|
2985
3193
|
g_param = parse_global_arg(parsed_globals)
|
2986
3194
|
|
@@ -3605,6 +3813,58 @@ def doDeleteUserDevice(args, parsed_globals):
|
|
3605
3813
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3606
3814
|
|
3607
3815
|
|
3816
|
+
def doListVideoDownloadTask(args, parsed_globals):
|
3817
|
+
g_param = parse_global_arg(parsed_globals)
|
3818
|
+
|
3819
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3820
|
+
cred = credential.CVMRoleCredential()
|
3821
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3822
|
+
cred = credential.STSAssumeRoleCredential(
|
3823
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3824
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3825
|
+
)
|
3826
|
+
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):
|
3827
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3828
|
+
else:
|
3829
|
+
cred = credential.Credential(
|
3830
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3831
|
+
)
|
3832
|
+
http_profile = HttpProfile(
|
3833
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3834
|
+
reqMethod="POST",
|
3835
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3836
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3837
|
+
)
|
3838
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3839
|
+
if g_param[OptionsDefine.Language]:
|
3840
|
+
profile.language = g_param[OptionsDefine.Language]
|
3841
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3842
|
+
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
3843
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3844
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3845
|
+
model = models.ListVideoDownloadTaskRequest()
|
3846
|
+
model.from_json_string(json.dumps(args))
|
3847
|
+
start_time = time.time()
|
3848
|
+
while True:
|
3849
|
+
rsp = client.ListVideoDownloadTask(model)
|
3850
|
+
result = rsp.to_json_string()
|
3851
|
+
try:
|
3852
|
+
json_obj = json.loads(result)
|
3853
|
+
except TypeError as e:
|
3854
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3855
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3856
|
+
break
|
3857
|
+
cur_time = time.time()
|
3858
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3859
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3860
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3861
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3862
|
+
else:
|
3863
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3864
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3865
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3866
|
+
|
3867
|
+
|
3608
3868
|
def doDescribeGatewayVersion(args, parsed_globals):
|
3609
3869
|
g_param = parse_global_arg(parsed_globals)
|
3610
3870
|
|
@@ -4515,10 +4775,10 @@ ACTION_MAP = {
|
|
4515
4775
|
"ControlDevicePTZ": doControlDevicePTZ,
|
4516
4776
|
"ListRecordBackupPlanDevices": doListRecordBackupPlanDevices,
|
4517
4777
|
"ListTasks": doListTasks,
|
4518
|
-
"
|
4778
|
+
"AddStreamAuth": doAddStreamAuth,
|
4519
4779
|
"DeleteRecordBackupPlan": doDeleteRecordBackupPlan,
|
4520
4780
|
"PlayRecord": doPlayRecord,
|
4521
|
-
"
|
4781
|
+
"UpdateRecordTemplate": doUpdateRecordTemplate,
|
4522
4782
|
"DeleteRecordTemplate": doDeleteRecordTemplate,
|
4523
4783
|
"UpdateDeviceStatus": doUpdateDeviceStatus,
|
4524
4784
|
"UpdateGateway": doUpdateGateway,
|
@@ -4527,6 +4787,7 @@ ACTION_MAP = {
|
|
4527
4787
|
"ListRecordBackupTemplates": doListRecordBackupTemplates,
|
4528
4788
|
"DescribeRecordBackupTemplate": doDescribeRecordBackupTemplate,
|
4529
4789
|
"DescribeVideoBitRate": doDescribeVideoBitRate,
|
4790
|
+
"CreateVideoDownloadTask": doCreateVideoDownloadTask,
|
4530
4791
|
"DescribeRecordBackupPlan": doDescribeRecordBackupPlan,
|
4531
4792
|
"DescribeRecordRetrieveTask": doDescribeRecordRetrieveTask,
|
4532
4793
|
"AddRecordRetrieveTask": doAddRecordRetrieveTask,
|
@@ -4552,11 +4813,14 @@ ACTION_MAP = {
|
|
4552
4813
|
"ListRecordBackupPlans": doListRecordBackupPlans,
|
4553
4814
|
"AddOrganization": doAddOrganization,
|
4554
4815
|
"DescribeDevicePreset": doDescribeDevicePreset,
|
4816
|
+
"BatchDeleteVideoDownloadTask": doBatchDeleteVideoDownloadTask,
|
4555
4817
|
"DescribeRecordFile": doDescribeRecordFile,
|
4556
4818
|
"DescribeUserDevice": doDescribeUserDevice,
|
4557
4819
|
"DescribeAITaskResult": doDescribeAITaskResult,
|
4820
|
+
"DescribeGBDeviceAddr": doDescribeGBDeviceAddr,
|
4558
4821
|
"ListRecordPlanChannels": doListRecordPlanChannels,
|
4559
4822
|
"AddUserDevice": doAddUserDevice,
|
4823
|
+
"DeleteTask": doDeleteTask,
|
4560
4824
|
"DeleteOrganization": doDeleteOrganization,
|
4561
4825
|
"DescribeRecordPlaybackUrl": doDescribeRecordPlaybackUrl,
|
4562
4826
|
"DescribeRecordPlan": doDescribeRecordPlan,
|
@@ -4569,6 +4833,7 @@ ACTION_MAP = {
|
|
4569
4833
|
"AddRecordBackupTemplate": doAddRecordBackupTemplate,
|
4570
4834
|
"UpdateRecordPlan": doUpdateRecordPlan,
|
4571
4835
|
"DeleteUserDevice": doDeleteUserDevice,
|
4836
|
+
"ListVideoDownloadTask": doListVideoDownloadTask,
|
4572
4837
|
"DescribeGatewayVersion": doDescribeGatewayVersion,
|
4573
4838
|
"DescribeDeviceRegion": doDescribeDeviceRegion,
|
4574
4839
|
"ListRecordTemplates": doListRecordTemplates,
|