tccli 3.0.1342.1__py2.py3-none-any.whl → 3.0.1344.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/__init__.py +6 -0
- tccli/services/ams/v20201229/api.json +46 -46
- tccli/services/ams/v20201229/examples.json +1 -1
- tccli/services/apm/apm_client.py +53 -0
- tccli/services/apm/v20210622/api.json +107 -0
- tccli/services/apm/v20210622/examples.json +8 -0
- tccli/services/batch/batch_client.py +53 -0
- tccli/services/batch/v20170312/api.json +125 -0
- tccli/services/batch/v20170312/examples.json +8 -0
- tccli/services/bh/v20230418/api.json +282 -1
- tccli/services/bh/v20230418/examples.json +3 -3
- tccli/services/bi/v20220105/api.json +9 -0
- tccli/services/ccc/v20200210/api.json +9 -0
- tccli/services/cdb/v20170320/api.json +40 -40
- tccli/services/cdb/v20170320/examples.json +3 -3
- tccli/services/cdwch/cdwch_client.py +53 -0
- tccli/services/cdwch/v20200915/api.json +410 -0
- tccli/services/cdwch/v20200915/examples.json +8 -0
- tccli/services/cdwdoris/v20211228/api.json +22 -2
- tccli/services/cfg/v20210820/api.json +72 -0
- tccli/services/ckafka/v20190819/api.json +21 -1
- tccli/services/csip/csip_client.py +163 -4
- tccli/services/csip/v20221121/api.json +967 -164
- tccli/services/csip/v20221121/examples.json +29 -5
- tccli/services/cvm/v20170312/api.json +16 -5
- tccli/services/cvm/v20170312/examples.json +1 -1
- tccli/services/dlc/v20210125/api.json +65 -1
- tccli/services/ecm/v20190719/api.json +14 -14
- tccli/services/emr/emr_client.py +167 -8
- tccli/services/emr/v20190103/api.json +809 -14
- tccli/services/emr/v20190103/examples.json +24 -0
- tccli/services/es/v20250101/examples.json +2 -2
- tccli/services/ess/v20201111/api.json +16 -7
- tccli/services/essbasic/v20210526/api.json +3 -3
- tccli/services/gs/v20191118/api.json +40 -1
- tccli/services/gs/v20191118/examples.json +2 -2
- tccli/services/hunyuan/v20230901/api.json +1 -1
- tccli/services/igtm/__init__.py +4 -0
- tccli/services/igtm/igtm_client.py +1373 -0
- tccli/services/igtm/v20231024/api.json +3569 -0
- tccli/services/igtm/v20231024/examples.json +207 -0
- tccli/services/ims/v20201229/api.json +20 -28
- tccli/services/ioa/ioa_client.py +114 -8
- tccli/services/ioa/v20220601/api.json +218 -3
- tccli/services/ioa/v20220601/examples.json +16 -0
- tccli/services/iss/v20230517/api.json +11 -2
- tccli/services/kms/v20190118/api.json +4 -4
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/mongodb/mongodb_client.py +57 -4
- tccli/services/mongodb/v20190725/api.json +189 -0
- tccli/services/mongodb/v20190725/examples.json +8 -0
- tccli/services/mps/v20190612/api.json +43 -5
- tccli/services/ocr/v20181119/api.json +137 -118
- tccli/services/partners/v20180321/api.json +1 -1
- tccli/services/securitylake/__init__.py +4 -0
- tccli/services/securitylake/securitylake_client.py +207 -0
- tccli/services/securitylake/v20240117/api.json +723 -0
- tccli/services/securitylake/v20240117/examples.json +13 -0
- tccli/services/tcbr/v20220217/api.json +70 -0
- tccli/services/tdmq/v20200217/api.json +263 -5
- tccli/services/tdmq/v20200217/examples.json +1 -1
- tccli/services/teo/teo_client.py +269 -4
- tccli/services/teo/v20220901/api.json +502 -23
- tccli/services/teo/v20220901/examples.json +77 -1
- tccli/services/tione/tione_client.py +57 -4
- tccli/services/tione/v20211111/api.json +283 -1
- tccli/services/tione/v20211111/examples.json +8 -0
- tccli/services/tke/v20180525/api.json +37 -28
- tccli/services/tms/v20201229/api.json +73 -80
- tccli/services/trocket/v20230308/api.json +80 -80
- tccli/services/trocket/v20230308/examples.json +1 -1
- tccli/services/tsf/tsf_client.py +61 -8
- tccli/services/tsf/v20180326/api.json +3161 -2106
- tccli/services/tsf/v20180326/examples.json +8 -0
- tccli/services/vdb/v20230616/api.json +49 -0
- tccli/services/vdb/v20230616/examples.json +1 -1
- tccli/services/vm/v20210922/api.json +8 -8
- tccli/services/vpc/v20170312/api.json +1 -1
- tccli/services/wav/v20210129/api.json +10 -10
- tccli/services/wav/v20210129/examples.json +3 -3
- tccli/services/wedata/v20210820/api.json +11 -0
- {tccli-3.0.1342.1.dist-info → tccli-3.0.1344.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1342.1.dist-info → tccli-3.0.1344.1.dist-info}/RECORD +87 -79
- {tccli-3.0.1342.1.dist-info → tccli-3.0.1344.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1342.1.dist-info → tccli-3.0.1344.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1342.1.dist-info → tccli-3.0.1344.1.dist-info}/license_files/LICENSE +0 -0
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,
|