tccli 3.0.860.1__py2.py3-none-any.whl → 3.0.861.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/cwp/v20180228/api.json +2 -2
- tccli/services/ess/ess_client.py +106 -0
- tccli/services/ess/v20201111/api.json +122 -0
- tccli/services/ess/v20201111/examples.json +28 -0
- tccli/services/ims/v20200713/examples.json +1 -1
- tccli/services/ims/v20201229/examples.json +1 -1
- tccli/services/rum/rum_client.py +261 -49
- tccli/services/rum/v20210622/api.json +478 -0
- tccli/services/rum/v20210622/examples.json +32 -0
- tccli/services/trp/trp_client.py +176 -17
- tccli/services/trp/v20210515/api.json +207 -0
- tccli/services/trp/v20210515/examples.json +24 -0
- tccli/services/waf/v20180125/api.json +288 -0
- tccli/services/waf/v20180125/examples.json +16 -0
- tccli/services/waf/waf_client.py +114 -8
- {tccli-3.0.860.1.dist-info → tccli-3.0.861.1.dist-info}/METADATA +2 -2
- {tccli-3.0.860.1.dist-info → tccli-3.0.861.1.dist-info}/RECORD +22 -22
- {tccli-3.0.860.1.dist-info → tccli-3.0.861.1.dist-info}/LICENSE +0 -0
- {tccli-3.0.860.1.dist-info → tccli-3.0.861.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.860.1.dist-info → tccli-3.0.861.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.860.1.dist-info → tccli-3.0.861.1.dist-info}/top_level.txt +0 -0
tccli/services/rum/rum_client.py
CHANGED
@@ -381,7 +381,7 @@ def doDescribeDataLogUrlStatistics(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 doDeleteOfflineLogConfig(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 doDescribeDataFetchProject(args, parsed_globals):
|
|
410
410
|
client = mod.RumClient(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.DeleteOfflineLogConfigRequest()
|
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.DeleteOfflineLogConfig(model)
|
418
418
|
result = rsp.to_json_string()
|
419
419
|
try:
|
420
420
|
json_obj = json.loads(result)
|
@@ -953,7 +953,7 @@ def doDescribeDataReportCount(args, parsed_globals):
|
|
953
953
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
954
954
|
|
955
955
|
|
956
|
-
def
|
956
|
+
def doDescribeAppSingleCaseList(args, parsed_globals):
|
957
957
|
g_param = parse_global_arg(parsed_globals)
|
958
958
|
|
959
959
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -982,11 +982,11 @@ def doModifyProjectLimit(args, parsed_globals):
|
|
982
982
|
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
983
983
|
client._sdkVersion += ("_CLI_" + __version__)
|
984
984
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
985
|
-
model = models.
|
985
|
+
model = models.DescribeAppSingleCaseListRequest()
|
986
986
|
model.from_json_string(json.dumps(args))
|
987
987
|
start_time = time.time()
|
988
988
|
while True:
|
989
|
-
rsp = client.
|
989
|
+
rsp = client.DescribeAppSingleCaseList(model)
|
990
990
|
result = rsp.to_json_string()
|
991
991
|
try:
|
992
992
|
json_obj = json.loads(result)
|
@@ -1369,7 +1369,7 @@ def doDescribeData(args, parsed_globals):
|
|
1369
1369
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1370
1370
|
|
1371
1371
|
|
1372
|
-
def
|
1372
|
+
def doDescribeAppSingleCaseDetailList(args, parsed_globals):
|
1373
1373
|
g_param = parse_global_arg(parsed_globals)
|
1374
1374
|
|
1375
1375
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1398,11 +1398,63 @@ def doDescribeReleaseFileSign(args, parsed_globals):
|
|
1398
1398
|
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
1399
1399
|
client._sdkVersion += ("_CLI_" + __version__)
|
1400
1400
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1401
|
-
model = models.
|
1401
|
+
model = models.DescribeAppSingleCaseDetailListRequest()
|
1402
1402
|
model.from_json_string(json.dumps(args))
|
1403
1403
|
start_time = time.time()
|
1404
1404
|
while True:
|
1405
|
-
rsp = client.
|
1405
|
+
rsp = client.DescribeAppSingleCaseDetailList(model)
|
1406
|
+
result = rsp.to_json_string()
|
1407
|
+
try:
|
1408
|
+
json_obj = json.loads(result)
|
1409
|
+
except TypeError as e:
|
1410
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1411
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1412
|
+
break
|
1413
|
+
cur_time = time.time()
|
1414
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1415
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1416
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1417
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1418
|
+
else:
|
1419
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1420
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1421
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1422
|
+
|
1423
|
+
|
1424
|
+
def doDescribeAppMetricsData(args, parsed_globals):
|
1425
|
+
g_param = parse_global_arg(parsed_globals)
|
1426
|
+
|
1427
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1428
|
+
cred = credential.CVMRoleCredential()
|
1429
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1430
|
+
cred = credential.STSAssumeRoleCredential(
|
1431
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1432
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1433
|
+
)
|
1434
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1435
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1436
|
+
else:
|
1437
|
+
cred = credential.Credential(
|
1438
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1439
|
+
)
|
1440
|
+
http_profile = HttpProfile(
|
1441
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1442
|
+
reqMethod="POST",
|
1443
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1444
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1445
|
+
)
|
1446
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1447
|
+
if g_param[OptionsDefine.Language]:
|
1448
|
+
profile.language = g_param[OptionsDefine.Language]
|
1449
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1450
|
+
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
1451
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1452
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1453
|
+
model = models.DescribeAppMetricsDataRequest()
|
1454
|
+
model.from_json_string(json.dumps(args))
|
1455
|
+
start_time = time.time()
|
1456
|
+
while True:
|
1457
|
+
rsp = client.DescribeAppMetricsData(model)
|
1406
1458
|
result = rsp.to_json_string()
|
1407
1459
|
try:
|
1408
1460
|
json_obj = json.loads(result)
|
@@ -1525,6 +1577,58 @@ def doDescribeDataSetUrlStatistics(args, parsed_globals):
|
|
1525
1577
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1526
1578
|
|
1527
1579
|
|
1580
|
+
def doModifyProjectLimit(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('-', '_')]
|
1589
|
+
)
|
1590
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_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.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
1607
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1608
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1609
|
+
model = models.ModifyProjectLimitRequest()
|
1610
|
+
model.from_json_string(json.dumps(args))
|
1611
|
+
start_time = time.time()
|
1612
|
+
while True:
|
1613
|
+
rsp = client.ModifyProjectLimit(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
|
+
|
1528
1632
|
def doDescribeDataStaticResource(args, parsed_globals):
|
1529
1633
|
g_param = parse_global_arg(parsed_globals)
|
1530
1634
|
|
@@ -1629,6 +1733,58 @@ def doDescribeProjectLimits(args, parsed_globals):
|
|
1629
1733
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1630
1734
|
|
1631
1735
|
|
1736
|
+
def doDescribeAppDimensionMetrics(args, parsed_globals):
|
1737
|
+
g_param = parse_global_arg(parsed_globals)
|
1738
|
+
|
1739
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1740
|
+
cred = credential.CVMRoleCredential()
|
1741
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1742
|
+
cred = credential.STSAssumeRoleCredential(
|
1743
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1744
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1745
|
+
)
|
1746
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1747
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1748
|
+
else:
|
1749
|
+
cred = credential.Credential(
|
1750
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1751
|
+
)
|
1752
|
+
http_profile = HttpProfile(
|
1753
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1754
|
+
reqMethod="POST",
|
1755
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1756
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1757
|
+
)
|
1758
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1759
|
+
if g_param[OptionsDefine.Language]:
|
1760
|
+
profile.language = g_param[OptionsDefine.Language]
|
1761
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1762
|
+
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
1763
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1764
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1765
|
+
model = models.DescribeAppDimensionMetricsRequest()
|
1766
|
+
model.from_json_string(json.dumps(args))
|
1767
|
+
start_time = time.time()
|
1768
|
+
while True:
|
1769
|
+
rsp = client.DescribeAppDimensionMetrics(model)
|
1770
|
+
result = rsp.to_json_string()
|
1771
|
+
try:
|
1772
|
+
json_obj = json.loads(result)
|
1773
|
+
except TypeError as e:
|
1774
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1775
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1776
|
+
break
|
1777
|
+
cur_time = time.time()
|
1778
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1779
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1780
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1781
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1782
|
+
else:
|
1783
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1784
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1785
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1786
|
+
|
1787
|
+
|
1632
1788
|
def doDescribeDataCustomUrl(args, parsed_globals):
|
1633
1789
|
g_param = parse_global_arg(parsed_globals)
|
1634
1790
|
|
@@ -1941,7 +2097,7 @@ def doDescribeRumLogList(args, parsed_globals):
|
|
1941
2097
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1942
2098
|
|
1943
2099
|
|
1944
|
-
def
|
2100
|
+
def doDescribeDataFetchUrlInfo(args, parsed_globals):
|
1945
2101
|
g_param = parse_global_arg(parsed_globals)
|
1946
2102
|
|
1947
2103
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1970,11 +2126,11 @@ def doCreateTawInstance(args, parsed_globals):
|
|
1970
2126
|
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
1971
2127
|
client._sdkVersion += ("_CLI_" + __version__)
|
1972
2128
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1973
|
-
model = models.
|
2129
|
+
model = models.DescribeDataFetchUrlInfoRequest()
|
1974
2130
|
model.from_json_string(json.dumps(args))
|
1975
2131
|
start_time = time.time()
|
1976
2132
|
while True:
|
1977
|
-
rsp = client.
|
2133
|
+
rsp = client.DescribeDataFetchUrlInfo(model)
|
1978
2134
|
result = rsp.to_json_string()
|
1979
2135
|
try:
|
1980
2136
|
json_obj = json.loads(result)
|
@@ -2097,7 +2253,7 @@ def doModifyProject(args, parsed_globals):
|
|
2097
2253
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2098
2254
|
|
2099
2255
|
|
2100
|
-
def
|
2256
|
+
def doDeleteWhitelist(args, parsed_globals):
|
2101
2257
|
g_param = parse_global_arg(parsed_globals)
|
2102
2258
|
|
2103
2259
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2126,11 +2282,11 @@ def doDescribeDataFetchUrlInfo(args, parsed_globals):
|
|
2126
2282
|
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
2127
2283
|
client._sdkVersion += ("_CLI_" + __version__)
|
2128
2284
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2129
|
-
model = models.
|
2285
|
+
model = models.DeleteWhitelistRequest()
|
2130
2286
|
model.from_json_string(json.dumps(args))
|
2131
2287
|
start_time = time.time()
|
2132
2288
|
while True:
|
2133
|
-
rsp = client.
|
2289
|
+
rsp = client.DeleteWhitelist(model)
|
2134
2290
|
result = rsp.to_json_string()
|
2135
2291
|
try:
|
2136
2292
|
json_obj = json.loads(result)
|
@@ -2149,7 +2305,7 @@ def doDescribeDataFetchUrlInfo(args, parsed_globals):
|
|
2149
2305
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2150
2306
|
|
2151
2307
|
|
2152
|
-
def
|
2308
|
+
def doDeleteReleaseFile(args, parsed_globals):
|
2153
2309
|
g_param = parse_global_arg(parsed_globals)
|
2154
2310
|
|
2155
2311
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2178,11 +2334,11 @@ def doDeleteWhitelist(args, parsed_globals):
|
|
2178
2334
|
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
2179
2335
|
client._sdkVersion += ("_CLI_" + __version__)
|
2180
2336
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2181
|
-
model = models.
|
2337
|
+
model = models.DeleteReleaseFileRequest()
|
2182
2338
|
model.from_json_string(json.dumps(args))
|
2183
2339
|
start_time = time.time()
|
2184
2340
|
while True:
|
2185
|
-
rsp = client.
|
2341
|
+
rsp = client.DeleteReleaseFile(model)
|
2186
2342
|
result = rsp.to_json_string()
|
2187
2343
|
try:
|
2188
2344
|
json_obj = json.loads(result)
|
@@ -2201,7 +2357,7 @@ def doDeleteWhitelist(args, parsed_globals):
|
|
2201
2357
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2202
2358
|
|
2203
2359
|
|
2204
|
-
def
|
2360
|
+
def doDeleteLogExport(args, parsed_globals):
|
2205
2361
|
g_param = parse_global_arg(parsed_globals)
|
2206
2362
|
|
2207
2363
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2230,11 +2386,11 @@ def doDeleteReleaseFile(args, parsed_globals):
|
|
2230
2386
|
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
2231
2387
|
client._sdkVersion += ("_CLI_" + __version__)
|
2232
2388
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2233
|
-
model = models.
|
2389
|
+
model = models.DeleteLogExportRequest()
|
2234
2390
|
model.from_json_string(json.dumps(args))
|
2235
2391
|
start_time = time.time()
|
2236
2392
|
while True:
|
2237
|
-
rsp = client.
|
2393
|
+
rsp = client.DeleteLogExport(model)
|
2238
2394
|
result = rsp.to_json_string()
|
2239
2395
|
try:
|
2240
2396
|
json_obj = json.loads(result)
|
@@ -2253,7 +2409,7 @@ def doDeleteReleaseFile(args, parsed_globals):
|
|
2253
2409
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2254
2410
|
|
2255
2411
|
|
2256
|
-
def
|
2412
|
+
def doDescribeWhitelists(args, parsed_globals):
|
2257
2413
|
g_param = parse_global_arg(parsed_globals)
|
2258
2414
|
|
2259
2415
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2282,11 +2438,11 @@ def doDeleteLogExport(args, parsed_globals):
|
|
2282
2438
|
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
2283
2439
|
client._sdkVersion += ("_CLI_" + __version__)
|
2284
2440
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2285
|
-
model = models.
|
2441
|
+
model = models.DescribeWhitelistsRequest()
|
2286
2442
|
model.from_json_string(json.dumps(args))
|
2287
2443
|
start_time = time.time()
|
2288
2444
|
while True:
|
2289
|
-
rsp = client.
|
2445
|
+
rsp = client.DescribeWhitelists(model)
|
2290
2446
|
result = rsp.to_json_string()
|
2291
2447
|
try:
|
2292
2448
|
json_obj = json.loads(result)
|
@@ -2305,7 +2461,7 @@ def doDeleteLogExport(args, parsed_globals):
|
|
2305
2461
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2306
2462
|
|
2307
2463
|
|
2308
|
-
def
|
2464
|
+
def doDescribeDataEventUrl(args, parsed_globals):
|
2309
2465
|
g_param = parse_global_arg(parsed_globals)
|
2310
2466
|
|
2311
2467
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2334,11 +2490,11 @@ def doDescribeWhitelists(args, parsed_globals):
|
|
2334
2490
|
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
2335
2491
|
client._sdkVersion += ("_CLI_" + __version__)
|
2336
2492
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2337
|
-
model = models.
|
2493
|
+
model = models.DescribeDataEventUrlRequest()
|
2338
2494
|
model.from_json_string(json.dumps(args))
|
2339
2495
|
start_time = time.time()
|
2340
2496
|
while True:
|
2341
|
-
rsp = client.
|
2497
|
+
rsp = client.DescribeDataEventUrl(model)
|
2342
2498
|
result = rsp.to_json_string()
|
2343
2499
|
try:
|
2344
2500
|
json_obj = json.loads(result)
|
@@ -2357,7 +2513,7 @@ def doDescribeWhitelists(args, parsed_globals):
|
|
2357
2513
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2358
2514
|
|
2359
2515
|
|
2360
|
-
def
|
2516
|
+
def doDeleteOfflineLogRecord(args, parsed_globals):
|
2361
2517
|
g_param = parse_global_arg(parsed_globals)
|
2362
2518
|
|
2363
2519
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2386,11 +2542,11 @@ def doDescribeDataEventUrl(args, parsed_globals):
|
|
2386
2542
|
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
2387
2543
|
client._sdkVersion += ("_CLI_" + __version__)
|
2388
2544
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2389
|
-
model = models.
|
2545
|
+
model = models.DeleteOfflineLogRecordRequest()
|
2390
2546
|
model.from_json_string(json.dumps(args))
|
2391
2547
|
start_time = time.time()
|
2392
2548
|
while True:
|
2393
|
-
rsp = client.
|
2549
|
+
rsp = client.DeleteOfflineLogRecord(model)
|
2394
2550
|
result = rsp.to_json_string()
|
2395
2551
|
try:
|
2396
2552
|
json_obj = json.loads(result)
|
@@ -2409,7 +2565,7 @@ def doDescribeDataEventUrl(args, parsed_globals):
|
|
2409
2565
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2410
2566
|
|
2411
2567
|
|
2412
|
-
def
|
2568
|
+
def doDescribeOfflineLogConfigs(args, parsed_globals):
|
2413
2569
|
g_param = parse_global_arg(parsed_globals)
|
2414
2570
|
|
2415
2571
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2438,11 +2594,11 @@ def doDeleteOfflineLogRecord(args, parsed_globals):
|
|
2438
2594
|
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
2439
2595
|
client._sdkVersion += ("_CLI_" + __version__)
|
2440
2596
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2441
|
-
model = models.
|
2597
|
+
model = models.DescribeOfflineLogConfigsRequest()
|
2442
2598
|
model.from_json_string(json.dumps(args))
|
2443
2599
|
start_time = time.time()
|
2444
2600
|
while True:
|
2445
|
-
rsp = client.
|
2601
|
+
rsp = client.DescribeOfflineLogConfigs(model)
|
2446
2602
|
result = rsp.to_json_string()
|
2447
2603
|
try:
|
2448
2604
|
json_obj = json.loads(result)
|
@@ -2461,7 +2617,7 @@ def doDeleteOfflineLogRecord(args, parsed_globals):
|
|
2461
2617
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2462
2618
|
|
2463
2619
|
|
2464
|
-
def
|
2620
|
+
def doDescribeReleaseFileSign(args, parsed_globals):
|
2465
2621
|
g_param = parse_global_arg(parsed_globals)
|
2466
2622
|
|
2467
2623
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2490,11 +2646,11 @@ def doDescribeOfflineLogConfigs(args, parsed_globals):
|
|
2490
2646
|
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
2491
2647
|
client._sdkVersion += ("_CLI_" + __version__)
|
2492
2648
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2493
|
-
model = models.
|
2649
|
+
model = models.DescribeReleaseFileSignRequest()
|
2494
2650
|
model.from_json_string(json.dumps(args))
|
2495
2651
|
start_time = time.time()
|
2496
2652
|
while True:
|
2497
|
-
rsp = client.
|
2653
|
+
rsp = client.DescribeReleaseFileSign(model)
|
2498
2654
|
result = rsp.to_json_string()
|
2499
2655
|
try:
|
2500
2656
|
json_obj = json.loads(result)
|
@@ -2565,6 +2721,58 @@ def doDescribeScores(args, parsed_globals):
|
|
2565
2721
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2566
2722
|
|
2567
2723
|
|
2724
|
+
def doDescribeUvList(args, parsed_globals):
|
2725
|
+
g_param = parse_global_arg(parsed_globals)
|
2726
|
+
|
2727
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
2728
|
+
cred = credential.CVMRoleCredential()
|
2729
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
2730
|
+
cred = credential.STSAssumeRoleCredential(
|
2731
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
2732
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
2733
|
+
)
|
2734
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
2735
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
2736
|
+
else:
|
2737
|
+
cred = credential.Credential(
|
2738
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
2739
|
+
)
|
2740
|
+
http_profile = HttpProfile(
|
2741
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
2742
|
+
reqMethod="POST",
|
2743
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
2744
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
2745
|
+
)
|
2746
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
2747
|
+
if g_param[OptionsDefine.Language]:
|
2748
|
+
profile.language = g_param[OptionsDefine.Language]
|
2749
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
2750
|
+
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
2751
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
2752
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2753
|
+
model = models.DescribeUvListRequest()
|
2754
|
+
model.from_json_string(json.dumps(args))
|
2755
|
+
start_time = time.time()
|
2756
|
+
while True:
|
2757
|
+
rsp = client.DescribeUvList(model)
|
2758
|
+
result = rsp.to_json_string()
|
2759
|
+
try:
|
2760
|
+
json_obj = json.loads(result)
|
2761
|
+
except TypeError as e:
|
2762
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
2763
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
2764
|
+
break
|
2765
|
+
cur_time = time.time()
|
2766
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
2767
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
2768
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
2769
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
2770
|
+
else:
|
2771
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
2772
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
2773
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2774
|
+
|
2775
|
+
|
2568
2776
|
def doCreateProject(args, parsed_globals):
|
2569
2777
|
g_param = parse_global_arg(parsed_globals)
|
2570
2778
|
|
@@ -2877,7 +3085,7 @@ def doDescribeOfflineLogRecords(args, parsed_globals):
|
|
2877
3085
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2878
3086
|
|
2879
3087
|
|
2880
|
-
def
|
3088
|
+
def doCreateTawInstance(args, parsed_globals):
|
2881
3089
|
g_param = parse_global_arg(parsed_globals)
|
2882
3090
|
|
2883
3091
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2906,11 +3114,11 @@ def doDescribeUvList(args, parsed_globals):
|
|
2906
3114
|
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
2907
3115
|
client._sdkVersion += ("_CLI_" + __version__)
|
2908
3116
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2909
|
-
model = models.
|
3117
|
+
model = models.CreateTawInstanceRequest()
|
2910
3118
|
model.from_json_string(json.dumps(args))
|
2911
3119
|
start_time = time.time()
|
2912
3120
|
while True:
|
2913
|
-
rsp = client.
|
3121
|
+
rsp = client.CreateTawInstance(model)
|
2914
3122
|
result = rsp.to_json_string()
|
2915
3123
|
try:
|
2916
3124
|
json_obj = json.loads(result)
|
@@ -2929,7 +3137,7 @@ def doDescribeUvList(args, parsed_globals):
|
|
2929
3137
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
2930
3138
|
|
2931
3139
|
|
2932
|
-
def
|
3140
|
+
def doDescribeDataFetchProject(args, parsed_globals):
|
2933
3141
|
g_param = parse_global_arg(parsed_globals)
|
2934
3142
|
|
2935
3143
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -2958,11 +3166,11 @@ def doDeleteOfflineLogConfig(args, parsed_globals):
|
|
2958
3166
|
client = mod.RumClient(cred, g_param[OptionsDefine.Region], profile)
|
2959
3167
|
client._sdkVersion += ("_CLI_" + __version__)
|
2960
3168
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
2961
|
-
model = models.
|
3169
|
+
model = models.DescribeDataFetchProjectRequest()
|
2962
3170
|
model.from_json_string(json.dumps(args))
|
2963
3171
|
start_time = time.time()
|
2964
3172
|
while True:
|
2965
|
-
rsp = client.
|
3173
|
+
rsp = client.DescribeDataFetchProject(model)
|
2966
3174
|
result = rsp.to_json_string()
|
2967
3175
|
try:
|
2968
3176
|
json_obj = json.loads(result)
|
@@ -3207,7 +3415,7 @@ ACTION_MAP = {
|
|
3207
3415
|
"DescribeTawInstances": doDescribeTawInstances,
|
3208
3416
|
"DescribeDataPerformancePage": doDescribeDataPerformancePage,
|
3209
3417
|
"DescribeDataLogUrlStatistics": doDescribeDataLogUrlStatistics,
|
3210
|
-
"
|
3418
|
+
"DeleteOfflineLogConfig": doDeleteOfflineLogConfig,
|
3211
3419
|
"DeleteInstance": doDeleteInstance,
|
3212
3420
|
"DescribeRumLogExport": doDescribeRumLogExport,
|
3213
3421
|
"DeleteStarProject": doDeleteStarProject,
|
@@ -3218,7 +3426,7 @@ ACTION_MAP = {
|
|
3218
3426
|
"DescribeLogList": doDescribeLogList,
|
3219
3427
|
"DescribeOfflineLogs": doDescribeOfflineLogs,
|
3220
3428
|
"DescribeDataReportCount": doDescribeDataReportCount,
|
3221
|
-
"
|
3429
|
+
"DescribeAppSingleCaseList": doDescribeAppSingleCaseList,
|
3222
3430
|
"DescribePvList": doDescribePvList,
|
3223
3431
|
"DescribeDataPvUrlStatistics": doDescribeDataPvUrlStatistics,
|
3224
3432
|
"DescribeDataWebVitalsPage": doDescribeDataWebVitalsPage,
|
@@ -3226,21 +3434,23 @@ ACTION_MAP = {
|
|
3226
3434
|
"DescribeDataStaticUrl": doDescribeDataStaticUrl,
|
3227
3435
|
"DescribeLogExports": doDescribeLogExports,
|
3228
3436
|
"DescribeData": doDescribeData,
|
3229
|
-
"
|
3437
|
+
"DescribeAppSingleCaseDetailList": doDescribeAppSingleCaseDetailList,
|
3438
|
+
"DescribeAppMetricsData": doDescribeAppMetricsData,
|
3230
3439
|
"CreateLogExport": doCreateLogExport,
|
3231
3440
|
"DescribeDataSetUrlStatistics": doDescribeDataSetUrlStatistics,
|
3441
|
+
"ModifyProjectLimit": doModifyProjectLimit,
|
3232
3442
|
"DescribeDataStaticResource": doDescribeDataStaticResource,
|
3233
3443
|
"DescribeProjectLimits": doDescribeProjectLimits,
|
3444
|
+
"DescribeAppDimensionMetrics": doDescribeAppDimensionMetrics,
|
3234
3445
|
"DescribeDataCustomUrl": doDescribeDataCustomUrl,
|
3235
3446
|
"CreateWhitelist": doCreateWhitelist,
|
3236
3447
|
"DescribeProjects": doDescribeProjects,
|
3237
3448
|
"StopProject": doStopProject,
|
3238
3449
|
"CreateStarProject": doCreateStarProject,
|
3239
3450
|
"DescribeRumLogList": doDescribeRumLogList,
|
3240
|
-
"
|
3451
|
+
"DescribeDataFetchUrlInfo": doDescribeDataFetchUrlInfo,
|
3241
3452
|
"StopInstance": doStopInstance,
|
3242
3453
|
"ModifyProject": doModifyProject,
|
3243
|
-
"DescribeDataFetchUrlInfo": doDescribeDataFetchUrlInfo,
|
3244
3454
|
"DeleteWhitelist": doDeleteWhitelist,
|
3245
3455
|
"DeleteReleaseFile": doDeleteReleaseFile,
|
3246
3456
|
"DeleteLogExport": doDeleteLogExport,
|
@@ -3248,15 +3458,17 @@ ACTION_MAP = {
|
|
3248
3458
|
"DescribeDataEventUrl": doDescribeDataEventUrl,
|
3249
3459
|
"DeleteOfflineLogRecord": doDeleteOfflineLogRecord,
|
3250
3460
|
"DescribeOfflineLogConfigs": doDescribeOfflineLogConfigs,
|
3461
|
+
"DescribeReleaseFileSign": doDescribeReleaseFileSign,
|
3251
3462
|
"DescribeScores": doDescribeScores,
|
3463
|
+
"DescribeUvList": doDescribeUvList,
|
3252
3464
|
"CreateProject": doCreateProject,
|
3253
3465
|
"ResumeProject": doResumeProject,
|
3254
3466
|
"DescribeDataPvUrlInfo": doDescribeDataPvUrlInfo,
|
3255
3467
|
"DescribeDataStaticProject": doDescribeDataStaticProject,
|
3256
3468
|
"DeleteProject": doDeleteProject,
|
3257
3469
|
"DescribeOfflineLogRecords": doDescribeOfflineLogRecords,
|
3258
|
-
"
|
3259
|
-
"
|
3470
|
+
"CreateTawInstance": doCreateTawInstance,
|
3471
|
+
"DescribeDataFetchProject": doDescribeDataFetchProject,
|
3260
3472
|
"DescribeReleaseFiles": doDescribeReleaseFiles,
|
3261
3473
|
"ModifyInstance": doModifyInstance,
|
3262
3474
|
"DescribeDataFetchUrl": doDescribeDataFetchUrl,
|