tccli 3.0.1216.1__py2.py3-none-any.whl → 3.0.1217.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/argparser.py +1 -1
- tccli/command.py +2 -2
- tccli/credentials.py +25 -0
- tccli/main.py +6 -2
- tccli/plugins/sso/__init__.py +61 -0
- tccli/plugins/sso/configs.py +4 -0
- tccli/plugins/sso/configure.py +45 -0
- tccli/plugins/sso/login.py +144 -0
- tccli/plugins/sso/logout.py +21 -0
- tccli/plugins/sso/terminal.py +161 -0
- tccli/plugins/sso/texts.py +40 -0
- tccli/services/__init__.py +6 -0
- tccli/services/acp/v20220105/api.json +7 -7
- tccli/services/acp/v20220105/examples.json +2 -2
- tccli/services/aiart/v20221229/api.json +29 -29
- tccli/services/aiart/v20221229/examples.json +8 -8
- tccli/services/apigateway/v20180808/api.json +18 -17
- tccli/services/apigateway/v20180808/examples.json +12 -12
- tccli/services/apm/v20210622/api.json +98 -4
- tccli/services/asr/v20190614/api.json +18 -17
- tccli/services/asr/v20190614/examples.json +13 -13
- tccli/services/autoscaling/v20180419/api.json +371 -309
- tccli/services/autoscaling/v20180419/examples.json +17 -17
- tccli/services/batch/v20170312/api.json +7 -7
- tccli/services/bda/v20200324/api.json +39 -31
- tccli/services/bda/v20200324/examples.json +9 -9
- tccli/services/bh/__init__.py +4 -0
- tccli/services/bh/bh_client.py +3428 -0
- tccli/services/bh/v20230418/api.json +8180 -0
- tccli/services/bh/v20230418/examples.json +519 -0
- tccli/services/bi/v20220105/api.json +48 -0
- tccli/services/billing/v20180709/api.json +26 -24
- tccli/services/bsca/v20210811/api.json +1 -1
- tccli/services/btoe/v20210514/api.json +4 -4
- tccli/services/btoe/v20210514/examples.json +2 -2
- tccli/services/ca/v20230228/api.json +60 -0
- tccli/services/cam/v20190116/api.json +11 -11
- tccli/services/cat/v20180409/api.json +9 -0
- tccli/services/cbs/v20170312/api.json +200 -188
- tccli/services/cbs/v20170312/examples.json +4 -4
- tccli/services/ccc/v20200210/api.json +390 -323
- tccli/services/ccc/v20200210/examples.json +15 -15
- tccli/services/cdb/cdb_client.py +13 -13
- tccli/services/cdb/v20170320/api.json +295 -270
- tccli/services/cdb/v20170320/examples.json +38 -38
- tccli/services/cdc/v20201214/api.json +283 -270
- tccli/services/cdc/v20201214/examples.json +26 -26
- tccli/services/cds/v20180420/api.json +82 -76
- tccli/services/cds/v20180420/examples.json +1 -1
- tccli/services/cdwch/v20200915/api.json +1 -1
- tccli/services/cdwdoris/v20211228/api.json +42 -2
- tccli/services/cdz/v20221123/api.json +41 -5
- tccli/services/cfg/v20210820/api.json +31 -0
- tccli/services/cfs/v20190719/api.json +89 -1
- tccli/services/cfs/v20190719/examples.json +1 -1
- tccli/services/cfw/cfw_client.py +0 -53
- tccli/services/cfw/v20190904/api.json +1849 -1999
- tccli/services/cfw/v20190904/examples.json +157 -159
- tccli/services/ckafka/v20190819/api.json +104 -75
- tccli/services/clb/v20180317/api.json +48 -26
- tccli/services/clb/v20180317/examples.json +1 -1
- tccli/services/cloudapp/v20220530/api.json +5 -1
- tccli/services/cloudaudit/v20190319/api.json +58 -44
- tccli/services/cloudaudit/v20190319/examples.json +6 -6
- tccli/services/cloudstudio/v20230508/api.json +38 -37
- tccli/services/cloudstudio/v20230508/examples.json +4 -4
- tccli/services/cls/cls_client.py +216 -4
- tccli/services/cls/v20201016/api.json +536 -47
- tccli/services/cls/v20201016/examples.json +34 -2
- tccli/services/csip/v20221121/api.json +2562 -2382
- tccli/services/csip/v20221121/examples.json +108 -108
- tccli/services/cvm/v20170312/api.json +149 -112
- tccli/services/cvm/v20170312/examples.json +2 -2
- tccli/services/cwp/cwp_client.py +4 -110
- tccli/services/cwp/v20180228/api.json +6338 -6146
- tccli/services/cwp/v20180228/examples.json +342 -370
- tccli/services/cynosdb/v20190107/api.json +93 -81
- tccli/services/cynosdb/v20190107/examples.json +70 -70
- tccli/services/dasb/v20191018/api.json +796 -651
- tccli/services/dasb/v20191018/examples.json +101 -101
- tccli/services/dcdb/dcdb_client.py +114 -61
- tccli/services/dcdb/v20180411/api.json +141 -7
- tccli/services/dcdb/v20180411/examples.json +32 -0
- tccli/services/dlc/v20210125/api.json +21 -11
- tccli/services/dnspod/dnspod_client.py +417 -46
- tccli/services/dnspod/v20210323/api.json +751 -30
- tccli/services/dnspod/v20210323/examples.json +62 -0
- tccli/services/dts/v20211206/api.json +4 -4
- tccli/services/ecm/v20190719/api.json +2 -2
- tccli/services/emr/v20190103/api.json +339 -114
- tccli/services/emr/v20190103/examples.json +64 -82
- tccli/services/es/v20180416/api.json +29 -0
- tccli/services/es/v20180416/examples.json +1 -1
- tccli/services/ess/v20201111/api.json +49 -31
- tccli/services/ess/v20201111/examples.json +20 -8
- tccli/services/essbasic/v20210526/api.json +54 -49
- tccli/services/essbasic/v20210526/examples.json +36 -18
- tccli/services/facefusion/v20181201/api.json +47 -45
- tccli/services/facefusion/v20181201/examples.json +2 -2
- tccli/services/facefusion/v20220927/api.json +54 -48
- tccli/services/facefusion/v20220927/examples.json +5 -5
- tccli/services/faceid/v20180301/api.json +497 -496
- tccli/services/faceid/v20180301/examples.json +219 -101
- tccli/services/fmu/v20191213/api.json +59 -67
- tccli/services/fmu/v20191213/examples.json +22 -22
- tccli/services/ft/v20200304/api.json +53 -57
- tccli/services/ft/v20200304/examples.json +14 -14
- tccli/services/gme/v20180711/api.json +21 -11
- tccli/services/gme/v20180711/examples.json +1 -1
- tccli/services/hai/v20230812/api.json +116 -9
- tccli/services/hai/v20230812/examples.json +4 -4
- tccli/services/hunyuan/hunyuan_client.py +436 -12
- tccli/services/hunyuan/v20230901/api.json +1482 -118
- tccli/services/hunyuan/v20230901/examples.json +82 -18
- tccli/services/iai/v20180301/api.json +23 -19
- tccli/services/iai/v20180301/examples.json +2 -2
- tccli/services/iai/v20200303/api.json +530 -511
- tccli/services/iai/v20200303/examples.json +116 -86
- tccli/services/ig/__init__.py +4 -0
- tccli/services/ig/ig_client.py +195 -0
- tccli/services/ig/v20210518/api.json +83 -0
- tccli/services/ig/v20210518/examples.json +13 -0
- tccli/services/ioa/ioa_client.py +53 -0
- tccli/services/ioa/v20220601/api.json +662 -413
- tccli/services/ioa/v20220601/examples.json +24 -10
- tccli/services/iotexplorer/v20190423/api.json +33 -13
- tccli/services/iotexplorer/v20190423/examples.json +3 -3
- tccli/services/iotvideo/iotvideo_client.py +106 -0
- tccli/services/iotvideo/v20191126/api.json +256 -24
- tccli/services/iotvideo/v20191126/examples.json +19 -3
- tccli/services/iotvideo/v20201215/api.json +1 -1
- tccli/services/iotvideo/v20201215/examples.json +1 -1
- tccli/services/iotvideo/v20211125/api.json +1 -1
- tccli/services/iotvideo/v20211125/examples.json +2 -2
- tccli/services/iss/iss_client.py +69 -122
- tccli/services/iss/v20230517/api.json +10 -54
- tccli/services/iss/v20230517/examples.json +0 -14
- tccli/services/kms/v20190118/api.json +301 -268
- tccli/services/kms/v20190118/examples.json +45 -51
- tccli/services/lcic/lcic_client.py +159 -0
- tccli/services/lcic/v20220817/api.json +273 -1
- tccli/services/lcic/v20220817/examples.json +24 -0
- tccli/services/lighthouse/v20200324/api.json +56 -0
- tccli/services/live/live_client.py +159 -0
- tccli/services/live/v20180801/api.json +244 -0
- tccli/services/live/v20180801/examples.json +24 -0
- tccli/services/lke/v20231130/api.json +17 -17
- tccli/services/lke/v20231130/examples.json +19 -25
- tccli/services/mariadb/v20170312/api.json +7 -7
- tccli/services/market/v20191010/api.json +3 -3
- tccli/services/market/v20191010/examples.json +2 -2
- tccli/services/mmps/v20200710/api.json +47 -47
- tccli/services/mmps/v20200710/examples.json +3 -3
- tccli/services/mongodb/v20190725/api.json +4 -4
- tccli/services/monitor/v20180724/api.json +46 -19
- tccli/services/mps/v20190612/api.json +282 -5
- tccli/services/mps/v20190612/examples.json +25 -1
- tccli/services/mqtt/v20240516/api.json +2 -2
- tccli/services/mrs/v20200910/api.json +72 -34
- tccli/services/mrs/v20200910/examples.json +2 -2
- tccli/services/ms/v20180408/api.json +535 -506
- tccli/services/ms/v20180408/examples.json +25 -25
- tccli/services/oceanus/v20190422/api.json +130 -0
- tccli/services/ocr/ocr_client.py +232 -20
- tccli/services/ocr/v20181119/api.json +2265 -760
- tccli/services/ocr/v20181119/examples.json +200 -180
- tccli/services/omics/v20221128/api.json +614 -553
- tccli/services/omics/v20221128/examples.json +9 -9
- tccli/services/organization/v20210331/api.json +13 -4
- tccli/services/organization/v20210331/examples.json +2 -2
- tccli/services/partners/v20180321/api.json +244 -234
- tccli/services/partners/v20180321/examples.json +19 -19
- tccli/services/privatedns/privatedns_client.py +428 -4
- tccli/services/privatedns/v20201028/api.json +815 -11
- tccli/services/privatedns/v20201028/examples.json +64 -0
- tccli/services/pts/v20210728/api.json +18 -0
- tccli/services/pts/v20210728/examples.json +1 -1
- tccli/services/rce/rce_client.py +53 -0
- tccli/services/rce/v20201103/api.json +146 -0
- tccli/services/rce/v20201103/examples.json +8 -0
- tccli/services/redis/v20180412/api.json +42 -42
- tccli/services/redis/v20180412/examples.json +19 -19
- tccli/services/rum/v20210622/api.json +9 -0
- tccli/services/scf/v20180416/api.json +15 -15
- tccli/services/scf/v20180416/examples.json +1 -1
- tccli/services/smop/v20201203/api.json +46 -42
- tccli/services/smop/v20201203/examples.json +2 -2
- tccli/services/soe/v20180724/api.json +10 -10
- tccli/services/sqlserver/v20180328/api.json +21 -8
- tccli/services/sqlserver/v20180328/examples.json +5 -5
- tccli/services/ssl/v20191205/api.json +97 -4
- tccli/services/ssm/v20190923/api.json +292 -231
- tccli/services/ssm/v20190923/examples.json +42 -42
- tccli/services/tat/v20201028/api.json +97 -97
- tccli/services/tat/v20201028/examples.json +20 -26
- tccli/services/tchd/v20230306/api.json +5 -5
- tccli/services/tchd/v20230306/examples.json +3 -3
- tccli/services/tcr/v20190924/api.json +1 -1
- tccli/services/tcr/v20190924/examples.json +1 -1
- tccli/services/tcss/v20201101/api.json +1973 -1426
- tccli/services/tcss/v20201101/examples.json +346 -364
- tccli/services/tdmq/v20200217/api.json +539 -401
- tccli/services/tdmq/v20200217/examples.json +104 -104
- tccli/services/tds/v20220801/api.json +4 -4
- tccli/services/tem/v20210701/api.json +287 -271
- tccli/services/tem/v20210701/examples.json +59 -59
- tccli/services/teo/v20220901/api.json +37 -9
- tccli/services/teo/v20220901/examples.json +13 -7
- tccli/services/thpc/v20230321/api.json +5 -5
- tccli/services/tke/tke_client.py +217 -58
- tccli/services/tke/v20180525/api.json +36 -27
- tccli/services/tke/v20180525/examples.json +1 -1
- tccli/services/tke/v20220501/api.json +176 -0
- tccli/services/tke/v20220501/examples.json +24 -0
- tccli/services/tmt/v20180321/api.json +38 -8
- tccli/services/trp/v20210515/api.json +86 -74
- tccli/services/trp/v20210515/examples.json +65 -65
- tccli/services/trro/v20220325/api.json +72 -71
- tccli/services/trro/v20220325/examples.json +8 -8
- tccli/services/trtc/trtc_client.py +8 -61
- tccli/services/trtc/v20190722/api.json +72 -30
- tccli/services/trtc/v20190722/examples.json +3 -11
- tccli/services/tse/tse_client.py +110 -4
- tccli/services/tse/v20201207/api.json +122 -7
- tccli/services/tse/v20201207/examples.json +25 -9
- tccli/services/vclm/v20240523/api.json +225 -82
- tccli/services/vclm/v20240523/examples.json +13 -19
- tccli/services/vod/v20180717/api.json +431 -4
- tccli/services/vod/v20180717/examples.json +25 -5
- tccli/services/vod/v20240718/api.json +11 -11
- tccli/services/vod/v20240718/examples.json +4 -4
- tccli/services/vod/vod_client.py +53 -0
- tccli/services/vpc/v20170312/api.json +1090 -862
- tccli/services/vpc/v20170312/examples.json +74 -66
- tccli/services/vpc/vpc_client.py +61 -8
- tccli/services/waf/v20180125/api.json +2540 -2177
- tccli/services/waf/v20180125/examples.json +216 -284
- tccli/services/waf/waf_client.py +172 -119
- tccli/services/wav/v20210129/api.json +48 -48
- tccli/services/wav/v20210129/examples.json +4 -4
- tccli/services/wedata/v20210820/api.json +909 -25
- tccli/services/wedata/v20210820/examples.json +28 -4
- tccli/services/wedata/wedata_client.py +159 -0
- tccli/services/weilingwith/v20230427/api.json +6 -6
- tccli/services/weilingwith/v20230427/examples.json +3 -3
- tccli/sso.py +229 -0
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/RECORD +252 -235
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1216.1.dist-info → tccli-3.0.1217.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/iss/iss_client.py
CHANGED
@@ -381,7 +381,7 @@ def doDescribeDeviceChannel(args, parsed_globals):
|
|
381
381
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
382
382
|
|
383
383
|
|
384
|
-
def
|
384
|
+
def doDeleteRecordBackupTemplate(args, parsed_globals):
|
385
385
|
g_param = parse_global_arg(parsed_globals)
|
386
386
|
|
387
387
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -410,11 +410,11 @@ def doAddRecordRetrieveTask(args, parsed_globals):
|
|
410
410
|
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
411
411
|
client._sdkVersion += ("_CLI_" + __version__)
|
412
412
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
413
|
-
model = models.
|
413
|
+
model = models.DeleteRecordBackupTemplateRequest()
|
414
414
|
model.from_json_string(json.dumps(args))
|
415
415
|
start_time = time.time()
|
416
416
|
while True:
|
417
|
-
rsp = client.
|
417
|
+
rsp = client.DeleteRecordBackupTemplate(model)
|
418
418
|
result = rsp.to_json_string()
|
419
419
|
try:
|
420
420
|
json_obj = json.loads(result)
|
@@ -1057,58 +1057,6 @@ def doDescribeDeviceRegion(args, parsed_globals):
|
|
1057
1057
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1058
1058
|
|
1059
1059
|
|
1060
|
-
def doDeleteRecordPlan(args, parsed_globals):
|
1061
|
-
g_param = parse_global_arg(parsed_globals)
|
1062
|
-
|
1063
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1064
|
-
cred = credential.CVMRoleCredential()
|
1065
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1066
|
-
cred = credential.STSAssumeRoleCredential(
|
1067
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1068
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1069
|
-
)
|
1070
|
-
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):
|
1071
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1072
|
-
else:
|
1073
|
-
cred = credential.Credential(
|
1074
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1075
|
-
)
|
1076
|
-
http_profile = HttpProfile(
|
1077
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1078
|
-
reqMethod="POST",
|
1079
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
1080
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1081
|
-
)
|
1082
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1083
|
-
if g_param[OptionsDefine.Language]:
|
1084
|
-
profile.language = g_param[OptionsDefine.Language]
|
1085
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1086
|
-
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
1087
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
1088
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1089
|
-
model = models.DeleteRecordPlanRequest()
|
1090
|
-
model.from_json_string(json.dumps(args))
|
1091
|
-
start_time = time.time()
|
1092
|
-
while True:
|
1093
|
-
rsp = client.DeleteRecordPlan(model)
|
1094
|
-
result = rsp.to_json_string()
|
1095
|
-
try:
|
1096
|
-
json_obj = json.loads(result)
|
1097
|
-
except TypeError as e:
|
1098
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1099
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1100
|
-
break
|
1101
|
-
cur_time = time.time()
|
1102
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1103
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1104
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1105
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1106
|
-
else:
|
1107
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1108
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1109
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1110
|
-
|
1111
|
-
|
1112
1060
|
def doAddOrganization(args, parsed_globals):
|
1113
1061
|
g_param = parse_global_arg(parsed_globals)
|
1114
1062
|
|
@@ -1577,58 +1525,6 @@ def doDescribeAITaskResult(args, parsed_globals):
|
|
1577
1525
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1578
1526
|
|
1579
1527
|
|
1580
|
-
def doControlDevicePTZ(args, parsed_globals):
|
1581
|
-
g_param = parse_global_arg(parsed_globals)
|
1582
|
-
|
1583
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1584
|
-
cred = credential.CVMRoleCredential()
|
1585
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1586
|
-
cred = credential.STSAssumeRoleCredential(
|
1587
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1588
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1589
|
-
)
|
1590
|
-
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):
|
1591
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1592
|
-
else:
|
1593
|
-
cred = credential.Credential(
|
1594
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1595
|
-
)
|
1596
|
-
http_profile = HttpProfile(
|
1597
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1598
|
-
reqMethod="POST",
|
1599
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
1600
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1601
|
-
)
|
1602
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1603
|
-
if g_param[OptionsDefine.Language]:
|
1604
|
-
profile.language = g_param[OptionsDefine.Language]
|
1605
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1606
|
-
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
1607
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
1608
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1609
|
-
model = models.ControlDevicePTZRequest()
|
1610
|
-
model.from_json_string(json.dumps(args))
|
1611
|
-
start_time = time.time()
|
1612
|
-
while True:
|
1613
|
-
rsp = client.ControlDevicePTZ(model)
|
1614
|
-
result = rsp.to_json_string()
|
1615
|
-
try:
|
1616
|
-
json_obj = json.loads(result)
|
1617
|
-
except TypeError as e:
|
1618
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1619
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1620
|
-
break
|
1621
|
-
cur_time = time.time()
|
1622
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1623
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1624
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1625
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1626
|
-
else:
|
1627
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1628
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1629
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1630
|
-
|
1631
|
-
|
1632
1528
|
def doDeleteAITask(args, parsed_globals):
|
1633
1529
|
g_param = parse_global_arg(parsed_globals)
|
1634
1530
|
|
@@ -2149,7 +2045,7 @@ def doDescribeDomain(args, parsed_globals):
|
|
2149
2045
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2150
2046
|
|
2151
2047
|
|
2152
|
-
def
|
2048
|
+
def doControlDeviceStream(args, parsed_globals):
|
2153
2049
|
g_param = parse_global_arg(parsed_globals)
|
2154
2050
|
|
2155
2051
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2178,11 +2074,11 @@ def doDeleteRecordBackupTemplate(args, parsed_globals):
|
|
2178
2074
|
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
2179
2075
|
client._sdkVersion += ("_CLI_" + __version__)
|
2180
2076
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2181
|
-
model = models.
|
2077
|
+
model = models.ControlDeviceStreamRequest()
|
2182
2078
|
model.from_json_string(json.dumps(args))
|
2183
2079
|
start_time = time.time()
|
2184
2080
|
while True:
|
2185
|
-
rsp = client.
|
2081
|
+
rsp = client.ControlDeviceStream(model)
|
2186
2082
|
result = rsp.to_json_string()
|
2187
2083
|
try:
|
2188
2084
|
json_obj = json.loads(result)
|
@@ -2721,7 +2617,7 @@ def doUpdateUserDevice(args, parsed_globals):
|
|
2721
2617
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2722
2618
|
|
2723
2619
|
|
2724
|
-
def
|
2620
|
+
def doDeleteRecordPlan(args, parsed_globals):
|
2725
2621
|
g_param = parse_global_arg(parsed_globals)
|
2726
2622
|
|
2727
2623
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2750,11 +2646,11 @@ def doCheckDomain(args, parsed_globals):
|
|
2750
2646
|
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
2751
2647
|
client._sdkVersion += ("_CLI_" + __version__)
|
2752
2648
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2753
|
-
model = models.
|
2649
|
+
model = models.DeleteRecordPlanRequest()
|
2754
2650
|
model.from_json_string(json.dumps(args))
|
2755
2651
|
start_time = time.time()
|
2756
2652
|
while True:
|
2757
|
-
rsp = client.
|
2653
|
+
rsp = client.DeleteRecordPlan(model)
|
2758
2654
|
result = rsp.to_json_string()
|
2759
2655
|
try:
|
2760
2656
|
json_obj = json.loads(result)
|
@@ -3241,7 +3137,7 @@ def doListDevices(args, parsed_globals):
|
|
3241
3137
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3242
3138
|
|
3243
3139
|
|
3244
|
-
def
|
3140
|
+
def doControlDevicePTZ(args, parsed_globals):
|
3245
3141
|
g_param = parse_global_arg(parsed_globals)
|
3246
3142
|
|
3247
3143
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3270,11 +3166,11 @@ def doControlDeviceStream(args, parsed_globals):
|
|
3270
3166
|
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
3271
3167
|
client._sdkVersion += ("_CLI_" + __version__)
|
3272
3168
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3273
|
-
model = models.
|
3169
|
+
model = models.ControlDevicePTZRequest()
|
3274
3170
|
model.from_json_string(json.dumps(args))
|
3275
3171
|
start_time = time.time()
|
3276
3172
|
while True:
|
3277
|
-
rsp = client.
|
3173
|
+
rsp = client.ControlDevicePTZ(model)
|
3278
3174
|
result = rsp.to_json_string()
|
3279
3175
|
try:
|
3280
3176
|
json_obj = json.loads(result)
|
@@ -4177,6 +4073,58 @@ def doListGatewayDevices(args, parsed_globals):
|
|
4177
4073
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4178
4074
|
|
4179
4075
|
|
4076
|
+
def doAddRecordRetrieveTask(args, parsed_globals):
|
4077
|
+
g_param = parse_global_arg(parsed_globals)
|
4078
|
+
|
4079
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4080
|
+
cred = credential.CVMRoleCredential()
|
4081
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4082
|
+
cred = credential.STSAssumeRoleCredential(
|
4083
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4084
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4085
|
+
)
|
4086
|
+
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):
|
4087
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4088
|
+
else:
|
4089
|
+
cred = credential.Credential(
|
4090
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4091
|
+
)
|
4092
|
+
http_profile = HttpProfile(
|
4093
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4094
|
+
reqMethod="POST",
|
4095
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4096
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4097
|
+
)
|
4098
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4099
|
+
if g_param[OptionsDefine.Language]:
|
4100
|
+
profile.language = g_param[OptionsDefine.Language]
|
4101
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4102
|
+
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
4103
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4104
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4105
|
+
model = models.AddRecordRetrieveTaskRequest()
|
4106
|
+
model.from_json_string(json.dumps(args))
|
4107
|
+
start_time = time.time()
|
4108
|
+
while True:
|
4109
|
+
rsp = client.AddRecordRetrieveTask(model)
|
4110
|
+
result = rsp.to_json_string()
|
4111
|
+
try:
|
4112
|
+
json_obj = json.loads(result)
|
4113
|
+
except TypeError as e:
|
4114
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4115
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4116
|
+
break
|
4117
|
+
cur_time = time.time()
|
4118
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4119
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4120
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4121
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4122
|
+
else:
|
4123
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4124
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4125
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4126
|
+
|
4127
|
+
|
4180
4128
|
def doControlRecord(args, parsed_globals):
|
4181
4129
|
g_param = parse_global_arg(parsed_globals)
|
4182
4130
|
|
@@ -4455,7 +4403,7 @@ ACTION_MAP = {
|
|
4455
4403
|
"ControlRecordTimeline": doControlRecordTimeline,
|
4456
4404
|
"DeleteUserDevice": doDeleteUserDevice,
|
4457
4405
|
"DescribeDeviceChannel": doDescribeDeviceChannel,
|
4458
|
-
"
|
4406
|
+
"DeleteRecordBackupTemplate": doDeleteRecordBackupTemplate,
|
4459
4407
|
"DescribeDomainRegion": doDescribeDomainRegion,
|
4460
4408
|
"DeleteGateway": doDeleteGateway,
|
4461
4409
|
"ListRecordBackupTemplates": doListRecordBackupTemplates,
|
@@ -4468,7 +4416,6 @@ ACTION_MAP = {
|
|
4468
4416
|
"DescribeGatewayVersion": doDescribeGatewayVersion,
|
4469
4417
|
"UpdateOrganization": doUpdateOrganization,
|
4470
4418
|
"DescribeDeviceRegion": doDescribeDeviceRegion,
|
4471
|
-
"DeleteRecordPlan": doDeleteRecordPlan,
|
4472
4419
|
"AddOrganization": doAddOrganization,
|
4473
4420
|
"DescribeDevicePreset": doDescribeDevicePreset,
|
4474
4421
|
"ListRecordPlans": doListRecordPlans,
|
@@ -4478,7 +4425,6 @@ ACTION_MAP = {
|
|
4478
4425
|
"DescribeUserDevice": doDescribeUserDevice,
|
4479
4426
|
"DeleteDomain": doDeleteDomain,
|
4480
4427
|
"DescribeAITaskResult": doDescribeAITaskResult,
|
4481
|
-
"ControlDevicePTZ": doControlDevicePTZ,
|
4482
4428
|
"DeleteAITask": doDeleteAITask,
|
4483
4429
|
"ListRecordPlanChannels": doListRecordPlanChannels,
|
4484
4430
|
"DescribeCNAME": doDescribeCNAME,
|
@@ -4489,7 +4435,7 @@ ACTION_MAP = {
|
|
4489
4435
|
"DescribeRecordPlaybackUrl": doDescribeRecordPlaybackUrl,
|
4490
4436
|
"UpdateDeviceOrganization": doUpdateDeviceOrganization,
|
4491
4437
|
"DescribeDomain": doDescribeDomain,
|
4492
|
-
"
|
4438
|
+
"ControlDeviceStream": doControlDeviceStream,
|
4493
4439
|
"DescribeVideoDownloadUrl": doDescribeVideoDownloadUrl,
|
4494
4440
|
"RefreshDeviceChannel": doRefreshDeviceChannel,
|
4495
4441
|
"DeleteRecordRetrieveTask": doDeleteRecordRetrieveTask,
|
@@ -4500,7 +4446,7 @@ ACTION_MAP = {
|
|
4500
4446
|
"UpdateRecordPlan": doUpdateRecordPlan,
|
4501
4447
|
"DescribeGateway": doDescribeGateway,
|
4502
4448
|
"UpdateUserDevice": doUpdateUserDevice,
|
4503
|
-
"
|
4449
|
+
"DeleteRecordPlan": doDeleteRecordPlan,
|
4504
4450
|
"AddRecordTemplate": doAddRecordTemplate,
|
4505
4451
|
"AddRecordPlan": doAddRecordPlan,
|
4506
4452
|
"SetForbidPlayChannels": doSetForbidPlayChannels,
|
@@ -4510,7 +4456,7 @@ ACTION_MAP = {
|
|
4510
4456
|
"ListOrganizationChannelNumbers": doListOrganizationChannelNumbers,
|
4511
4457
|
"ListGateways": doListGateways,
|
4512
4458
|
"ListDevices": doListDevices,
|
4513
|
-
"
|
4459
|
+
"ControlDevicePTZ": doControlDevicePTZ,
|
4514
4460
|
"UpdateAITaskStatus": doUpdateAITaskStatus,
|
4515
4461
|
"UpdateAITask": doUpdateAITask,
|
4516
4462
|
"QueryForbidPlayChannelList": doQueryForbidPlayChannelList,
|
@@ -4528,6 +4474,7 @@ ACTION_MAP = {
|
|
4528
4474
|
"DeleteRecordBackupPlan": doDeleteRecordBackupPlan,
|
4529
4475
|
"DescribeStreamAuth": doDescribeStreamAuth,
|
4530
4476
|
"ListGatewayDevices": doListGatewayDevices,
|
4477
|
+
"AddRecordRetrieveTask": doAddRecordRetrieveTask,
|
4531
4478
|
"ControlRecord": doControlRecord,
|
4532
4479
|
"AddStreamAuth": doAddStreamAuth,
|
4533
4480
|
"ListRecordBackupPlanDevices": doListRecordBackupPlanDevices,
|
@@ -77,13 +77,6 @@
|
|
77
77
|
"output": "CallISAPIResponse",
|
78
78
|
"status": "online"
|
79
79
|
},
|
80
|
-
"CheckDomain": {
|
81
|
-
"document": "用于检测域名是否备案。",
|
82
|
-
"input": "CheckDomainRequest",
|
83
|
-
"name": "检测域名是否备案",
|
84
|
-
"output": "CheckDomainResponse",
|
85
|
-
"status": "online"
|
86
|
-
},
|
87
80
|
"ControlDevicePTZ": {
|
88
81
|
"document": "用于设备通道云台控制,包括转动、变倍、变焦、光圈等。",
|
89
82
|
"input": "ControlDevicePTZRequest",
|
@@ -2679,52 +2672,6 @@
|
|
2679
2672
|
],
|
2680
2673
|
"usage": "in"
|
2681
2674
|
},
|
2682
|
-
"CheckDomainRequest": {
|
2683
|
-
"document": "CheckDomain请求参数结构体",
|
2684
|
-
"members": [
|
2685
|
-
{
|
2686
|
-
"disabled": false,
|
2687
|
-
"document": "播放域名",
|
2688
|
-
"example": "www.demo.com",
|
2689
|
-
"member": "string",
|
2690
|
-
"name": "PlayDomain",
|
2691
|
-
"required": true,
|
2692
|
-
"type": "string"
|
2693
|
-
},
|
2694
|
-
{
|
2695
|
-
"disabled": false,
|
2696
|
-
"document": "CNAME 记录值",
|
2697
|
-
"example": "d0bf30383016f5ac52aff************.play-***.ap-shanghai.tencentiss.cn",
|
2698
|
-
"member": "string",
|
2699
|
-
"name": "InternalDomain",
|
2700
|
-
"required": true,
|
2701
|
-
"type": "string"
|
2702
|
-
}
|
2703
|
-
],
|
2704
|
-
"type": "object"
|
2705
|
-
},
|
2706
|
-
"CheckDomainResponse": {
|
2707
|
-
"document": "CheckDomain返回参数结构体",
|
2708
|
-
"members": [
|
2709
|
-
{
|
2710
|
-
"disabled": false,
|
2711
|
-
"document": "是否备案",
|
2712
|
-
"example": "true",
|
2713
|
-
"member": "bool",
|
2714
|
-
"name": "Data",
|
2715
|
-
"output_required": true,
|
2716
|
-
"type": "bool",
|
2717
|
-
"value_allowed_null": false
|
2718
|
-
},
|
2719
|
-
{
|
2720
|
-
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
2721
|
-
"member": "string",
|
2722
|
-
"name": "RequestId",
|
2723
|
-
"type": "string"
|
2724
|
-
}
|
2725
|
-
],
|
2726
|
-
"type": "object"
|
2727
|
-
},
|
2728
2675
|
"ChefClothAIResultInfo": {
|
2729
2676
|
"document": "厨师服识别结果详情",
|
2730
2677
|
"members": [
|
@@ -5329,6 +5276,15 @@
|
|
5329
5276
|
"name": "IsInternal",
|
5330
5277
|
"required": false,
|
5331
5278
|
"type": "bool"
|
5279
|
+
},
|
5280
|
+
{
|
5281
|
+
"disabled": false,
|
5282
|
+
"document": "云录像回放时,是否需要开启时间戳矫正,主要解决时间戳反转,会退等问题导致无法播放",
|
5283
|
+
"example": "false",
|
5284
|
+
"member": "bool",
|
5285
|
+
"name": "CorrectTimestamp",
|
5286
|
+
"required": false,
|
5287
|
+
"type": "bool"
|
5332
5288
|
}
|
5333
5289
|
],
|
5334
5290
|
"type": "object"
|
@@ -6605,7 +6561,7 @@
|
|
6605
6561
|
},
|
6606
6562
|
{
|
6607
6563
|
"disabled": false,
|
6608
|
-
"document": "每页数量,默认为20
|
6564
|
+
"document": "每页数量,默认为20,单页最大10000条",
|
6609
6565
|
"example": "20",
|
6610
6566
|
"member": "uint64",
|
6611
6567
|
"name": "PageSize",
|
@@ -124,20 +124,6 @@
|
|
124
124
|
"title": "成功"
|
125
125
|
}
|
126
126
|
],
|
127
|
-
"CheckDomain": [
|
128
|
-
{
|
129
|
-
"document": " ",
|
130
|
-
"input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CheckDomain\n<公共请求参数>\n\n{\n \"PlayDomain\": \"testdomain.cn\",\n \"InternalDomain\": \"*******************************.play-ivc.ap-shanghai.tencentivc.cn\"\n}",
|
131
|
-
"output": "{\n \"Response\": {\n \"Data\": true,\n \"RequestId\": \"e565e8fe-127c-442c-8912-55b0e11d8ab4\"\n }\n}",
|
132
|
-
"title": "成功"
|
133
|
-
},
|
134
|
-
{
|
135
|
-
"document": "域名存在",
|
136
|
-
"input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CheckDomain\n<公共请求参数>\n\n{\n \"PlayDomain\": \"testdomain.cn\",\n \"InternalDomain\": \"****************************.play-ivc.ap-shanghai.tencentivc.cn\"\n}",
|
137
|
-
"output": "{\n \"Response\": {\n \"Error\": {\n \"Code\": \"InvalidParameterValue.DomainRepeat\",\n \"Message\": \"该域名已存在\"\n },\n \"RequestId\": \"9e9b6808-0941-41e9-95eb-5a9a827ca4de\"\n }\n}",
|
138
|
-
"title": "错误"
|
139
|
-
}
|
140
|
-
],
|
141
127
|
"ControlDevicePTZ": [
|
142
128
|
{
|
143
129
|
"document": " ",
|