tccli 3.0.1344.1__py2.py3-none-any.whl → 3.0.1345.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tccli/__init__.py +1 -1
- tccli/services/aiart/aiart_client.py +167 -61
- tccli/services/aiart/v20221229/api.json +253 -0
- tccli/services/aiart/v20221229/examples.json +16 -0
- tccli/services/apm/v20210622/api.json +228 -0
- tccli/services/apm/v20210622/examples.json +1 -1
- tccli/services/batch/v20170312/api.json +2 -2
- tccli/services/ccc/ccc_client.py +61 -8
- tccli/services/ccc/v20200210/api.json +121 -0
- tccli/services/ccc/v20200210/examples.json +8 -0
- tccli/services/cdb/v20170320/api.json +65 -65
- tccli/services/cdb/v20170320/examples.json +2 -2
- tccli/services/csip/csip_client.py +167 -8
- tccli/services/csip/v20221121/api.json +877 -0
- tccli/services/csip/v20221121/examples.json +36 -0
- tccli/services/emr/v20190103/api.json +22 -1
- tccli/services/ess/v20201111/api.json +42 -2
- tccli/services/essbasic/v20210526/api.json +21 -1
- tccli/services/gs/v20191118/api.json +1 -1
- tccli/services/mps/v20190612/api.json +2 -2
- tccli/services/oceanus/v20190422/api.json +168 -8
- tccli/services/redis/v20180412/api.json +9 -0
- tccli/services/trocket/v20230308/api.json +1 -1
- tccli/services/trtc/v20190722/api.json +29 -0
- tccli/services/waf/v20180125/api.json +52 -2
- {tccli-3.0.1344.1.dist-info → tccli-3.0.1345.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1344.1.dist-info → tccli-3.0.1345.1.dist-info}/RECORD +30 -30
- {tccli-3.0.1344.1.dist-info → tccli-3.0.1345.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1344.1.dist-info → tccli-3.0.1345.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1344.1.dist-info → tccli-3.0.1345.1.dist-info}/license_files/LICENSE +0 -0
@@ -1213,7 +1213,7 @@ def doDescribeCFWAssetStatistics(args, parsed_globals):
|
|
1213
1213
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1214
1214
|
|
1215
1215
|
|
1216
|
-
def
|
1216
|
+
def doDescribeCallRecord(args, parsed_globals):
|
1217
1217
|
g_param = parse_global_arg(parsed_globals)
|
1218
1218
|
|
1219
1219
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1242,11 +1242,11 @@ def doDescribeAssetViewVulRiskList(args, parsed_globals):
|
|
1242
1242
|
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
1243
1243
|
client._sdkVersion += ("_CLI_" + __version__)
|
1244
1244
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1245
|
-
model = models.
|
1245
|
+
model = models.DescribeCallRecordRequest()
|
1246
1246
|
model.from_json_string(json.dumps(args))
|
1247
1247
|
start_time = time.time()
|
1248
1248
|
while True:
|
1249
|
-
rsp = client.
|
1249
|
+
rsp = client.DescribeCallRecord(model)
|
1250
1250
|
result = rsp.to_json_string()
|
1251
1251
|
try:
|
1252
1252
|
json_obj = json.loads(result)
|
@@ -1577,6 +1577,58 @@ def doDescribeVulRiskList(args, parsed_globals):
|
|
1577
1577
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1578
1578
|
|
1579
1579
|
|
1580
|
+
def doDescribeAssetProcessList(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.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
1607
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1608
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1609
|
+
model = models.DescribeAssetProcessListRequest()
|
1610
|
+
model.from_json_string(json.dumps(args))
|
1611
|
+
start_time = time.time()
|
1612
|
+
while True:
|
1613
|
+
rsp = client.DescribeAssetProcessList(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 doModifyUebaRuleSwitch(args, parsed_globals):
|
1581
1633
|
g_param = parse_global_arg(parsed_globals)
|
1582
1634
|
|
@@ -2513,7 +2565,7 @@ def doDescribeScanTaskList(args, parsed_globals):
|
|
2513
2565
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2514
2566
|
|
2515
2567
|
|
2516
|
-
def
|
2568
|
+
def doDescribeSourceIPAsset(args, parsed_globals):
|
2517
2569
|
g_param = parse_global_arg(parsed_globals)
|
2518
2570
|
|
2519
2571
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2542,11 +2594,11 @@ def doDescribeAssetProcessList(args, parsed_globals):
|
|
2542
2594
|
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
2543
2595
|
client._sdkVersion += ("_CLI_" + __version__)
|
2544
2596
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2545
|
-
model = models.
|
2597
|
+
model = models.DescribeSourceIPAssetRequest()
|
2546
2598
|
model.from_json_string(json.dumps(args))
|
2547
2599
|
start_time = time.time()
|
2548
2600
|
while True:
|
2549
|
-
rsp = client.
|
2601
|
+
rsp = client.DescribeSourceIPAsset(model)
|
2550
2602
|
result = rsp.to_json_string()
|
2551
2603
|
try:
|
2552
2604
|
json_obj = json.loads(result)
|
@@ -3293,6 +3345,110 @@ def doDescribeRepositoryImageAssets(args, parsed_globals):
|
|
3293
3345
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3294
3346
|
|
3295
3347
|
|
3348
|
+
def doDescribeAccessKeyAsset(args, parsed_globals):
|
3349
|
+
g_param = parse_global_arg(parsed_globals)
|
3350
|
+
|
3351
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3352
|
+
cred = credential.CVMRoleCredential()
|
3353
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3354
|
+
cred = credential.STSAssumeRoleCredential(
|
3355
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3356
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3357
|
+
)
|
3358
|
+
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):
|
3359
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3360
|
+
else:
|
3361
|
+
cred = credential.Credential(
|
3362
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3363
|
+
)
|
3364
|
+
http_profile = HttpProfile(
|
3365
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3366
|
+
reqMethod="POST",
|
3367
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3368
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3369
|
+
)
|
3370
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3371
|
+
if g_param[OptionsDefine.Language]:
|
3372
|
+
profile.language = g_param[OptionsDefine.Language]
|
3373
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3374
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
3375
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3376
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3377
|
+
model = models.DescribeAccessKeyAssetRequest()
|
3378
|
+
model.from_json_string(json.dumps(args))
|
3379
|
+
start_time = time.time()
|
3380
|
+
while True:
|
3381
|
+
rsp = client.DescribeAccessKeyAsset(model)
|
3382
|
+
result = rsp.to_json_string()
|
3383
|
+
try:
|
3384
|
+
json_obj = json.loads(result)
|
3385
|
+
except TypeError as e:
|
3386
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3387
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3388
|
+
break
|
3389
|
+
cur_time = time.time()
|
3390
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3391
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3392
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3393
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3394
|
+
else:
|
3395
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3396
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3397
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3398
|
+
|
3399
|
+
|
3400
|
+
def doDescribeAssetViewVulRiskList(args, parsed_globals):
|
3401
|
+
g_param = parse_global_arg(parsed_globals)
|
3402
|
+
|
3403
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3404
|
+
cred = credential.CVMRoleCredential()
|
3405
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3406
|
+
cred = credential.STSAssumeRoleCredential(
|
3407
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3408
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3409
|
+
)
|
3410
|
+
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):
|
3411
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3412
|
+
else:
|
3413
|
+
cred = credential.Credential(
|
3414
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3415
|
+
)
|
3416
|
+
http_profile = HttpProfile(
|
3417
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3418
|
+
reqMethod="POST",
|
3419
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3420
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3421
|
+
)
|
3422
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3423
|
+
if g_param[OptionsDefine.Language]:
|
3424
|
+
profile.language = g_param[OptionsDefine.Language]
|
3425
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3426
|
+
client = mod.CsipClient(cred, g_param[OptionsDefine.Region], profile)
|
3427
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3428
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3429
|
+
model = models.DescribeAssetViewVulRiskListRequest()
|
3430
|
+
model.from_json_string(json.dumps(args))
|
3431
|
+
start_time = time.time()
|
3432
|
+
while True:
|
3433
|
+
rsp = client.DescribeAssetViewVulRiskList(model)
|
3434
|
+
result = rsp.to_json_string()
|
3435
|
+
try:
|
3436
|
+
json_obj = json.loads(result)
|
3437
|
+
except TypeError as e:
|
3438
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3439
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3440
|
+
break
|
3441
|
+
cur_time = time.time()
|
3442
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3443
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3444
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3445
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3446
|
+
else:
|
3447
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3448
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3449
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3450
|
+
|
3451
|
+
|
3296
3452
|
def doDescribeDbAssets(args, parsed_globals):
|
3297
3453
|
g_param = parse_global_arg(parsed_globals)
|
3298
3454
|
|
@@ -3431,13 +3587,14 @@ ACTION_MAP = {
|
|
3431
3587
|
"DescribeCVMAssets": doDescribeCVMAssets,
|
3432
3588
|
"ModifyRiskCenterScanTask": doModifyRiskCenterScanTask,
|
3433
3589
|
"DescribeCFWAssetStatistics": doDescribeCFWAssetStatistics,
|
3434
|
-
"
|
3590
|
+
"DescribeCallRecord": doDescribeCallRecord,
|
3435
3591
|
"DescribeVULRiskDetail": doDescribeVULRiskDetail,
|
3436
3592
|
"DescribeCheckViewRisks": doDescribeCheckViewRisks,
|
3437
3593
|
"DescribeRiskCenterWebsiteRiskList": doDescribeRiskCenterWebsiteRiskList,
|
3438
3594
|
"DescribeOrganizationInfo": doDescribeOrganizationInfo,
|
3439
3595
|
"StopRiskCenterTask": doStopRiskCenterTask,
|
3440
3596
|
"DescribeVulRiskList": doDescribeVulRiskList,
|
3597
|
+
"DescribeAssetProcessList": doDescribeAssetProcessList,
|
3441
3598
|
"ModifyUebaRuleSwitch": doModifyUebaRuleSwitch,
|
3442
3599
|
"DescribeRiskRules": doDescribeRiskRules,
|
3443
3600
|
"DescribeExposePath": doDescribeExposePath,
|
@@ -3456,7 +3613,7 @@ ACTION_MAP = {
|
|
3456
3613
|
"DescribeScanStatistic": doDescribeScanStatistic,
|
3457
3614
|
"DescribeExposeAssetCategory": doDescribeExposeAssetCategory,
|
3458
3615
|
"DescribeScanTaskList": doDescribeScanTaskList,
|
3459
|
-
"
|
3616
|
+
"DescribeSourceIPAsset": doDescribeSourceIPAsset,
|
3460
3617
|
"CreateRiskCenterScanTask": doCreateRiskCenterScanTask,
|
3461
3618
|
"DescribeRiskCenterPortViewPortRiskList": doDescribeRiskCenterPortViewPortRiskList,
|
3462
3619
|
"DescribeRiskCenterAssetViewPortRiskList": doDescribeRiskCenterAssetViewPortRiskList,
|
@@ -3471,6 +3628,8 @@ ACTION_MAP = {
|
|
3471
3628
|
"DescribeClusterAssets": doDescribeClusterAssets,
|
3472
3629
|
"DescribeTaskLogURL": doDescribeTaskLogURL,
|
3473
3630
|
"DescribeRepositoryImageAssets": doDescribeRepositoryImageAssets,
|
3631
|
+
"DescribeAccessKeyAsset": doDescribeAccessKeyAsset,
|
3632
|
+
"DescribeAssetViewVulRiskList": doDescribeAssetViewVulRiskList,
|
3474
3633
|
"DescribeDbAssets": doDescribeDbAssets,
|
3475
3634
|
"DescribeCVMAssetInfo": doDescribeCVMAssetInfo,
|
3476
3635
|
|