tccli 3.0.1188.1__py2.py3-none-any.whl → 3.0.1190.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/services/__init__.py +2 -1
- tccli/services/aiart/aiart_client.py +53 -0
- tccli/services/aiart/v20221229/api.json +107 -0
- tccli/services/aiart/v20221229/examples.json +8 -0
- tccli/services/apm/v20210622/api.json +3 -1
- tccli/services/billing/v20180709/api.json +3 -0
- tccli/services/billing/v20180709/examples.json +1 -1
- tccli/services/cfg/v20210820/api.json +20 -5
- tccli/services/cfw/v20190904/api.json +82 -2
- tccli/services/ckafka/v20190819/api.json +5 -5
- tccli/services/dcdb/dcdb_client.py +106 -0
- tccli/services/dcdb/v20180411/api.json +318 -0
- tccli/services/dcdb/v20180411/examples.json +28 -0
- tccli/services/dnspod/dnspod_client.py +53 -0
- tccli/services/dnspod/v20210323/api.json +118 -0
- tccli/services/dnspod/v20210323/examples.json +8 -0
- tccli/services/emr/emr_client.py +269 -4
- tccli/services/emr/v20190103/api.json +591 -0
- tccli/services/emr/v20190103/examples.json +46 -0
- tccli/services/es/es_client.py +53 -0
- tccli/services/es/v20180416/api.json +54 -0
- tccli/services/es/v20180416/examples.json +14 -0
- tccli/services/ess/v20201111/api.json +9 -9
- tccli/services/ess/v20201111/examples.json +7 -1
- tccli/services/essbasic/essbasic_client.py +53 -0
- tccli/services/essbasic/v20210526/api.json +120 -0
- tccli/services/essbasic/v20210526/examples.json +14 -0
- tccli/services/iotexplorer/v20190423/api.json +2 -2
- tccli/services/iss/iss_client.py +118 -65
- tccli/services/iss/v20230517/api.json +78 -0
- tccli/services/iss/v20230517/examples.json +8 -0
- tccli/services/mariadb/mariadb_client.py +110 -4
- tccli/services/mariadb/v20170312/api.json +318 -0
- tccli/services/mariadb/v20170312/examples.json +16 -0
- tccli/services/mps/v20190612/api.json +131 -3
- tccli/services/ocr/v20181119/api.json +22 -2
- tccli/services/redis/redis_client.py +110 -4
- tccli/services/redis/v20180412/api.json +209 -0
- tccli/services/redis/v20180412/examples.json +16 -0
- tccli/services/sms/v20210111/api.json +9 -9
- tccli/services/ssl/v20191205/api.json +3 -3
- tccli/services/ssl/v20191205/examples.json +2 -2
- tccli/services/teo/v20220901/api.json +14 -14
- tccli/services/tke/tke_client.py +364 -46
- tccli/services/tke/v20180525/api.json +9 -0
- tccli/services/tke/v20220501/api.json +525 -0
- tccli/services/tke/v20220501/examples.json +54 -0
- tccli/services/tsf/v20180326/api.json +74 -29
- tccli/services/vdb/v20230616/api.json +491 -0
- tccli/services/vdb/v20230616/examples.json +46 -0
- tccli/services/vdb/vdb_client.py +265 -0
- tccli/services/vod/v20240718/api.json +121 -0
- tccli/services/vod/v20240718/examples.json +31 -0
- tccli/services/vod/vod_client.py +58 -0
- tccli/services/vpc/v20170312/api.json +13 -4
- {tccli-3.0.1188.1.dist-info → tccli-3.0.1190.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1188.1.dist-info → tccli-3.0.1190.1.dist-info}/RECORD +61 -59
- {tccli-3.0.1188.1.dist-info → tccli-3.0.1190.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1188.1.dist-info → tccli-3.0.1190.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1188.1.dist-info → tccli-3.0.1190.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 doAddRecordRetrieveTask(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 doDeleteRecordBackupTemplate(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.AddRecordRetrieveTaskRequest()
|
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.AddRecordRetrieveTask(model)
|
418
418
|
result = rsp.to_json_string()
|
419
419
|
try:
|
420
420
|
json_obj = json.loads(result)
|
@@ -1577,6 +1577,58 @@ def doDescribeAITaskResult(args, parsed_globals):
|
|
1577
1577
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1578
1578
|
|
1579
1579
|
|
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
|
+
|
1580
1632
|
def doDeleteAITask(args, parsed_globals):
|
1581
1633
|
g_param = parse_global_arg(parsed_globals)
|
1582
1634
|
|
@@ -2097,7 +2149,7 @@ def doDescribeDomain(args, parsed_globals):
|
|
2097
2149
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2098
2150
|
|
2099
2151
|
|
2100
|
-
def
|
2152
|
+
def doDeleteRecordBackupTemplate(args, parsed_globals):
|
2101
2153
|
g_param = parse_global_arg(parsed_globals)
|
2102
2154
|
|
2103
2155
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2126,11 +2178,11 @@ def doControlDeviceStream(args, parsed_globals):
|
|
2126
2178
|
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
2127
2179
|
client._sdkVersion += ("_CLI_" + __version__)
|
2128
2180
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2129
|
-
model = models.
|
2181
|
+
model = models.DeleteRecordBackupTemplateRequest()
|
2130
2182
|
model.from_json_string(json.dumps(args))
|
2131
2183
|
start_time = time.time()
|
2132
2184
|
while True:
|
2133
|
-
rsp = client.
|
2185
|
+
rsp = client.DeleteRecordBackupTemplate(model)
|
2134
2186
|
result = rsp.to_json_string()
|
2135
2187
|
try:
|
2136
2188
|
json_obj = json.loads(result)
|
@@ -2409,6 +2461,58 @@ def doBatchOperateDevice(args, parsed_globals):
|
|
2409
2461
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2410
2462
|
|
2411
2463
|
|
2464
|
+
def doCallISAPI(args, parsed_globals):
|
2465
|
+
g_param = parse_global_arg(parsed_globals)
|
2466
|
+
|
2467
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2468
|
+
cred = credential.CVMRoleCredential()
|
2469
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2470
|
+
cred = credential.STSAssumeRoleCredential(
|
2471
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2472
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
2473
|
+
)
|
2474
|
+
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):
|
2475
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2476
|
+
else:
|
2477
|
+
cred = credential.Credential(
|
2478
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2479
|
+
)
|
2480
|
+
http_profile = HttpProfile(
|
2481
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2482
|
+
reqMethod="POST",
|
2483
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2484
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2485
|
+
)
|
2486
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2487
|
+
if g_param[OptionsDefine.Language]:
|
2488
|
+
profile.language = g_param[OptionsDefine.Language]
|
2489
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2490
|
+
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
2491
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2492
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2493
|
+
model = models.CallISAPIRequest()
|
2494
|
+
model.from_json_string(json.dumps(args))
|
2495
|
+
start_time = time.time()
|
2496
|
+
while True:
|
2497
|
+
rsp = client.CallISAPI(model)
|
2498
|
+
result = rsp.to_json_string()
|
2499
|
+
try:
|
2500
|
+
json_obj = json.loads(result)
|
2501
|
+
except TypeError as e:
|
2502
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2503
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2504
|
+
break
|
2505
|
+
cur_time = time.time()
|
2506
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2507
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2508
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2509
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2510
|
+
else:
|
2511
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2512
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2513
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2514
|
+
|
2515
|
+
|
2412
2516
|
def doDescribeRecordPlan(args, parsed_globals):
|
2413
2517
|
g_param = parse_global_arg(parsed_globals)
|
2414
2518
|
|
@@ -3137,7 +3241,7 @@ def doListDevices(args, parsed_globals):
|
|
3137
3241
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3138
3242
|
|
3139
3243
|
|
3140
|
-
def
|
3244
|
+
def doControlDeviceStream(args, parsed_globals):
|
3141
3245
|
g_param = parse_global_arg(parsed_globals)
|
3142
3246
|
|
3143
3247
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3166,11 +3270,11 @@ def doControlDevicePTZ(args, parsed_globals):
|
|
3166
3270
|
client = mod.IssClient(cred, g_param[OptionsDefine.Region], profile)
|
3167
3271
|
client._sdkVersion += ("_CLI_" + __version__)
|
3168
3272
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3169
|
-
model = models.
|
3273
|
+
model = models.ControlDeviceStreamRequest()
|
3170
3274
|
model.from_json_string(json.dumps(args))
|
3171
3275
|
start_time = time.time()
|
3172
3276
|
while True:
|
3173
|
-
rsp = client.
|
3277
|
+
rsp = client.ControlDeviceStream(model)
|
3174
3278
|
result = rsp.to_json_string()
|
3175
3279
|
try:
|
3176
3280
|
json_obj = json.loads(result)
|
@@ -4073,58 +4177,6 @@ def doListGatewayDevices(args, parsed_globals):
|
|
4073
4177
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4074
4178
|
|
4075
4179
|
|
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
|
-
|
4128
4180
|
def doControlRecord(args, parsed_globals):
|
4129
4181
|
g_param = parse_global_arg(parsed_globals)
|
4130
4182
|
|
@@ -4403,7 +4455,7 @@ ACTION_MAP = {
|
|
4403
4455
|
"ControlRecordTimeline": doControlRecordTimeline,
|
4404
4456
|
"DeleteUserDevice": doDeleteUserDevice,
|
4405
4457
|
"DescribeDeviceChannel": doDescribeDeviceChannel,
|
4406
|
-
"
|
4458
|
+
"AddRecordRetrieveTask": doAddRecordRetrieveTask,
|
4407
4459
|
"DescribeDomainRegion": doDescribeDomainRegion,
|
4408
4460
|
"DeleteGateway": doDeleteGateway,
|
4409
4461
|
"ListRecordBackupTemplates": doListRecordBackupTemplates,
|
@@ -4426,6 +4478,7 @@ ACTION_MAP = {
|
|
4426
4478
|
"DescribeUserDevice": doDescribeUserDevice,
|
4427
4479
|
"DeleteDomain": doDeleteDomain,
|
4428
4480
|
"DescribeAITaskResult": doDescribeAITaskResult,
|
4481
|
+
"ControlDevicePTZ": doControlDevicePTZ,
|
4429
4482
|
"DeleteAITask": doDeleteAITask,
|
4430
4483
|
"ListRecordPlanChannels": doListRecordPlanChannels,
|
4431
4484
|
"DescribeCNAME": doDescribeCNAME,
|
@@ -4436,12 +4489,13 @@ ACTION_MAP = {
|
|
4436
4489
|
"DescribeRecordPlaybackUrl": doDescribeRecordPlaybackUrl,
|
4437
4490
|
"UpdateDeviceOrganization": doUpdateDeviceOrganization,
|
4438
4491
|
"DescribeDomain": doDescribeDomain,
|
4439
|
-
"
|
4492
|
+
"DeleteRecordBackupTemplate": doDeleteRecordBackupTemplate,
|
4440
4493
|
"DescribeVideoDownloadUrl": doDescribeVideoDownloadUrl,
|
4441
4494
|
"RefreshDeviceChannel": doRefreshDeviceChannel,
|
4442
4495
|
"DeleteRecordRetrieveTask": doDeleteRecordRetrieveTask,
|
4443
4496
|
"ControlDevicePreset": doControlDevicePreset,
|
4444
4497
|
"BatchOperateDevice": doBatchOperateDevice,
|
4498
|
+
"CallISAPI": doCallISAPI,
|
4445
4499
|
"DescribeRecordPlan": doDescribeRecordPlan,
|
4446
4500
|
"UpdateRecordPlan": doUpdateRecordPlan,
|
4447
4501
|
"DescribeGateway": doDescribeGateway,
|
@@ -4456,7 +4510,7 @@ ACTION_MAP = {
|
|
4456
4510
|
"ListOrganizationChannelNumbers": doListOrganizationChannelNumbers,
|
4457
4511
|
"ListGateways": doListGateways,
|
4458
4512
|
"ListDevices": doListDevices,
|
4459
|
-
"
|
4513
|
+
"ControlDeviceStream": doControlDeviceStream,
|
4460
4514
|
"UpdateAITaskStatus": doUpdateAITaskStatus,
|
4461
4515
|
"UpdateAITask": doUpdateAITask,
|
4462
4516
|
"QueryForbidPlayChannelList": doQueryForbidPlayChannelList,
|
@@ -4474,7 +4528,6 @@ ACTION_MAP = {
|
|
4474
4528
|
"DeleteRecordBackupPlan": doDeleteRecordBackupPlan,
|
4475
4529
|
"DescribeStreamAuth": doDescribeStreamAuth,
|
4476
4530
|
"ListGatewayDevices": doListGatewayDevices,
|
4477
|
-
"AddRecordRetrieveTask": doAddRecordRetrieveTask,
|
4478
4531
|
"ControlRecord": doControlRecord,
|
4479
4532
|
"AddStreamAuth": doAddStreamAuth,
|
4480
4533
|
"ListRecordBackupPlanDevices": doListRecordBackupPlanDevices,
|
@@ -70,6 +70,13 @@
|
|
70
70
|
"output": "BatchOperateDeviceResponse",
|
71
71
|
"status": "online"
|
72
72
|
},
|
73
|
+
"CallISAPI": {
|
74
|
+
"document": "本接口可基于海康ISUP 5.0协议实现透传ISAPI的请求数据,调用接口前需确保设备采用ISUP协议成功注册至本平台",
|
75
|
+
"input": "CallISAPIRequest",
|
76
|
+
"name": "ISAPI 透传异步回调",
|
77
|
+
"output": "CallISAPIResponse",
|
78
|
+
"status": "online"
|
79
|
+
},
|
73
80
|
"CheckDomain": {
|
74
81
|
"document": "用于检测域名是否备案。",
|
75
82
|
"input": "CheckDomainRequest",
|
@@ -2452,6 +2459,61 @@
|
|
2452
2459
|
],
|
2453
2460
|
"usage": "out"
|
2454
2461
|
},
|
2462
|
+
"CallISAPIRequest": {
|
2463
|
+
"document": "CallISAPI请求参数结构体",
|
2464
|
+
"members": [
|
2465
|
+
{
|
2466
|
+
"disabled": false,
|
2467
|
+
"document": "设备ID",
|
2468
|
+
"example": "abdsaie-dasd-dasd-************",
|
2469
|
+
"member": "string",
|
2470
|
+
"name": "DeviceId",
|
2471
|
+
"required": true,
|
2472
|
+
"type": "string"
|
2473
|
+
},
|
2474
|
+
{
|
2475
|
+
"disabled": false,
|
2476
|
+
"document": "url 资源",
|
2477
|
+
"example": "GET /ISAPI/ContentMgmt/InputProxy/channels/status",
|
2478
|
+
"member": "string",
|
2479
|
+
"name": "Url",
|
2480
|
+
"required": true,
|
2481
|
+
"type": "string"
|
2482
|
+
},
|
2483
|
+
{
|
2484
|
+
"disabled": false,
|
2485
|
+
"document": "输入参数",
|
2486
|
+
"example": "xml",
|
2487
|
+
"member": "string",
|
2488
|
+
"name": "InputData",
|
2489
|
+
"required": false,
|
2490
|
+
"type": "string"
|
2491
|
+
}
|
2492
|
+
],
|
2493
|
+
"type": "object"
|
2494
|
+
},
|
2495
|
+
"CallISAPIResponse": {
|
2496
|
+
"document": "CallISAPI返回参数结构体",
|
2497
|
+
"members": [
|
2498
|
+
{
|
2499
|
+
"disabled": false,
|
2500
|
+
"document": "返回数据",
|
2501
|
+
"example": " ",
|
2502
|
+
"member": "ISAPIOutputData",
|
2503
|
+
"name": "Data",
|
2504
|
+
"output_required": false,
|
2505
|
+
"type": "object",
|
2506
|
+
"value_allowed_null": false
|
2507
|
+
},
|
2508
|
+
{
|
2509
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
2510
|
+
"member": "string",
|
2511
|
+
"name": "RequestId",
|
2512
|
+
"type": "string"
|
2513
|
+
}
|
2514
|
+
],
|
2515
|
+
"type": "object"
|
2516
|
+
},
|
2455
2517
|
"CarAIResultInfo": {
|
2456
2518
|
"document": "车辆车牌识别结果信息",
|
2457
2519
|
"members": [
|
@@ -6150,6 +6212,22 @@
|
|
6150
6212
|
],
|
6151
6213
|
"usage": "out"
|
6152
6214
|
},
|
6215
|
+
"ISAPIOutputData": {
|
6216
|
+
"document": "ISUP智能安全接入 API返回数据",
|
6217
|
+
"members": [
|
6218
|
+
{
|
6219
|
+
"disabled": false,
|
6220
|
+
"document": "输出参数\n注意:此字段可能返回 null,表示取不到有效值。",
|
6221
|
+
"example": "无",
|
6222
|
+
"member": "string",
|
6223
|
+
"name": "OutputData",
|
6224
|
+
"output_required": false,
|
6225
|
+
"type": "string",
|
6226
|
+
"value_allowed_null": true
|
6227
|
+
}
|
6228
|
+
],
|
6229
|
+
"usage": "out"
|
6230
|
+
},
|
6153
6231
|
"LifeCycleData": {
|
6154
6232
|
"document": "生命周期,云文件生命周期设置,管理文件冷、热存储的时间",
|
6155
6233
|
"members": [
|
@@ -116,6 +116,14 @@
|
|
116
116
|
"title": "成功"
|
117
117
|
}
|
118
118
|
],
|
119
|
+
"CallISAPI": [
|
120
|
+
{
|
121
|
+
"document": "调用成功",
|
122
|
+
"input": "POST / HTTP/1.1\nHost: iss.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CallISAPI\n<公共请求参数>\n\n{\n \"DeviceId\": \"73dfd1e2-3210-4dc4-b8b3-b5d548865e07\",\n \"Url\": \"GET /ISAPI/ContentMgmt/InputProxy/channels/status\"\n}",
|
123
|
+
"output": "{\n \"Response\": {\n \"Data\": {\n \"OutputData\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<ResponseStatus version=\\\"2.0\\\" xmlns=\\\"http://www.hikvision.com/ver20/XMLSchema\\\">\\n<requestURL>/ISAPI/ContentMgmt/InputProxy/channels/status</requestURL>\\n<statusCode>4</statusCode>\\n<statusString>Invalid Operation</statusString>\\n<subStatusCode>notSupport</subStatusCode>\\n</ResponseStatus>\\n\"\n },\n \"RequestId\": \"8088ea32-0ee1-4ed4-bf9b-d539501c0aed\"\n }\n}",
|
124
|
+
"title": "成功"
|
125
|
+
}
|
126
|
+
],
|
119
127
|
"CheckDomain": [
|
120
128
|
{
|
121
129
|
"document": " ",
|
@@ -849,7 +849,7 @@ def doModifyDBParameters(args, parsed_globals):
|
|
849
849
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
850
850
|
|
851
851
|
|
852
|
-
def
|
852
|
+
def doDescribeBackupConfigs(args, parsed_globals):
|
853
853
|
g_param = parse_global_arg(parsed_globals)
|
854
854
|
|
855
855
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -878,11 +878,11 @@ def doModifyLogFileRetentionPeriod(args, parsed_globals):
|
|
878
878
|
client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
|
879
879
|
client._sdkVersion += ("_CLI_" + __version__)
|
880
880
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
881
|
-
model = models.
|
881
|
+
model = models.DescribeBackupConfigsRequest()
|
882
882
|
model.from_json_string(json.dumps(args))
|
883
883
|
start_time = time.time()
|
884
884
|
while True:
|
885
|
-
rsp = client.
|
885
|
+
rsp = client.DescribeBackupConfigs(model)
|
886
886
|
result = rsp.to_json_string()
|
887
887
|
try:
|
888
888
|
json_obj = json.loads(result)
|
@@ -3657,6 +3657,58 @@ def doUpgradeDBInstance(args, parsed_globals):
|
|
3657
3657
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3658
3658
|
|
3659
3659
|
|
3660
|
+
def doModifyBackupConfigs(args, parsed_globals):
|
3661
|
+
g_param = parse_global_arg(parsed_globals)
|
3662
|
+
|
3663
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3664
|
+
cred = credential.CVMRoleCredential()
|
3665
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3666
|
+
cred = credential.STSAssumeRoleCredential(
|
3667
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3668
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3669
|
+
)
|
3670
|
+
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):
|
3671
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3672
|
+
else:
|
3673
|
+
cred = credential.Credential(
|
3674
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3675
|
+
)
|
3676
|
+
http_profile = HttpProfile(
|
3677
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3678
|
+
reqMethod="POST",
|
3679
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3680
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3681
|
+
)
|
3682
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3683
|
+
if g_param[OptionsDefine.Language]:
|
3684
|
+
profile.language = g_param[OptionsDefine.Language]
|
3685
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3686
|
+
client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
|
3687
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3688
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3689
|
+
model = models.ModifyBackupConfigsRequest()
|
3690
|
+
model.from_json_string(json.dumps(args))
|
3691
|
+
start_time = time.time()
|
3692
|
+
while True:
|
3693
|
+
rsp = client.ModifyBackupConfigs(model)
|
3694
|
+
result = rsp.to_json_string()
|
3695
|
+
try:
|
3696
|
+
json_obj = json.loads(result)
|
3697
|
+
except TypeError as e:
|
3698
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3699
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3700
|
+
break
|
3701
|
+
cur_time = time.time()
|
3702
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3703
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3704
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3705
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3706
|
+
else:
|
3707
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3708
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3709
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3710
|
+
|
3711
|
+
|
3660
3712
|
def doDescribeBinlogTime(args, parsed_globals):
|
3661
3713
|
g_param = parse_global_arg(parsed_globals)
|
3662
3714
|
|
@@ -3865,6 +3917,58 @@ def doDescribeDBEncryptAttributes(args, parsed_globals):
|
|
3865
3917
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3866
3918
|
|
3867
3919
|
|
3920
|
+
def doModifyLogFileRetentionPeriod(args, parsed_globals):
|
3921
|
+
g_param = parse_global_arg(parsed_globals)
|
3922
|
+
|
3923
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3924
|
+
cred = credential.CVMRoleCredential()
|
3925
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3926
|
+
cred = credential.STSAssumeRoleCredential(
|
3927
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3928
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3929
|
+
)
|
3930
|
+
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):
|
3931
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3932
|
+
else:
|
3933
|
+
cred = credential.Credential(
|
3934
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3935
|
+
)
|
3936
|
+
http_profile = HttpProfile(
|
3937
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3938
|
+
reqMethod="POST",
|
3939
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3940
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3941
|
+
)
|
3942
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3943
|
+
if g_param[OptionsDefine.Language]:
|
3944
|
+
profile.language = g_param[OptionsDefine.Language]
|
3945
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3946
|
+
client = mod.MariadbClient(cred, g_param[OptionsDefine.Region], profile)
|
3947
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3948
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3949
|
+
model = models.ModifyLogFileRetentionPeriodRequest()
|
3950
|
+
model.from_json_string(json.dumps(args))
|
3951
|
+
start_time = time.time()
|
3952
|
+
while True:
|
3953
|
+
rsp = client.ModifyLogFileRetentionPeriod(model)
|
3954
|
+
result = rsp.to_json_string()
|
3955
|
+
try:
|
3956
|
+
json_obj = json.loads(result)
|
3957
|
+
except TypeError as e:
|
3958
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3959
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3960
|
+
break
|
3961
|
+
cur_time = time.time()
|
3962
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3963
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3964
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3965
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3966
|
+
else:
|
3967
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3968
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3969
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3970
|
+
|
3971
|
+
|
3868
3972
|
CLIENT_MAP = {
|
3869
3973
|
"v20170312": mariadb_client_v20170312,
|
3870
3974
|
|
@@ -3892,7 +3996,7 @@ ACTION_MAP = {
|
|
3892
3996
|
"ActivateHourDBInstance": doActivateHourDBInstance,
|
3893
3997
|
"ResetAccountPassword": doResetAccountPassword,
|
3894
3998
|
"ModifyDBParameters": doModifyDBParameters,
|
3895
|
-
"
|
3999
|
+
"DescribeBackupConfigs": doDescribeBackupConfigs,
|
3896
4000
|
"DescribeDBInstanceDetail": doDescribeDBInstanceDetail,
|
3897
4001
|
"DescribeDBSlowLogs": doDescribeDBSlowLogs,
|
3898
4002
|
"DescribeFlow": doDescribeFlow,
|
@@ -3946,10 +4050,12 @@ ACTION_MAP = {
|
|
3946
4050
|
"TerminateDedicatedDBInstance": doTerminateDedicatedDBInstance,
|
3947
4051
|
"CloneAccount": doCloneAccount,
|
3948
4052
|
"UpgradeDBInstance": doUpgradeDBInstance,
|
4053
|
+
"ModifyBackupConfigs": doModifyBackupConfigs,
|
3949
4054
|
"DescribeBinlogTime": doDescribeBinlogTime,
|
3950
4055
|
"DescribeLogFileRetentionPeriod": doDescribeLogFileRetentionPeriod,
|
3951
4056
|
"AssociateSecurityGroups": doAssociateSecurityGroups,
|
3952
4057
|
"DescribeDBEncryptAttributes": doDescribeDBEncryptAttributes,
|
4058
|
+
"ModifyLogFileRetentionPeriod": doModifyLogFileRetentionPeriod,
|
3953
4059
|
|
3954
4060
|
}
|
3955
4061
|
|