tccli 3.0.1378.1__py2.py3-none-any.whl → 3.0.1380.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/apm/v20210622/api.json +22 -0
- tccli/services/cbs/v20170312/api.json +6 -6
- tccli/services/cbs/v20170312/examples.json +6 -6
- tccli/services/dcdb/dcdb_client.py +243 -31
- tccli/services/dcdb/v20180411/api.json +348 -0
- tccli/services/dcdb/v20180411/examples.json +32 -0
- tccli/services/dts/v20211206/api.json +78 -1
- tccli/services/dts/v20211206/examples.json +2 -2
- tccli/services/emr/v20190103/api.json +1 -1
- tccli/services/ess/v20201111/api.json +21 -1
- tccli/services/iotexplorer/iotexplorer_client.py +269 -57
- tccli/services/iotexplorer/v20190423/api.json +357 -0
- tccli/services/iotexplorer/v20190423/examples.json +32 -0
- tccli/services/lkeap/v20240522/api.json +18 -18
- tccli/services/mariadb/mariadb_client.py +220 -8
- tccli/services/mariadb/v20170312/api.json +330 -0
- tccli/services/mariadb/v20170312/examples.json +32 -0
- tccli/services/ocr/v20181119/api.json +8 -8
- tccli/services/teo/v20220901/api.json +1 -1
- tccli/services/trtc/v20190722/api.json +1 -1
- tccli/services/tsf/v20180326/examples.json +1 -1
- tccli/services/vclm/v20240523/api.json +1 -1
- tccli/services/waf/v20180125/api.json +46 -3
- tccli/services/waf/v20180125/examples.json +8 -0
- tccli/services/waf/waf_client.py +53 -0
- tccli/services/wedata/v20210820/api.json +926 -555
- tccli/services/wedata/v20210820/examples.json +9 -17
- tccli/services/wedata/wedata_client.py +57 -110
- tccli/services/wsa/v20250508/api.json +1 -1
- {tccli-3.0.1378.1.dist-info → tccli-3.0.1380.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1378.1.dist-info → tccli-3.0.1380.1.dist-info}/RECORD +35 -35
- {tccli-3.0.1378.1.dist-info → tccli-3.0.1380.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1378.1.dist-info → tccli-3.0.1380.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1378.1.dist-info → tccli-3.0.1380.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/waf/waf_client.py
CHANGED
@@ -5841,6 +5841,58 @@ def doDescribeDomainCountInfo(args, parsed_globals):
|
|
5841
5841
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5842
5842
|
|
5843
5843
|
|
5844
|
+
def doModifyProtectionLevel(args, parsed_globals):
|
5845
|
+
g_param = parse_global_arg(parsed_globals)
|
5846
|
+
|
5847
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5848
|
+
cred = credential.CVMRoleCredential()
|
5849
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5850
|
+
cred = credential.STSAssumeRoleCredential(
|
5851
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5852
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5853
|
+
)
|
5854
|
+
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):
|
5855
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5856
|
+
else:
|
5857
|
+
cred = credential.Credential(
|
5858
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5859
|
+
)
|
5860
|
+
http_profile = HttpProfile(
|
5861
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5862
|
+
reqMethod="POST",
|
5863
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5864
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5865
|
+
)
|
5866
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5867
|
+
if g_param[OptionsDefine.Language]:
|
5868
|
+
profile.language = g_param[OptionsDefine.Language]
|
5869
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5870
|
+
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
5871
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5872
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5873
|
+
model = models.ModifyProtectionLevelRequest()
|
5874
|
+
model.from_json_string(json.dumps(args))
|
5875
|
+
start_time = time.time()
|
5876
|
+
while True:
|
5877
|
+
rsp = client.ModifyProtectionLevel(model)
|
5878
|
+
result = rsp.to_json_string()
|
5879
|
+
try:
|
5880
|
+
json_obj = json.loads(result)
|
5881
|
+
except TypeError as e:
|
5882
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5883
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5884
|
+
break
|
5885
|
+
cur_time = time.time()
|
5886
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5887
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5888
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5889
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5890
|
+
else:
|
5891
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5892
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5893
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5894
|
+
|
5895
|
+
|
5844
5896
|
def doDeleteSpartaProtection(args, parsed_globals):
|
5845
5897
|
g_param = parse_global_arg(parsed_globals)
|
5846
5898
|
|
@@ -9240,6 +9292,7 @@ ACTION_MAP = {
|
|
9240
9292
|
"AddAttackWhiteRule": doAddAttackWhiteRule,
|
9241
9293
|
"AddAreaBanAreas": doAddAreaBanAreas,
|
9242
9294
|
"DescribeDomainCountInfo": doDescribeDomainCountInfo,
|
9295
|
+
"ModifyProtectionLevel": doModifyProtectionLevel,
|
9243
9296
|
"DeleteSpartaProtection": doDeleteSpartaProtection,
|
9244
9297
|
"SwitchDomainRules": doSwitchDomainRules,
|
9245
9298
|
"UpsertCCAutoStatus": doUpsertCCAutoStatus,
|