tccli 3.0.1391.1__py2.py3-none-any.whl → 3.0.1414.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.
Potentially problematic release.
This version of tccli might be problematic. Click here for more details.
- tccli/__init__.py +1 -1
- tccli/services/__init__.py +2 -1
- tccli/services/ai3d/v20250513/api.json +22 -4
- tccli/services/aiart/aiart_client.py +173 -67
- tccli/services/aiart/v20221229/api.json +193 -0
- tccli/services/aiart/v20221229/examples.json +16 -0
- tccli/services/apm/apm_client.py +53 -0
- tccli/services/apm/v20210622/api.json +354 -0
- tccli/services/apm/v20210622/examples.json +8 -0
- tccli/services/asr/v20190614/api.json +3 -3
- tccli/services/autoscaling/v20180419/api.json +24 -2
- tccli/services/batch/v20170312/api.json +1 -1
- tccli/services/bda/bda_client.py +15 -704
- tccli/services/bda/v20200324/api.json +107 -1819
- tccli/services/bda/v20200324/examples.json +0 -176
- tccli/services/billing/billing_client.py +326 -8
- tccli/services/billing/v20180709/api.json +2200 -255
- tccli/services/billing/v20180709/examples.json +48 -0
- tccli/services/cam/v20190116/api.json +4 -4
- tccli/services/captcha/v20190722/api.json +3 -3
- tccli/services/cat/v20180409/api.json +7 -7
- tccli/services/ccc/ccc_client.py +235 -76
- tccli/services/ccc/v20200210/api.json +502 -18
- tccli/services/ccc/v20200210/examples.json +24 -0
- tccli/services/cdb/cdb_client.py +106 -0
- tccli/services/cdb/v20170320/api.json +257 -44
- tccli/services/cdb/v20170320/examples.json +22 -6
- tccli/services/cdn/cdn_client.py +4 -163
- tccli/services/cdn/v20180606/api.json +61 -310
- tccli/services/cdn/v20180606/examples.json +1 -25
- tccli/services/cdwdoris/v20211228/api.json +51 -12
- tccli/services/cdwpg/v20201230/api.json +11 -1
- tccli/services/cdwpg/v20201230/examples.json +1 -1
- tccli/services/cfg/v20210820/api.json +11 -1
- tccli/services/cfs/cfs_client.py +41 -94
- tccli/services/cfs/v20190719/api.json +171 -55
- tccli/services/cfs/v20190719/examples.json +1 -9
- tccli/services/cfw/v20190904/api.json +122 -10
- tccli/services/ckafka/ckafka_client.py +188 -29
- tccli/services/ckafka/v20190819/api.json +277 -4
- tccli/services/ckafka/v20190819/examples.json +25 -1
- tccli/services/clb/clb_client.py +0 -265
- tccli/services/clb/v20180317/api.json +130 -296
- tccli/services/clb/v20180317/examples.json +12 -40
- tccli/services/cloudapp/v20220530/api.json +55 -0
- tccli/services/cloudaudit/v20190319/api.json +11 -0
- tccli/services/cloudhsm/v20191112/api.json +10 -10
- tccli/services/cls/v20201016/api.json +63 -45
- tccli/services/cls/v20201016/examples.json +10 -4
- tccli/services/csip/v20221121/api.json +53 -3
- tccli/services/ctem/v20231128/api.json +320 -0
- tccli/services/ctem/v20231128/examples.json +3 -3
- tccli/services/cvm/cvm_client.py +0 -212
- tccli/services/cvm/v20170312/api.json +91 -843
- tccli/services/cvm/v20170312/examples.json +32 -58
- tccli/services/cynosdb/cynosdb_client.py +167 -8
- tccli/services/cynosdb/v20190107/api.json +1126 -148
- tccli/services/cynosdb/v20190107/examples.json +31 -7
- tccli/services/dbbrain/dbbrain_client.py +246 -87
- tccli/services/dbbrain/v20191016/api.json +74 -62
- tccli/services/dbbrain/v20191016/examples.json +1 -1
- tccli/services/dbbrain/v20210527/api.json +601 -177
- tccli/services/dbbrain/v20210527/examples.json +28 -4
- tccli/services/dc/v20180410/api.json +101 -3
- tccli/services/dcdb/v20180411/api.json +1 -1
- tccli/services/dlc/dlc_client.py +53 -0
- tccli/services/dlc/v20210125/api.json +237 -24
- tccli/services/dlc/v20210125/examples.json +12 -4
- tccli/services/dnspod/dnspod_client.py +106 -0
- tccli/services/dnspod/v20210323/api.json +126 -20
- tccli/services/dnspod/v20210323/examples.json +17 -7
- tccli/services/dsgc/v20190723/api.json +73 -15
- tccli/services/dts/v20180330/api.json +4 -4
- tccli/services/dts/v20211206/api.json +408 -127
- tccli/services/dts/v20211206/examples.json +15 -9
- tccli/services/eb/v20210416/api.json +41 -1
- tccli/services/eb/v20210416/examples.json +1 -1
- tccli/services/emr/v20190103/api.json +56 -9
- tccli/services/emr/v20190103/examples.json +5 -5
- tccli/services/es/es_client.py +273 -8
- tccli/services/es/v20180416/api.json +845 -33
- tccli/services/es/v20180416/examples.json +33 -1
- tccli/services/es/v20250101/api.json +135 -2
- tccli/services/es/v20250101/examples.json +8 -0
- tccli/services/ess/ess_client.py +509 -32
- tccli/services/ess/v20201111/api.json +1366 -113
- tccli/services/ess/v20201111/examples.json +94 -10
- tccli/services/essbasic/v20210526/api.json +265 -27
- tccli/services/essbasic/v20210526/examples.json +12 -12
- tccli/services/facefusion/v20220927/api.json +1 -1
- tccli/services/gaap/v20180529/api.json +18 -8
- tccli/services/gme/gme_client.py +53 -0
- tccli/services/gme/v20180711/api.json +241 -1
- tccli/services/gme/v20180711/examples.json +8 -0
- tccli/services/gs/gs_client.py +216 -4
- tccli/services/gs/v20191118/api.json +202 -1
- tccli/services/gs/v20191118/examples.json +32 -0
- tccli/services/gwlb/gwlb_client.py +53 -0
- tccli/services/gwlb/v20240906/api.json +150 -0
- tccli/services/gwlb/v20240906/examples.json +8 -0
- tccli/services/hai/v20230812/api.json +5 -5
- tccli/services/hunyuan/v20230901/api.json +3 -3
- tccli/services/hunyuan/v20230901/examples.json +1 -1
- tccli/services/iai/v20180301/api.json +227 -207
- tccli/services/iai/v20180301/examples.json +26 -26
- tccli/services/iai/v20200303/api.json +4 -4
- tccli/services/iai/v20200303/examples.json +1 -1
- tccli/services/ioa/ioa_client.py +265 -0
- tccli/services/ioa/v20220601/api.json +781 -85
- tccli/services/ioa/v20220601/examples.json +46 -0
- tccli/services/iotexplorer/iotexplorer_client.py +387 -16
- tccli/services/iotexplorer/v20190423/api.json +1183 -63
- tccli/services/iotexplorer/v20190423/examples.json +92 -0
- tccli/services/keewidb/v20220308/api.json +69 -17
- tccli/services/keewidb/v20220308/examples.json +5 -5
- tccli/services/lcic/v20220817/api.json +61 -15
- tccli/services/lighthouse/v20200324/api.json +193 -24
- tccli/services/lighthouse/v20200324/examples.json +9 -3
- tccli/services/live/v20180801/api.json +6 -6
- tccli/services/live/v20180801/examples.json +7 -1
- tccli/services/lke/lke_client.py +40 -93
- tccli/services/lke/v20231130/api.json +943 -390
- tccli/services/lke/v20231130/examples.json +38 -46
- tccli/services/lkeap/v20240522/api.json +39 -12
- tccli/services/lkeap/v20240522/examples.json +12 -0
- tccli/services/mariadb/v20170312/api.json +1 -1
- tccli/services/mna/v20210119/api.json +11 -2
- tccli/services/mna/v20210119/examples.json +1 -1
- tccli/services/mongodb/mongodb_client.py +334 -16
- tccli/services/mongodb/v20190725/api.json +1092 -383
- tccli/services/mongodb/v20190725/examples.json +69 -21
- tccli/services/monitor/monitor_client.py +106 -0
- tccli/services/monitor/v20180724/api.json +383 -12
- tccli/services/monitor/v20180724/examples.json +24 -2
- tccli/services/mps/mps_client.py +220 -8
- tccli/services/mps/v20190612/api.json +1999 -179
- tccli/services/mps/v20190612/examples.json +56 -6
- tccli/services/mqtt/v20240516/api.json +10 -0
- tccli/services/mqtt/v20240516/examples.json +3 -9
- tccli/services/nlp/v20190408/api.json +6 -6
- tccli/services/oceanus/oceanus_client.py +318 -0
- tccli/services/oceanus/v20190422/api.json +461 -26
- tccli/services/oceanus/v20190422/examples.json +50 -2
- tccli/services/ocr/ocr_client.py +41 -253
- tccli/services/ocr/v20181119/api.json +153 -659
- tccli/services/ocr/v20181119/examples.json +8 -40
- tccli/services/omics/v20221128/api.json +90 -7
- tccli/services/organization/v20210331/api.json +46 -7
- tccli/services/postgres/v20170312/api.json +333 -77
- tccli/services/postgres/v20170312/examples.json +37 -31
- tccli/services/privatedns/privatedns_client.py +641 -58
- tccli/services/privatedns/v20201028/api.json +930 -19
- tccli/services/privatedns/v20201028/examples.json +91 -3
- tccli/services/pts/v20210728/api.json +2 -2
- tccli/services/redis/v20180412/api.json +303 -109
- tccli/services/redis/v20180412/examples.json +12 -12
- tccli/services/region/v20220627/api.json +1 -1
- tccli/services/rum/v20210622/api.json +22 -4
- tccli/services/rum/v20210622/examples.json +2 -2
- tccli/services/sms/v20190711/api.json +12 -12
- tccli/services/sms/v20190711/examples.json +9 -3
- tccli/services/sms/v20210111/api.json +13 -13
- tccli/services/sms/v20210111/examples.json +8 -2
- tccli/services/sqlserver/v20180328/api.json +46 -7
- tccli/services/sqlserver/v20180328/examples.json +2 -2
- tccli/services/ssl/v20191205/api.json +28 -0
- tccli/services/svp/v20240125/api.json +14 -4
- tccli/services/tag/v20180813/api.json +3 -3
- tccli/services/tat/v20201028/api.json +22 -3
- tccli/services/tcb/v20180608/api.json +1 -1
- tccli/services/tcss/tcss_client.py +228 -69
- tccli/services/tcss/v20201101/api.json +273 -25
- tccli/services/tcss/v20201101/examples.json +26 -2
- tccli/services/teo/teo_client.py +317 -52
- tccli/services/teo/v20220901/api.json +1824 -242
- tccli/services/teo/v20220901/examples.json +109 -21
- tccli/services/thpc/thpc_client.py +57 -4
- tccli/services/thpc/v20230321/api.json +163 -21
- tccli/services/thpc/v20230321/examples.json +13 -5
- tccli/services/tione/tione_client.py +163 -4
- tccli/services/tione/v20211111/api.json +285 -21
- tccli/services/tione/v20211111/examples.json +27 -3
- tccli/services/tke/tke_client.py +8 -8
- tccli/services/tke/v20180525/api.json +168 -130
- tccli/services/tke/v20180525/examples.json +20 -20
- tccli/services/tke/v20220501/api.json +215 -3
- tccli/services/tke/v20220501/examples.json +8 -0
- tccli/services/tms/tms_client.py +106 -0
- tccli/services/tms/v20201229/api.json +249 -3
- tccli/services/tms/v20201229/examples.json +16 -0
- tccli/services/tmt/v20180321/api.json +78 -1
- tccli/services/trabbit/v20230418/api.json +271 -4
- tccli/services/trabbit/v20230418/examples.json +9 -3
- tccli/services/trocket/v20230308/api.json +4 -4
- tccli/services/trro/trro_client.py +106 -0
- tccli/services/trro/v20220325/api.json +456 -0
- tccli/services/trro/v20220325/examples.json +16 -0
- tccli/services/trtc/v20190722/api.json +197 -49
- tccli/services/trtc/v20190722/examples.json +4 -4
- tccli/services/tse/v20201207/api.json +69 -2
- tccli/services/tse/v20201207/examples.json +3 -3
- tccli/services/tsf/v20180326/api.json +70 -7
- tccli/services/tsf/v20180326/examples.json +2 -2
- tccli/services/vclm/v20240523/api.json +145 -0
- tccli/services/vclm/v20240523/examples.json +16 -0
- tccli/services/vclm/vclm_client.py +106 -0
- tccli/services/vcube/v20220410/api.json +1 -1
- tccli/services/vod/v20180717/api.json +7 -7
- tccli/services/vpc/v20170312/api.json +1216 -70
- tccli/services/vpc/v20170312/examples.json +139 -3
- tccli/services/vpc/vpc_client.py +1023 -122
- tccli/services/vrs/v20200824/api.json +11 -11
- tccli/services/vrs/v20200824/examples.json +1 -1
- tccli/services/vtc/v20240223/api.json +14 -14
- tccli/services/waf/v20180125/api.json +812 -143
- tccli/services/waf/v20180125/examples.json +2 -2
- tccli/services/wedata/v20210820/api.json +1281 -601
- tccli/services/wedata/v20210820/examples.json +127 -157
- tccli/services/wedata/v20250806/api.json +19335 -0
- tccli/services/wedata/v20250806/examples.json +999 -0
- tccli/services/wedata/wedata_client.py +7072 -1131
- {tccli-3.0.1391.1.dist-info → tccli-3.0.1414.1.dist-info}/METADATA +9 -7
- {tccli-3.0.1391.1.dist-info → tccli-3.0.1414.1.dist-info}/RECORD +226 -224
- {tccli-3.0.1391.1.dist-info → tccli-3.0.1414.1.dist-info}/WHEEL +1 -1
- {tccli-3.0.1391.1.dist-info → tccli-3.0.1414.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1391.1.dist-info/license_files → tccli-3.0.1414.1.dist-info/licenses}/LICENSE +0 -0
tccli/services/es/es_client.py
CHANGED
|
@@ -331,6 +331,58 @@ def doDescribeServerlessSpaces(args, parsed_globals):
|
|
|
331
331
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
332
332
|
|
|
333
333
|
|
|
334
|
+
def doExportIpTraceLog(args, parsed_globals):
|
|
335
|
+
g_param = parse_global_arg(parsed_globals)
|
|
336
|
+
|
|
337
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
338
|
+
cred = credential.CVMRoleCredential()
|
|
339
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
340
|
+
cred = credential.STSAssumeRoleCredential(
|
|
341
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
342
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
343
|
+
)
|
|
344
|
+
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):
|
|
345
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
346
|
+
else:
|
|
347
|
+
cred = credential.Credential(
|
|
348
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
349
|
+
)
|
|
350
|
+
http_profile = HttpProfile(
|
|
351
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
352
|
+
reqMethod="POST",
|
|
353
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
354
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
355
|
+
)
|
|
356
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
357
|
+
if g_param[OptionsDefine.Language]:
|
|
358
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
359
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
360
|
+
client = mod.EsClient(cred, g_param[OptionsDefine.Region], profile)
|
|
361
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
362
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
363
|
+
model = models.ExportIpTraceLogRequest()
|
|
364
|
+
model.from_json_string(json.dumps(args))
|
|
365
|
+
start_time = time.time()
|
|
366
|
+
while True:
|
|
367
|
+
rsp = client.ExportIpTraceLog(model)
|
|
368
|
+
result = rsp.to_json_string()
|
|
369
|
+
try:
|
|
370
|
+
json_obj = json.loads(result)
|
|
371
|
+
except TypeError as e:
|
|
372
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
373
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
374
|
+
break
|
|
375
|
+
cur_time = time.time()
|
|
376
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
377
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
378
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
379
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
380
|
+
else:
|
|
381
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
382
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
383
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
384
|
+
|
|
385
|
+
|
|
334
386
|
def doInstallInstanceModel(args, parsed_globals):
|
|
335
387
|
g_param = parse_global_arg(parsed_globals)
|
|
336
388
|
|
|
@@ -1371,6 +1423,58 @@ def doRestartInstance(args, parsed_globals):
|
|
|
1371
1423
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1372
1424
|
|
|
1373
1425
|
|
|
1426
|
+
def doGetIpTraceStatus(args, parsed_globals):
|
|
1427
|
+
g_param = parse_global_arg(parsed_globals)
|
|
1428
|
+
|
|
1429
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
1430
|
+
cred = credential.CVMRoleCredential()
|
|
1431
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
1432
|
+
cred = credential.STSAssumeRoleCredential(
|
|
1433
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
1434
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
1435
|
+
)
|
|
1436
|
+
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):
|
|
1437
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
1438
|
+
else:
|
|
1439
|
+
cred = credential.Credential(
|
|
1440
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
1441
|
+
)
|
|
1442
|
+
http_profile = HttpProfile(
|
|
1443
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
1444
|
+
reqMethod="POST",
|
|
1445
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
1446
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
1447
|
+
)
|
|
1448
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
1449
|
+
if g_param[OptionsDefine.Language]:
|
|
1450
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
1451
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
1452
|
+
client = mod.EsClient(cred, g_param[OptionsDefine.Region], profile)
|
|
1453
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
1454
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
1455
|
+
model = models.GetIpTraceStatusRequest()
|
|
1456
|
+
model.from_json_string(json.dumps(args))
|
|
1457
|
+
start_time = time.time()
|
|
1458
|
+
while True:
|
|
1459
|
+
rsp = client.GetIpTraceStatus(model)
|
|
1460
|
+
result = rsp.to_json_string()
|
|
1461
|
+
try:
|
|
1462
|
+
json_obj = json.loads(result)
|
|
1463
|
+
except TypeError as e:
|
|
1464
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
1465
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
1466
|
+
break
|
|
1467
|
+
cur_time = time.time()
|
|
1468
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
1469
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
1470
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
1471
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
1472
|
+
else:
|
|
1473
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
1474
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
1475
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
1476
|
+
|
|
1477
|
+
|
|
1374
1478
|
def doUpdateInstance(args, parsed_globals):
|
|
1375
1479
|
g_param = parse_global_arg(parsed_globals)
|
|
1376
1480
|
|
|
@@ -2151,7 +2255,7 @@ def doUpdateServerlessInstance(args, parsed_globals):
|
|
|
2151
2255
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2152
2256
|
|
|
2153
2257
|
|
|
2154
|
-
def
|
|
2258
|
+
def doQueryIpTraceLog(args, parsed_globals):
|
|
2155
2259
|
g_param = parse_global_arg(parsed_globals)
|
|
2156
2260
|
|
|
2157
2261
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -2180,11 +2284,11 @@ def doRestartLogstashInstance(args, parsed_globals):
|
|
|
2180
2284
|
client = mod.EsClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2181
2285
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
2182
2286
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2183
|
-
model = models.
|
|
2287
|
+
model = models.QueryIpTraceLogRequest()
|
|
2184
2288
|
model.from_json_string(json.dumps(args))
|
|
2185
2289
|
start_time = time.time()
|
|
2186
2290
|
while True:
|
|
2187
|
-
rsp = client.
|
|
2291
|
+
rsp = client.QueryIpTraceLog(model)
|
|
2188
2292
|
result = rsp.to_json_string()
|
|
2189
2293
|
try:
|
|
2190
2294
|
json_obj = json.loads(result)
|
|
@@ -2463,6 +2567,58 @@ def doUpdateIndex(args, parsed_globals):
|
|
|
2463
2567
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2464
2568
|
|
|
2465
2569
|
|
|
2570
|
+
def doDescribeLogstashInstanceOperations(args, parsed_globals):
|
|
2571
|
+
g_param = parse_global_arg(parsed_globals)
|
|
2572
|
+
|
|
2573
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
2574
|
+
cred = credential.CVMRoleCredential()
|
|
2575
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
2576
|
+
cred = credential.STSAssumeRoleCredential(
|
|
2577
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
2578
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
2579
|
+
)
|
|
2580
|
+
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):
|
|
2581
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
2582
|
+
else:
|
|
2583
|
+
cred = credential.Credential(
|
|
2584
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
2585
|
+
)
|
|
2586
|
+
http_profile = HttpProfile(
|
|
2587
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
2588
|
+
reqMethod="POST",
|
|
2589
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
2590
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
2591
|
+
)
|
|
2592
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
2593
|
+
if g_param[OptionsDefine.Language]:
|
|
2594
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
2595
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
2596
|
+
client = mod.EsClient(cred, g_param[OptionsDefine.Region], profile)
|
|
2597
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
2598
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
2599
|
+
model = models.DescribeLogstashInstanceOperationsRequest()
|
|
2600
|
+
model.from_json_string(json.dumps(args))
|
|
2601
|
+
start_time = time.time()
|
|
2602
|
+
while True:
|
|
2603
|
+
rsp = client.DescribeLogstashInstanceOperations(model)
|
|
2604
|
+
result = rsp.to_json_string()
|
|
2605
|
+
try:
|
|
2606
|
+
json_obj = json.loads(result)
|
|
2607
|
+
except TypeError as e:
|
|
2608
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
2609
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
2610
|
+
break
|
|
2611
|
+
cur_time = time.time()
|
|
2612
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
2613
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
2614
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
2615
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
2616
|
+
else:
|
|
2617
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
2618
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
2619
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
2620
|
+
|
|
2621
|
+
|
|
2466
2622
|
def doDescribeInstances(args, parsed_globals):
|
|
2467
2623
|
g_param = parse_global_arg(parsed_globals)
|
|
2468
2624
|
|
|
@@ -3035,6 +3191,58 @@ def doDescribeServerlessSpaceUser(args, parsed_globals):
|
|
|
3035
3191
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3036
3192
|
|
|
3037
3193
|
|
|
3194
|
+
def doRestartLogstashInstance(args, parsed_globals):
|
|
3195
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3196
|
+
|
|
3197
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3198
|
+
cred = credential.CVMRoleCredential()
|
|
3199
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3200
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3201
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3202
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3203
|
+
)
|
|
3204
|
+
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):
|
|
3205
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3206
|
+
else:
|
|
3207
|
+
cred = credential.Credential(
|
|
3208
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3209
|
+
)
|
|
3210
|
+
http_profile = HttpProfile(
|
|
3211
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3212
|
+
reqMethod="POST",
|
|
3213
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3214
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3215
|
+
)
|
|
3216
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
3217
|
+
if g_param[OptionsDefine.Language]:
|
|
3218
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3219
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3220
|
+
client = mod.EsClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3221
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3222
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3223
|
+
model = models.RestartLogstashInstanceRequest()
|
|
3224
|
+
model.from_json_string(json.dumps(args))
|
|
3225
|
+
start_time = time.time()
|
|
3226
|
+
while True:
|
|
3227
|
+
rsp = client.RestartLogstashInstance(model)
|
|
3228
|
+
result = rsp.to_json_string()
|
|
3229
|
+
try:
|
|
3230
|
+
json_obj = json.loads(result)
|
|
3231
|
+
except TypeError as e:
|
|
3232
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3233
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3234
|
+
break
|
|
3235
|
+
cur_time = time.time()
|
|
3236
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3237
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3238
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3239
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3240
|
+
else:
|
|
3241
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3242
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3243
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3244
|
+
|
|
3245
|
+
|
|
3038
3246
|
def doDeleteIndex(args, parsed_globals):
|
|
3039
3247
|
g_param = parse_global_arg(parsed_globals)
|
|
3040
3248
|
|
|
@@ -3191,6 +3399,58 @@ def doDeleteLogstashPipelines(args, parsed_globals):
|
|
|
3191
3399
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3192
3400
|
|
|
3193
3401
|
|
|
3402
|
+
def doUpdateIpTraceStatus(args, parsed_globals):
|
|
3403
|
+
g_param = parse_global_arg(parsed_globals)
|
|
3404
|
+
|
|
3405
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
3406
|
+
cred = credential.CVMRoleCredential()
|
|
3407
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
|
3408
|
+
cred = credential.STSAssumeRoleCredential(
|
|
3409
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
|
3410
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
|
3411
|
+
)
|
|
3412
|
+
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):
|
|
3413
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
|
3414
|
+
else:
|
|
3415
|
+
cred = credential.Credential(
|
|
3416
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
|
3417
|
+
)
|
|
3418
|
+
http_profile = HttpProfile(
|
|
3419
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
|
3420
|
+
reqMethod="POST",
|
|
3421
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
|
3422
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
|
3423
|
+
)
|
|
3424
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
|
3425
|
+
if g_param[OptionsDefine.Language]:
|
|
3426
|
+
profile.language = g_param[OptionsDefine.Language]
|
|
3427
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
|
3428
|
+
client = mod.EsClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3429
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
|
3430
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3431
|
+
model = models.UpdateIpTraceStatusRequest()
|
|
3432
|
+
model.from_json_string(json.dumps(args))
|
|
3433
|
+
start_time = time.time()
|
|
3434
|
+
while True:
|
|
3435
|
+
rsp = client.UpdateIpTraceStatus(model)
|
|
3436
|
+
result = rsp.to_json_string()
|
|
3437
|
+
try:
|
|
3438
|
+
json_obj = json.loads(result)
|
|
3439
|
+
except TypeError as e:
|
|
3440
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
|
3441
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
|
3442
|
+
break
|
|
3443
|
+
cur_time = time.time()
|
|
3444
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
|
3445
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
|
3446
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
|
3447
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
|
3448
|
+
else:
|
|
3449
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
|
3450
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
|
3451
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3452
|
+
|
|
3453
|
+
|
|
3194
3454
|
def doUpgradeLicense(args, parsed_globals):
|
|
3195
3455
|
g_param = parse_global_arg(parsed_globals)
|
|
3196
3456
|
|
|
@@ -3503,7 +3763,7 @@ def doChunkDocument(args, parsed_globals):
|
|
|
3503
3763
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
|
3504
3764
|
|
|
3505
3765
|
|
|
3506
|
-
def
|
|
3766
|
+
def doGetMultiModalEmbedding(args, parsed_globals):
|
|
3507
3767
|
g_param = parse_global_arg(parsed_globals)
|
|
3508
3768
|
|
|
3509
3769
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
|
@@ -3532,11 +3792,11 @@ def doDescribeLogstashInstanceOperations(args, parsed_globals):
|
|
|
3532
3792
|
client = mod.EsClient(cred, g_param[OptionsDefine.Region], profile)
|
|
3533
3793
|
client._sdkVersion += ("_CLI_" + __version__)
|
|
3534
3794
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
|
3535
|
-
model = models.
|
|
3795
|
+
model = models.GetMultiModalEmbeddingRequest()
|
|
3536
3796
|
model.from_json_string(json.dumps(args))
|
|
3537
3797
|
start_time = time.time()
|
|
3538
3798
|
while True:
|
|
3539
|
-
rsp = client.
|
|
3799
|
+
rsp = client.GetMultiModalEmbedding(model)
|
|
3540
3800
|
result = rsp.to_json_string()
|
|
3541
3801
|
try:
|
|
3542
3802
|
json_obj = json.loads(result)
|
|
@@ -3678,6 +3938,7 @@ ACTION_MAP = {
|
|
|
3678
3938
|
"GetRequestTargetNodeTypes": doGetRequestTargetNodeTypes,
|
|
3679
3939
|
"StopLogstashPipelines": doStopLogstashPipelines,
|
|
3680
3940
|
"DescribeServerlessSpaces": doDescribeServerlessSpaces,
|
|
3941
|
+
"ExportIpTraceLog": doExportIpTraceLog,
|
|
3681
3942
|
"InstallInstanceModel": doInstallInstanceModel,
|
|
3682
3943
|
"DescribeIndexList": doDescribeIndexList,
|
|
3683
3944
|
"DescribeInstanceOperations": doDescribeInstanceOperations,
|
|
@@ -3698,6 +3959,7 @@ ACTION_MAP = {
|
|
|
3698
3959
|
"DescribeClusterSnapshot": doDescribeClusterSnapshot,
|
|
3699
3960
|
"CreateLogstashInstance": doCreateLogstashInstance,
|
|
3700
3961
|
"RestartInstance": doRestartInstance,
|
|
3962
|
+
"GetIpTraceStatus": doGetIpTraceStatus,
|
|
3701
3963
|
"UpdateInstance": doUpdateInstance,
|
|
3702
3964
|
"DescribeInstanceLogs": doDescribeInstanceLogs,
|
|
3703
3965
|
"RestartKibana": doRestartKibana,
|
|
@@ -3713,12 +3975,13 @@ ACTION_MAP = {
|
|
|
3713
3975
|
"ModifyEsVipSecurityGroup": doModifyEsVipSecurityGroup,
|
|
3714
3976
|
"CreateInstance": doCreateInstance,
|
|
3715
3977
|
"UpdateServerlessInstance": doUpdateServerlessInstance,
|
|
3716
|
-
"
|
|
3978
|
+
"QueryIpTraceLog": doQueryIpTraceLog,
|
|
3717
3979
|
"GetTextEmbedding": doGetTextEmbedding,
|
|
3718
3980
|
"DescribeDiagnose": doDescribeDiagnose,
|
|
3719
3981
|
"ParseDocument": doParseDocument,
|
|
3720
3982
|
"UpdateDictionaries": doUpdateDictionaries,
|
|
3721
3983
|
"UpdateIndex": doUpdateIndex,
|
|
3984
|
+
"DescribeLogstashInstanceOperations": doDescribeLogstashInstanceOperations,
|
|
3722
3985
|
"DescribeInstances": doDescribeInstances,
|
|
3723
3986
|
"UpdateServerlessSpace": doUpdateServerlessSpace,
|
|
3724
3987
|
"StartLogstashPipelines": doStartLogstashPipelines,
|
|
@@ -3730,16 +3993,18 @@ ACTION_MAP = {
|
|
|
3730
3993
|
"RestartNodes": doRestartNodes,
|
|
3731
3994
|
"ParseDocumentAsync": doParseDocumentAsync,
|
|
3732
3995
|
"DescribeServerlessSpaceUser": doDescribeServerlessSpaceUser,
|
|
3996
|
+
"RestartLogstashInstance": doRestartLogstashInstance,
|
|
3733
3997
|
"DeleteIndex": doDeleteIndex,
|
|
3734
3998
|
"SaveAndDeployLogstashPipeline": doSaveAndDeployLogstashPipeline,
|
|
3735
3999
|
"DeleteLogstashPipelines": doDeleteLogstashPipelines,
|
|
4000
|
+
"UpdateIpTraceStatus": doUpdateIpTraceStatus,
|
|
3736
4001
|
"UpgradeLicense": doUpgradeLicense,
|
|
3737
4002
|
"DescribeInstancePluginList": doDescribeInstancePluginList,
|
|
3738
4003
|
"DescribeServerlessInstances": doDescribeServerlessInstances,
|
|
3739
4004
|
"DescribeIndexMeta": doDescribeIndexMeta,
|
|
3740
4005
|
"ChatCompletions": doChatCompletions,
|
|
3741
4006
|
"ChunkDocument": doChunkDocument,
|
|
3742
|
-
"
|
|
4007
|
+
"GetMultiModalEmbedding": doGetMultiModalEmbedding,
|
|
3743
4008
|
"InquirePriceRenewInstance": doInquirePriceRenewInstance,
|
|
3744
4009
|
"CreateClusterSnapshot": doCreateClusterSnapshot,
|
|
3745
4010
|
|