tccli 3.0.1341.1__py2.py3-none-any.whl → 3.0.1343.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/plugins/sso/__init__.py +14 -0
- tccli/plugins/sso/login.py +23 -6
- tccli/plugins/sso/texts.py +4 -0
- tccli/services/__init__.py +3 -0
- tccli/services/ams/v20201229/api.json +195 -185
- tccli/services/apm/apm_client.py +53 -0
- tccli/services/apm/v20210622/api.json +117 -0
- tccli/services/apm/v20210622/examples.json +8 -0
- tccli/services/cdb/v20170320/api.json +17 -17
- tccli/services/cdb/v20170320/examples.json +2 -2
- tccli/services/ctem/__init__.py +4 -0
- tccli/services/ctem/ctem_client.py +1479 -0
- tccli/services/ctem/v20231128/api.json +6138 -0
- tccli/services/ctem/v20231128/examples.json +205 -0
- tccli/services/dlc/v20210125/api.json +19 -7
- tccli/services/ecm/v20190719/api.json +14 -14
- tccli/services/ess/v20201111/api.json +1 -1
- tccli/services/essbasic/v20210526/api.json +1 -1
- tccli/services/hunyuan/v20230901/api.json +10 -1
- tccli/services/ims/v20201229/api.json +30 -30
- tccli/services/iotexplorer/v20190423/api.json +2 -2
- tccli/services/iotexplorer/v20190423/examples.json +1 -1
- tccli/services/iotvideo/v20201215/api.json +2 -2
- tccli/services/iotvideo/v20201215/examples.json +1 -1
- tccli/services/iotvideo/v20211125/api.json +1 -1
- tccli/services/iotvideo/v20211125/examples.json +1 -1
- tccli/services/lke/v20231130/api.json +22 -1
- tccli/services/mongodb/mongodb_client.py +57 -4
- tccli/services/mongodb/v20190725/api.json +199 -0
- tccli/services/mongodb/v20190725/examples.json +8 -0
- tccli/services/mps/v20190612/api.json +113 -25
- tccli/services/mqtt/mqtt_client.py +53 -0
- tccli/services/mqtt/v20240516/api.json +150 -0
- tccli/services/mqtt/v20240516/examples.json +8 -0
- tccli/services/ocr/v20181119/api.json +10 -0
- tccli/services/redis/v20180412/api.json +3 -3
- tccli/services/redis/v20180412/examples.json +19 -1
- tccli/services/teo/teo_client.py +269 -4
- tccli/services/teo/v20220901/api.json +469 -0
- tccli/services/teo/v20220901/examples.json +76 -0
- tccli/services/tke/v20180525/api.json +10 -0
- tccli/services/tms/v20201229/api.json +59 -59
- tccli/services/trocket/v20230308/api.json +71 -71
- tccli/services/trocket/v20230308/examples.json +4 -4
- tccli/services/vm/v20210922/api.json +363 -333
- tccli/services/wedata/v20210820/api.json +128 -0
- tccli/services/wedata/v20210820/examples.json +8 -0
- tccli/services/wedata/wedata_client.py +53 -0
- {tccli-3.0.1341.1.dist-info → tccli-3.0.1343.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1341.1.dist-info → tccli-3.0.1343.1.dist-info}/RECORD +54 -50
- {tccli-3.0.1341.1.dist-info → tccli-3.0.1343.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1341.1.dist-info → tccli-3.0.1343.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1341.1.dist-info → tccli-3.0.1343.1.dist-info}/license_files/LICENSE +0 -0
@@ -5373,7 +5373,7 @@
|
|
5373
5373
|
},
|
5374
5374
|
{
|
5375
5375
|
"disabled": false,
|
5376
|
-
"document": "
|
5376
|
+
"document": "慢查询详情,注意:TotalCount大于1W,即慢日志超过1万条,不支持返回日志详情,返回数据为空。 建议缩小BeginTime和EndTime的时间间隔,多次查询。",
|
5377
5377
|
"example": "无",
|
5378
5378
|
"member": "InstanceProxySlowlogDetail",
|
5379
5379
|
"name": "InstanceProxySlowLogDetail",
|
@@ -5954,7 +5954,7 @@
|
|
5954
5954
|
},
|
5955
5955
|
{
|
5956
5956
|
"disabled": false,
|
5957
|
-
"document": "
|
5957
|
+
"document": "慢查询详情,注意:TotalCount大于1W,即慢日志超过1万条,不支持返回日志详情,返回数据为空。 建议缩小BeginTime和EndTime的时间间隔,多次查询。",
|
5958
5958
|
"example": "无",
|
5959
5959
|
"member": "InstanceSlowlogDetail",
|
5960
5960
|
"name": "InstanceSlowLogDetail",
|
@@ -6269,7 +6269,7 @@
|
|
6269
6269
|
},
|
6270
6270
|
{
|
6271
6271
|
"disabled": false,
|
6272
|
-
"document": "
|
6272
|
+
"document": "慢查询详情,注意:TotalCount大于1W,即慢日志超过1万条,不支持返回日志详情,返回数据为空。 建议缩小BeginTime和EndTime的时间间隔,多次查询。",
|
6273
6273
|
"example": "无",
|
6274
6274
|
"member": "TendisSlowLogDetail",
|
6275
6275
|
"name": "TendisSlowLogDetail",
|
@@ -452,6 +452,12 @@
|
|
452
452
|
"input": "https://redis.tencentcloudapi.com/?Action=DescribeProxySlowLog\n&InstanceId=crs-asda****\n&BeginTime=2019-09-08 12:12:41\n&EndTime=2019-09-09 12:12:41\n&<公共请求参数>",
|
453
453
|
"output": "{\n \"Response\": {\n \"TotalCount\": 106980,\n \"InstanceProxySlowLogDetail\": [\n {\n \"Duration\": 45,\n \"ExecuteTime\": \"2019-09-08 12:13:08\",\n \"CommandLine\": \"hget hash_key classify_scope::default\",\n \"Client\": \"172.16.21.78\",\n \"Command\": \"hget\"\n }\n ],\n \"RequestId\": \"121d5b40-d2b8-11e9-8c40-ef686158cbd6\"\n }\n}",
|
454
454
|
"title": "请求示例"
|
455
|
+
},
|
456
|
+
{
|
457
|
+
"document": "TotalCount大于1W,即慢日志超过1万条,不支持返回日志详情,返回数据为空。",
|
458
|
+
"input": "https://redis.tencentcloudapi.com/?Action=DescribeProxySlowLog\n&InstanceId=crs-asda****\n&BeginTime=2019-09-08 12:12:41\n&EndTime=2019-09-09 12:12:41\n&Limit=10\n&Offset=10000\n&<公共请求参数>",
|
459
|
+
"output": "{\n \"Response\": {\n \"TotalCount\": 10001,\n \"InstanceProxySlowLogDetail\": [],\n \"RequestId\": \"121d5b40-d2b8-11e9-8c40-ef686158cbd6\"\n }\n}",
|
460
|
+
"title": "请求示例2"
|
455
461
|
}
|
456
462
|
],
|
457
463
|
"DescribeRedisClusterOverview": [
|
@@ -508,6 +514,12 @@
|
|
508
514
|
"input": "POST / HTTP/1.1\nHost: redis.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSlowLog\n<公共请求参数>\n\n{\n \"InstanceId\": \"crs-asda****\",\n \"EndTime\": \"2019-09-09 12:12:41\",\n \"BeginTime\": \"2019-09-08 12:12:41\"\n}",
|
509
515
|
"output": "{\n \"Response\": {\n \"InstanceSlowLogDetail\": [\n {\n \"Node\": \"833a2f6d8b402319aee8ad7f1c0fbbf7********\",\n \"Command\": \"hget\",\n \"CommandLine\": \"hget hash_key classify_scope::default\",\n \"Duration\": 45,\n \"ExecuteTime\": \"2019-09-08 12:13:08\",\n \"Client\": \"\"\n },\n {\n \"Node\": \"833a2f6d8b402319aee8ad7f1c0fbbf7********\",\n \"Command\": \"keys\",\n \"CommandLine\": \"keys OtherResControler:orion.ovs.client.1514259512471:orion.ovs.entprise.9281083591:sence:*\",\n \"Duration\": 41,\n \"ExecuteTime\": \"2019-09-08 12:13:08\",\n \"Client\": \"\"\n },\n {\n \"Node\": \"24a05f0d545da235f07a5bc5deebb937********\",\n \"Command\": \"get\",\n \"CommandLine\": \"get slot::fsm::status::orion.ovs.client.1508751991541::1db7ffcf9216bc1fd939e6c710514f6fb40fd4fe1525f\",\n \"Duration\": 41,\n \"ExecuteTime\": \"2019-09-08 12:13:08\",\n \"Client\": \"\"\n }\n ],\n \"RequestId\": \"121d5b40-d2b8-11e9-8c40-ef686158cbd6\",\n \"TotalCount\": 106980\n }\n}",
|
510
516
|
"title": "查询实例慢查询记录"
|
517
|
+
},
|
518
|
+
{
|
519
|
+
"document": "TotalCount大于1W,即慢日志超过1万条,不支持返回日志详情,返回数据为空。",
|
520
|
+
"input": "POST / HTTP/1.1\nHost: redis.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeSlowLog\n<公共请求参数>\n\n{\n \"InstanceId\": \"crs-asda****\",\n \"EndTime\": \"2019-09-09 12:12:41\",\n \"BeginTime\": \"2019-09-08 12:12:41\",\n \"Limit\": 10,\n \"Offset\": 10000\n}",
|
521
|
+
"output": "{\n \"Response\": {\n \"InstanceSlowLogDetail\": [],\n \"RequestId\": \"121d5b40-d2b8-11e9-8c40-ef686158cbd6\",\n \"TotalCount\": 106980\n }\n}",
|
522
|
+
"title": "查询实例慢查询记录超过1W条"
|
511
523
|
}
|
512
524
|
],
|
513
525
|
"DescribeTaskInfo": [
|
@@ -529,9 +541,15 @@
|
|
529
541
|
"DescribeTendisSlowLog": [
|
530
542
|
{
|
531
543
|
"document": "",
|
532
|
-
"input": "https://redis.tencentcloudapi.com/?Action=DescribeTendisSlowLog\n&InstanceId=crs-
|
544
|
+
"input": "https://redis.tencentcloudapi.com/?Action=DescribeTendisSlowLog\n&InstanceId=crs-asdas***\n&BeginTime=2019-09-08 12:12:41\n&EndTime=2019-09-09 12:12:41\n&<公共请求参数>",
|
533
545
|
"output": "{\n \"Response\": {\n \"TotalCount\": 106980,\n \"TendisSlowLogDetail\": [\n {\n \"Node\": \"833a2f6d8b402319aee8ad7f1c0fbbf7a6604337\",\n \"Command\": \"hget\",\n \"CommandLine\": \"hget hash_key classify_scope::default\",\n \"Duration\": 45,\n \"ExecuteTime\": \"2019-09-08 12:13:08\"\n }\n ],\n \"RequestId\": \"121d5b40-d2b8-11e9-8c40-ef686158cbd6\"\n }\n}",
|
534
546
|
"title": "请求示例"
|
547
|
+
},
|
548
|
+
{
|
549
|
+
"document": "TotalCount大于1W,即慢日志超过1万条,不支持返回日志详情,返回数据为空。",
|
550
|
+
"input": "https://redis.tencentcloudapi.com/?Action=DescribeTendisSlowLog\n&InstanceId=crs-asdas***\n&BeginTime=2019-09-08 12:12:41\n&EndTime=2019-09-09 12:12:41\n&Limit=10\n&Offset=10000\n&<公共请求参数>",
|
551
|
+
"output": "{\n \"Response\": {\n \"TotalCount\": 106980,\n \"TendisSlowLogDetail\": [],\n \"RequestId\": \"121d5b40-d2b8-11e9-8c40-ef68615******\"\n }\n}",
|
552
|
+
"title": "请求示例2"
|
535
553
|
}
|
536
554
|
],
|
537
555
|
"DestroyPostpaidInstance": [
|
tccli/services/teo/teo_client.py
CHANGED
@@ -1319,7 +1319,7 @@ def doDescribeEnvironments(args, parsed_globals):
|
|
1319
1319
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1320
1320
|
|
1321
1321
|
|
1322
|
-
def
|
1322
|
+
def doDescribeOriginACL(args, parsed_globals):
|
1323
1323
|
g_param = parse_global_arg(parsed_globals)
|
1324
1324
|
|
1325
1325
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1348,11 +1348,11 @@ def doIncreasePlanQuota(args, parsed_globals):
|
|
1348
1348
|
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
1349
1349
|
client._sdkVersion += ("_CLI_" + __version__)
|
1350
1350
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1351
|
-
model = models.
|
1351
|
+
model = models.DescribeOriginACLRequest()
|
1352
1352
|
model.from_json_string(json.dumps(args))
|
1353
1353
|
start_time = time.time()
|
1354
1354
|
while True:
|
1355
|
-
rsp = client.
|
1355
|
+
rsp = client.DescribeOriginACL(model)
|
1356
1356
|
result = rsp.to_json_string()
|
1357
1357
|
try:
|
1358
1358
|
json_obj = json.loads(result)
|
@@ -1891,6 +1891,58 @@ def doBindSecurityTemplateToEntity(args, parsed_globals):
|
|
1891
1891
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1892
1892
|
|
1893
1893
|
|
1894
|
+
def doModifyOriginACL(args, parsed_globals):
|
1895
|
+
g_param = parse_global_arg(parsed_globals)
|
1896
|
+
|
1897
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1898
|
+
cred = credential.CVMRoleCredential()
|
1899
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1900
|
+
cred = credential.STSAssumeRoleCredential(
|
1901
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1902
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1903
|
+
)
|
1904
|
+
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):
|
1905
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1906
|
+
else:
|
1907
|
+
cred = credential.Credential(
|
1908
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1909
|
+
)
|
1910
|
+
http_profile = HttpProfile(
|
1911
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1912
|
+
reqMethod="POST",
|
1913
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1914
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1915
|
+
)
|
1916
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1917
|
+
if g_param[OptionsDefine.Language]:
|
1918
|
+
profile.language = g_param[OptionsDefine.Language]
|
1919
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1920
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
1921
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1922
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1923
|
+
model = models.ModifyOriginACLRequest()
|
1924
|
+
model.from_json_string(json.dumps(args))
|
1925
|
+
start_time = time.time()
|
1926
|
+
while True:
|
1927
|
+
rsp = client.ModifyOriginACL(model)
|
1928
|
+
result = rsp.to_json_string()
|
1929
|
+
try:
|
1930
|
+
json_obj = json.loads(result)
|
1931
|
+
except TypeError as e:
|
1932
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1933
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1934
|
+
break
|
1935
|
+
cur_time = time.time()
|
1936
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1937
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1938
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1939
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1940
|
+
else:
|
1941
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1942
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1943
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1944
|
+
|
1945
|
+
|
1894
1946
|
def doModifyApplicationProxyRuleStatus(args, parsed_globals):
|
1895
1947
|
g_param = parse_global_arg(parsed_globals)
|
1896
1948
|
|
@@ -3711,6 +3763,58 @@ def doCreateL4Proxy(args, parsed_globals):
|
|
3711
3763
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3712
3764
|
|
3713
3765
|
|
3766
|
+
def doIncreasePlanQuota(args, parsed_globals):
|
3767
|
+
g_param = parse_global_arg(parsed_globals)
|
3768
|
+
|
3769
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3770
|
+
cred = credential.CVMRoleCredential()
|
3771
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3772
|
+
cred = credential.STSAssumeRoleCredential(
|
3773
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3774
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3775
|
+
)
|
3776
|
+
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):
|
3777
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3778
|
+
else:
|
3779
|
+
cred = credential.Credential(
|
3780
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3781
|
+
)
|
3782
|
+
http_profile = HttpProfile(
|
3783
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3784
|
+
reqMethod="POST",
|
3785
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3786
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3787
|
+
)
|
3788
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3789
|
+
if g_param[OptionsDefine.Language]:
|
3790
|
+
profile.language = g_param[OptionsDefine.Language]
|
3791
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3792
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
3793
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3794
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3795
|
+
model = models.IncreasePlanQuotaRequest()
|
3796
|
+
model.from_json_string(json.dumps(args))
|
3797
|
+
start_time = time.time()
|
3798
|
+
while True:
|
3799
|
+
rsp = client.IncreasePlanQuota(model)
|
3800
|
+
result = rsp.to_json_string()
|
3801
|
+
try:
|
3802
|
+
json_obj = json.loads(result)
|
3803
|
+
except TypeError as e:
|
3804
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3805
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3806
|
+
break
|
3807
|
+
cur_time = time.time()
|
3808
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3809
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3810
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3811
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3812
|
+
else:
|
3813
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3814
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3815
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3816
|
+
|
3817
|
+
|
3714
3818
|
def doModifyApplicationProxyStatus(args, parsed_globals):
|
3715
3819
|
g_param = parse_global_arg(parsed_globals)
|
3716
3820
|
|
@@ -4595,6 +4699,58 @@ def doDeleteLoadBalancer(args, parsed_globals):
|
|
4595
4699
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4596
4700
|
|
4597
4701
|
|
4702
|
+
def doDisableOriginACL(args, parsed_globals):
|
4703
|
+
g_param = parse_global_arg(parsed_globals)
|
4704
|
+
|
4705
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4706
|
+
cred = credential.CVMRoleCredential()
|
4707
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4708
|
+
cred = credential.STSAssumeRoleCredential(
|
4709
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4710
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4711
|
+
)
|
4712
|
+
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):
|
4713
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4714
|
+
else:
|
4715
|
+
cred = credential.Credential(
|
4716
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4717
|
+
)
|
4718
|
+
http_profile = HttpProfile(
|
4719
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4720
|
+
reqMethod="POST",
|
4721
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4722
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4723
|
+
)
|
4724
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4725
|
+
if g_param[OptionsDefine.Language]:
|
4726
|
+
profile.language = g_param[OptionsDefine.Language]
|
4727
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4728
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
4729
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4730
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4731
|
+
model = models.DisableOriginACLRequest()
|
4732
|
+
model.from_json_string(json.dumps(args))
|
4733
|
+
start_time = time.time()
|
4734
|
+
while True:
|
4735
|
+
rsp = client.DisableOriginACL(model)
|
4736
|
+
result = rsp.to_json_string()
|
4737
|
+
try:
|
4738
|
+
json_obj = json.loads(result)
|
4739
|
+
except TypeError as e:
|
4740
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4741
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4742
|
+
break
|
4743
|
+
cur_time = time.time()
|
4744
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4745
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4746
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4747
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4748
|
+
else:
|
4749
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4750
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4751
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4752
|
+
|
4753
|
+
|
4598
4754
|
def doDeleteContentIdentifier(args, parsed_globals):
|
4599
4755
|
g_param = parse_global_arg(parsed_globals)
|
4600
4756
|
|
@@ -5635,6 +5791,58 @@ def doCreateCLSIndex(args, parsed_globals):
|
|
5635
5791
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5636
5792
|
|
5637
5793
|
|
5794
|
+
def doConfirmOriginACLUpdate(args, parsed_globals):
|
5795
|
+
g_param = parse_global_arg(parsed_globals)
|
5796
|
+
|
5797
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5798
|
+
cred = credential.CVMRoleCredential()
|
5799
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5800
|
+
cred = credential.STSAssumeRoleCredential(
|
5801
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5802
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5803
|
+
)
|
5804
|
+
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):
|
5805
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5806
|
+
else:
|
5807
|
+
cred = credential.Credential(
|
5808
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5809
|
+
)
|
5810
|
+
http_profile = HttpProfile(
|
5811
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5812
|
+
reqMethod="POST",
|
5813
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5814
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5815
|
+
)
|
5816
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5817
|
+
if g_param[OptionsDefine.Language]:
|
5818
|
+
profile.language = g_param[OptionsDefine.Language]
|
5819
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5820
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
5821
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5822
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5823
|
+
model = models.ConfirmOriginACLUpdateRequest()
|
5824
|
+
model.from_json_string(json.dumps(args))
|
5825
|
+
start_time = time.time()
|
5826
|
+
while True:
|
5827
|
+
rsp = client.ConfirmOriginACLUpdate(model)
|
5828
|
+
result = rsp.to_json_string()
|
5829
|
+
try:
|
5830
|
+
json_obj = json.loads(result)
|
5831
|
+
except TypeError as e:
|
5832
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5833
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5834
|
+
break
|
5835
|
+
cur_time = time.time()
|
5836
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5837
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5838
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5839
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5840
|
+
else:
|
5841
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5842
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5843
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5844
|
+
|
5845
|
+
|
5638
5846
|
def doCreateApplicationProxy(args, parsed_globals):
|
5639
5847
|
g_param = parse_global_arg(parsed_globals)
|
5640
5848
|
|
@@ -5739,6 +5947,58 @@ def doUpgradePlan(args, parsed_globals):
|
|
5739
5947
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5740
5948
|
|
5741
5949
|
|
5950
|
+
def doEnableOriginACL(args, parsed_globals):
|
5951
|
+
g_param = parse_global_arg(parsed_globals)
|
5952
|
+
|
5953
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5954
|
+
cred = credential.CVMRoleCredential()
|
5955
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5956
|
+
cred = credential.STSAssumeRoleCredential(
|
5957
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5958
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5959
|
+
)
|
5960
|
+
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):
|
5961
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5962
|
+
else:
|
5963
|
+
cred = credential.Credential(
|
5964
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5965
|
+
)
|
5966
|
+
http_profile = HttpProfile(
|
5967
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5968
|
+
reqMethod="POST",
|
5969
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5970
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5971
|
+
)
|
5972
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5973
|
+
if g_param[OptionsDefine.Language]:
|
5974
|
+
profile.language = g_param[OptionsDefine.Language]
|
5975
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5976
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
5977
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5978
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5979
|
+
model = models.EnableOriginACLRequest()
|
5980
|
+
model.from_json_string(json.dumps(args))
|
5981
|
+
start_time = time.time()
|
5982
|
+
while True:
|
5983
|
+
rsp = client.EnableOriginACL(model)
|
5984
|
+
result = rsp.to_json_string()
|
5985
|
+
try:
|
5986
|
+
json_obj = json.loads(result)
|
5987
|
+
except TypeError as e:
|
5988
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5989
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5990
|
+
break
|
5991
|
+
cur_time = time.time()
|
5992
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5993
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5994
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5995
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5996
|
+
else:
|
5997
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5998
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5999
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
6000
|
+
|
6001
|
+
|
5742
6002
|
def doModifyAliasDomain(args, parsed_globals):
|
5743
6003
|
g_param = parse_global_arg(parsed_globals)
|
5744
6004
|
|
@@ -7493,7 +7753,7 @@ ACTION_MAP = {
|
|
7493
7753
|
"ModifyL4ProxyStatus": doModifyL4ProxyStatus,
|
7494
7754
|
"DownloadL7Logs": doDownloadL7Logs,
|
7495
7755
|
"DescribeEnvironments": doDescribeEnvironments,
|
7496
|
-
"
|
7756
|
+
"DescribeOriginACL": doDescribeOriginACL,
|
7497
7757
|
"DeleteApplicationProxyRule": doDeleteApplicationProxyRule,
|
7498
7758
|
"CheckCnameStatus": doCheckCnameStatus,
|
7499
7759
|
"ModifyZone": doModifyZone,
|
@@ -7504,6 +7764,7 @@ ACTION_MAP = {
|
|
7504
7764
|
"DescribeConfigGroupVersionDetail": doDescribeConfigGroupVersionDetail,
|
7505
7765
|
"DescribeL7AccRules": doDescribeL7AccRules,
|
7506
7766
|
"BindSecurityTemplateToEntity": doBindSecurityTemplateToEntity,
|
7767
|
+
"ModifyOriginACL": doModifyOriginACL,
|
7507
7768
|
"ModifyApplicationProxyRuleStatus": doModifyApplicationProxyRuleStatus,
|
7508
7769
|
"CreatePlanForZone": doCreatePlanForZone,
|
7509
7770
|
"DeleteOriginGroup": doDeleteOriginGroup,
|
@@ -7539,6 +7800,7 @@ ACTION_MAP = {
|
|
7539
7800
|
"CreateCustomizeErrorPage": doCreateCustomizeErrorPage,
|
7540
7801
|
"ModifyAccelerationDomain": doModifyAccelerationDomain,
|
7541
7802
|
"CreateL4Proxy": doCreateL4Proxy,
|
7803
|
+
"IncreasePlanQuota": doIncreasePlanQuota,
|
7542
7804
|
"ModifyApplicationProxyStatus": doModifyApplicationProxyStatus,
|
7543
7805
|
"CreatePlan": doCreatePlan,
|
7544
7806
|
"DescribeTimingL7AnalysisData": doDescribeTimingL7AnalysisData,
|
@@ -7556,6 +7818,7 @@ ACTION_MAP = {
|
|
7556
7818
|
"DescribeCustomErrorPages": doDescribeCustomErrorPages,
|
7557
7819
|
"DescribePlans": doDescribePlans,
|
7558
7820
|
"DeleteLoadBalancer": doDeleteLoadBalancer,
|
7821
|
+
"DisableOriginACL": doDisableOriginACL,
|
7559
7822
|
"DeleteContentIdentifier": doDeleteContentIdentifier,
|
7560
7823
|
"DescribeRulesSetting": doDescribeRulesSetting,
|
7561
7824
|
"ModifyAccelerationDomainStatuses": doModifyAccelerationDomainStatuses,
|
@@ -7576,8 +7839,10 @@ ACTION_MAP = {
|
|
7576
7839
|
"ModifySecurityIPGroup": doModifySecurityIPGroup,
|
7577
7840
|
"DescribeRules": doDescribeRules,
|
7578
7841
|
"CreateCLSIndex": doCreateCLSIndex,
|
7842
|
+
"ConfirmOriginACLUpdate": doConfirmOriginACLUpdate,
|
7579
7843
|
"CreateApplicationProxy": doCreateApplicationProxy,
|
7580
7844
|
"UpgradePlan": doUpgradePlan,
|
7845
|
+
"EnableOriginACL": doEnableOriginACL,
|
7581
7846
|
"ModifyAliasDomain": doModifyAliasDomain,
|
7582
7847
|
"CreateLoadBalancer": doCreateLoadBalancer,
|
7583
7848
|
"ModifyApplicationProxyRule": doModifyApplicationProxyRule,
|