tccli 3.0.1283.1__py2.py3-none-any.whl → 3.0.1285.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/acp/v20220105/api.json +23 -23
- tccli/services/acp/v20220105/examples.json +2 -8
- tccli/services/advisor/v20200721/api.json +4 -2
- tccli/services/apm/v20210622/api.json +1 -1
- tccli/services/autoscaling/v20180419/api.json +88 -86
- tccli/services/bh/bh_client.py +53 -0
- tccli/services/bh/v20230418/api.json +199 -0
- tccli/services/bh/v20230418/examples.json +8 -0
- tccli/services/cdn/v20180606/api.json +4 -2
- tccli/services/cdwch/v20200915/api.json +19 -9
- tccli/services/cdwch/v20200915/examples.json +1 -1
- tccli/services/cdwdoris/v20211228/api.json +18 -0
- tccli/services/cfg/v20210820/api.json +48 -24
- tccli/services/cfg/v20210820/examples.json +8 -2
- tccli/services/clb/v20180317/api.json +21 -3
- tccli/services/cmq/v20190304/api.json +92 -92
- tccli/services/cynosdb/v20190107/api.json +389 -379
- tccli/services/dbbrain/v20191016/api.json +17 -17
- tccli/services/dbbrain/v20210527/api.json +22 -22
- tccli/services/dcdb/v20180411/api.json +14 -4
- tccli/services/dcdb/v20180411/examples.json +1 -1
- tccli/services/dlc/v20210125/api.json +130 -58
- tccli/services/dlc/v20210125/examples.json +5 -5
- tccli/services/domain/v20180808/api.json +160 -160
- tccli/services/dsgc/v20190723/api.json +2 -2
- tccli/services/dts/v20180330/api.json +19 -19
- tccli/services/dts/v20211206/api.json +829 -818
- tccli/services/emr/emr_client.py +53 -0
- tccli/services/emr/v20190103/api.json +247 -0
- tccli/services/emr/v20190103/examples.json +8 -0
- tccli/services/es/v20180416/api.json +13 -3
- tccli/services/es/v20180416/examples.json +2 -2
- tccli/services/ess/ess_client.py +53 -0
- tccli/services/ess/v20201111/api.json +122 -1
- tccli/services/ess/v20201111/examples.json +26 -0
- tccli/services/essbasic/essbasic_client.py +57 -4
- tccli/services/essbasic/v20210526/api.json +163 -0
- tccli/services/essbasic/v20210526/examples.json +26 -0
- tccli/services/fmu/fmu_client.py +8 -167
- tccli/services/fmu/v20191213/api.json +0 -292
- tccli/services/fmu/v20191213/examples.json +0 -24
- tccli/services/goosefs/v20220519/api.json +26 -24
- tccli/services/goosefs/v20220519/examples.json +2 -2
- tccli/services/iotcloud/v20210408/api.json +27 -27
- tccli/services/iotcloud/v20210408/examples.json +6 -6
- tccli/services/iotexplorer/iotexplorer_client.py +0 -106
- tccli/services/iotexplorer/v20190423/api.json +0 -274
- tccli/services/iotexplorer/v20190423/examples.json +0 -16
- tccli/services/iss/v20230517/api.json +547 -537
- tccli/services/iss/v20230517/examples.json +2 -2
- tccli/services/kms/v20190118/api.json +20 -0
- tccli/services/lcic/lcic_client.py +114 -8
- tccli/services/lcic/v20220817/api.json +108 -0
- tccli/services/lcic/v20220817/examples.json +16 -0
- tccli/services/lke/v20231130/api.json +8 -8
- tccli/services/lke/v20231130/examples.json +1 -1
- tccli/services/lowcode/v20210108/api.json +165 -165
- tccli/services/lowcode/v20210108/examples.json +5 -5
- tccli/services/mariadb/v20170312/api.json +12 -2
- tccli/services/mariadb/v20170312/examples.json +4 -4
- tccli/services/mongodb/mongodb_client.py +57 -4
- tccli/services/mongodb/v20190725/api.json +63 -0
- tccli/services/mongodb/v20190725/examples.json +14 -0
- tccli/services/monitor/v20180724/api.json +36 -36
- tccli/services/monitor/v20180724/examples.json +10 -10
- tccli/services/ocr/v20181119/api.json +2 -2
- tccli/services/ocr/v20181119/examples.json +2 -2
- tccli/services/organization/organization_client.py +53 -0
- tccli/services/organization/v20210331/api.json +61 -0
- tccli/services/organization/v20210331/examples.json +8 -0
- tccli/services/redis/v20180412/api.json +11 -2
- tccli/services/redis/v20180412/examples.json +1 -1
- tccli/services/scf/v20180416/api.json +40 -0
- tccli/services/svp/svp_client.py +57 -4
- tccli/services/svp/v20240125/api.json +319 -0
- tccli/services/svp/v20240125/examples.json +8 -0
- tccli/services/tdmq/tdmq_client.py +4 -57
- tccli/services/tdmq/v20200217/api.json +118 -212
- tccli/services/tdmq/v20200217/examples.json +0 -8
- tccli/services/tds/v20220801/api.json +2 -2
- tccli/services/tione/v20211111/api.json +41 -1
- tccli/services/trtc/v20190722/api.json +16 -5
- tccli/services/tse/v20201207/api.json +207 -104
- tccli/services/tsf/tsf_client.py +53 -0
- tccli/services/tsf/v20180326/api.json +48 -4
- tccli/services/tsf/v20180326/examples.json +8 -0
- tccli/services/vclm/v20240523/api.json +20 -2
- tccli/services/vdb/v20230616/api.json +62 -62
- tccli/services/vdb/v20230616/examples.json +2 -2
- tccli/services/vpc/v20170312/api.json +54 -0
- tccli/services/vpc/v20170312/examples.json +8 -0
- tccli/services/vpc/vpc_client.py +53 -0
- tccli/services/waf/v20180125/api.json +143 -0
- tccli/services/waf/v20180125/examples.json +16 -0
- tccli/services/waf/waf_client.py +106 -0
- tccli/services/wedata/v20210820/api.json +1220 -5
- tccli/services/wedata/v20210820/examples.json +32 -8
- tccli/services/wedata/wedata_client.py +159 -0
- {tccli-3.0.1283.1.dist-info → tccli-3.0.1285.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1283.1.dist-info → tccli-3.0.1285.1.dist-info}/RECORD +104 -104
- {tccli-3.0.1283.1.dist-info → tccli-3.0.1285.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1283.1.dist-info → tccli-3.0.1285.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1283.1.dist-info → tccli-3.0.1285.1.dist-info}/license_files/LICENSE +0 -0
@@ -196,6 +196,13 @@
|
|
196
196
|
"output": "CheckDefaultSubnetResponse",
|
197
197
|
"status": "online"
|
198
198
|
},
|
199
|
+
"CheckGatewayFlowMonitor": {
|
200
|
+
"document": "本接口(CheckGatewayFlowMonitor)用于查询网关是否启用流量监控。",
|
201
|
+
"input": "CheckGatewayFlowMonitorRequest",
|
202
|
+
"name": "查询网关是否启用流量监控",
|
203
|
+
"output": "CheckGatewayFlowMonitorResponse",
|
204
|
+
"status": "online"
|
205
|
+
},
|
199
206
|
"CheckNetDetectState": {
|
200
207
|
"document": "本接口(CheckNetDetectState)用于验证网络探测。",
|
201
208
|
"input": "CheckNetDetectStateRequest",
|
@@ -6919,6 +6926,53 @@
|
|
6919
6926
|
],
|
6920
6927
|
"type": "object"
|
6921
6928
|
},
|
6929
|
+
"CheckGatewayFlowMonitorRequest": {
|
6930
|
+
"document": "CheckGatewayFlowMonitor请求参数结构体",
|
6931
|
+
"members": [
|
6932
|
+
{
|
6933
|
+
"disabled": false,
|
6934
|
+
"document": "网关实例ID,目前我们支持的网关实例类型有,\n专线网关实例ID,形如,`dcg-ltjahce6`;\nNat网关实例ID,形如,`nat-ltjahce6`;\nVPN网关实例ID,形如,`vpn-ltjahce6`。",
|
6935
|
+
"example": "vpngw-4je9dgin",
|
6936
|
+
"member": "string",
|
6937
|
+
"name": "GatewayId",
|
6938
|
+
"required": true,
|
6939
|
+
"type": "string"
|
6940
|
+
}
|
6941
|
+
],
|
6942
|
+
"type": "object"
|
6943
|
+
},
|
6944
|
+
"CheckGatewayFlowMonitorResponse": {
|
6945
|
+
"document": "CheckGatewayFlowMonitor返回参数结构体",
|
6946
|
+
"members": [
|
6947
|
+
{
|
6948
|
+
"disabled": false,
|
6949
|
+
"document": "网关是否启用了流控。true为启用,false未启用。",
|
6950
|
+
"example": "1",
|
6951
|
+
"member": "bool",
|
6952
|
+
"name": "Enabled",
|
6953
|
+
"required": true,
|
6954
|
+
"type": "bool",
|
6955
|
+
"value_allowed_null": false
|
6956
|
+
},
|
6957
|
+
{
|
6958
|
+
"disabled": false,
|
6959
|
+
"document": "网关的带宽。",
|
6960
|
+
"example": "5",
|
6961
|
+
"member": "uint64",
|
6962
|
+
"name": "Bandwidth",
|
6963
|
+
"required": true,
|
6964
|
+
"type": "int",
|
6965
|
+
"value_allowed_null": false
|
6966
|
+
},
|
6967
|
+
{
|
6968
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
6969
|
+
"member": "string",
|
6970
|
+
"name": "RequestId",
|
6971
|
+
"type": "string"
|
6972
|
+
}
|
6973
|
+
],
|
6974
|
+
"type": "object"
|
6975
|
+
},
|
6922
6976
|
"CheckNetDetectStateRequest": {
|
6923
6977
|
"document": "CheckNetDetectState请求参数结构体",
|
6924
6978
|
"members": [
|
@@ -278,6 +278,14 @@
|
|
278
278
|
"title": "预判是否可建默认子网"
|
279
279
|
}
|
280
280
|
],
|
281
|
+
"CheckGatewayFlowMonitor": [
|
282
|
+
{
|
283
|
+
"document": "",
|
284
|
+
"input": "https://vpc.tencentcloudapi.com/?Action=CheckGatewayFlowMonitor\n&GatewayId=vpngw-4je9dgin\n&<公共请求参数>",
|
285
|
+
"output": "{\n \"Response\": {\n \"Enabled\": true,\n \"Bandwidth\": 5,\n \"RequestId\": \"5cf1a813-d4f8-4e0c-8f90-c155a84a3ea1\"\n }\n}",
|
286
|
+
"title": "示例1 查询VPN网关是否开启了网关流控"
|
287
|
+
}
|
288
|
+
],
|
281
289
|
"CheckNetDetectState": [
|
282
290
|
{
|
283
291
|
"document": "根据网络探测ID验证探测参数",
|
tccli/services/vpc/vpc_client.py
CHANGED
@@ -641,6 +641,58 @@ def doDescribeAddresses(args, parsed_globals):
|
|
641
641
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
642
642
|
|
643
643
|
|
644
|
+
def doCheckGatewayFlowMonitor(args, parsed_globals):
|
645
|
+
g_param = parse_global_arg(parsed_globals)
|
646
|
+
|
647
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
648
|
+
cred = credential.CVMRoleCredential()
|
649
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
650
|
+
cred = credential.STSAssumeRoleCredential(
|
651
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
652
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
653
|
+
)
|
654
|
+
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):
|
655
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
656
|
+
else:
|
657
|
+
cred = credential.Credential(
|
658
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
659
|
+
)
|
660
|
+
http_profile = HttpProfile(
|
661
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
662
|
+
reqMethod="POST",
|
663
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
664
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
665
|
+
)
|
666
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
667
|
+
if g_param[OptionsDefine.Language]:
|
668
|
+
profile.language = g_param[OptionsDefine.Language]
|
669
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
670
|
+
client = mod.VpcClient(cred, g_param[OptionsDefine.Region], profile)
|
671
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
672
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
673
|
+
model = models.CheckGatewayFlowMonitorRequest()
|
674
|
+
model.from_json_string(json.dumps(args))
|
675
|
+
start_time = time.time()
|
676
|
+
while True:
|
677
|
+
rsp = client.CheckGatewayFlowMonitor(model)
|
678
|
+
result = rsp.to_json_string()
|
679
|
+
try:
|
680
|
+
json_obj = json.loads(result)
|
681
|
+
except TypeError as e:
|
682
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
683
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
684
|
+
break
|
685
|
+
cur_time = time.time()
|
686
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
687
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
688
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
689
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
690
|
+
else:
|
691
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
692
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
693
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
694
|
+
|
695
|
+
|
644
696
|
def doCreateCcnRouteTables(args, parsed_globals):
|
645
697
|
g_param = parse_global_arg(parsed_globals)
|
646
698
|
|
@@ -20944,6 +20996,7 @@ ACTION_MAP = {
|
|
20944
20996
|
"AcceptVpcPeeringConnection": doAcceptVpcPeeringConnection,
|
20945
20997
|
"EnableGatewayFlowMonitor": doEnableGatewayFlowMonitor,
|
20946
20998
|
"DescribeAddresses": doDescribeAddresses,
|
20999
|
+
"CheckGatewayFlowMonitor": doCheckGatewayFlowMonitor,
|
20947
21000
|
"CreateCcnRouteTables": doCreateCcnRouteTables,
|
20948
21001
|
"ReplaceCcnRouteTableBroadcastPolicys": doReplaceCcnRouteTableBroadcastPolicys,
|
20949
21002
|
"ModifyVpnGatewaySslClientCert": doModifyVpnGatewaySslClientCert,
|
@@ -938,6 +938,13 @@
|
|
938
938
|
"output": "ModifyUserLevelResponse",
|
939
939
|
"status": "online"
|
940
940
|
},
|
941
|
+
"ModifyUserSignatureClass": {
|
942
|
+
"document": "切换Tiga引擎规则类型的生效开关",
|
943
|
+
"input": "ModifyUserSignatureClassRequest",
|
944
|
+
"name": "切换规则类型生效开关",
|
945
|
+
"output": "ModifyUserSignatureClassResponse",
|
946
|
+
"status": "online"
|
947
|
+
},
|
941
948
|
"ModifyUserSignatureRule": {
|
942
949
|
"document": "修改用户防护规则,开启关闭具体的某条规则",
|
943
950
|
"input": "ModifyUserSignatureRuleRequest",
|
@@ -1015,6 +1022,13 @@
|
|
1015
1022
|
"output": "SwitchElasticModeResponse",
|
1016
1023
|
"status": "online"
|
1017
1024
|
},
|
1025
|
+
"UpdateProtectionModes": {
|
1026
|
+
"document": "更新Tiga引擎下大类规则的防护模式",
|
1027
|
+
"input": "UpdateProtectionModesRequest",
|
1028
|
+
"name": "批量更新规则防护模式",
|
1029
|
+
"output": "UpdateProtectionModesResponse",
|
1030
|
+
"status": "online"
|
1031
|
+
},
|
1018
1032
|
"UpsertCCAutoStatus": {
|
1019
1033
|
"document": "编辑SAAS型接入的紧急CC防护状态",
|
1020
1034
|
"input": "UpsertCCAutoStatusRequest",
|
@@ -18554,6 +18568,71 @@
|
|
18554
18568
|
],
|
18555
18569
|
"type": "object"
|
18556
18570
|
},
|
18571
|
+
"ModifyUserSignatureClassRequest": {
|
18572
|
+
"document": "ModifyUserSignatureClass请求参数结构体",
|
18573
|
+
"members": [
|
18574
|
+
{
|
18575
|
+
"disabled": false,
|
18576
|
+
"document": "域名",
|
18577
|
+
"example": "www.test.com",
|
18578
|
+
"member": "string",
|
18579
|
+
"name": "Domain",
|
18580
|
+
"required": false,
|
18581
|
+
"type": "string"
|
18582
|
+
},
|
18583
|
+
{
|
18584
|
+
"disabled": false,
|
18585
|
+
"document": "规则类型ID",
|
18586
|
+
"example": "010000000",
|
18587
|
+
"member": "string",
|
18588
|
+
"name": "TypeID",
|
18589
|
+
"required": false,
|
18590
|
+
"type": "string"
|
18591
|
+
},
|
18592
|
+
{
|
18593
|
+
"disabled": false,
|
18594
|
+
"document": "规则类型状态,0:关闭,1:开启",
|
18595
|
+
"example": "0",
|
18596
|
+
"member": "int64",
|
18597
|
+
"name": "Status",
|
18598
|
+
"required": false,
|
18599
|
+
"type": "int"
|
18600
|
+
}
|
18601
|
+
],
|
18602
|
+
"type": "object"
|
18603
|
+
},
|
18604
|
+
"ModifyUserSignatureClassResponse": {
|
18605
|
+
"document": "ModifyUserSignatureClass返回参数结构体",
|
18606
|
+
"members": [
|
18607
|
+
{
|
18608
|
+
"disabled": false,
|
18609
|
+
"document": "规则类型ID",
|
18610
|
+
"example": "010000000",
|
18611
|
+
"member": "string",
|
18612
|
+
"name": "TypeID",
|
18613
|
+
"output_required": false,
|
18614
|
+
"type": "string",
|
18615
|
+
"value_allowed_null": false
|
18616
|
+
},
|
18617
|
+
{
|
18618
|
+
"disabled": false,
|
18619
|
+
"document": "规则类型状态,0:关闭,1:开启",
|
18620
|
+
"example": "0",
|
18621
|
+
"member": "int64",
|
18622
|
+
"name": "Status",
|
18623
|
+
"output_required": false,
|
18624
|
+
"type": "int",
|
18625
|
+
"value_allowed_null": false
|
18626
|
+
},
|
18627
|
+
{
|
18628
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
18629
|
+
"member": "string",
|
18630
|
+
"name": "RequestId",
|
18631
|
+
"type": "string"
|
18632
|
+
}
|
18633
|
+
],
|
18634
|
+
"type": "object"
|
18635
|
+
},
|
18557
18636
|
"ModifyUserSignatureRuleRequest": {
|
18558
18637
|
"document": "ModifyUserSignatureRule请求参数结构体",
|
18559
18638
|
"members": [
|
@@ -20668,6 +20747,70 @@
|
|
20668
20747
|
],
|
20669
20748
|
"usage": "both"
|
20670
20749
|
},
|
20750
|
+
"UpdateProtectionModesRequest": {
|
20751
|
+
"document": "UpdateProtectionModes请求参数结构体",
|
20752
|
+
"members": [
|
20753
|
+
{
|
20754
|
+
"disabled": false,
|
20755
|
+
"document": "域名",
|
20756
|
+
"example": "无",
|
20757
|
+
"member": "string",
|
20758
|
+
"name": "Domain",
|
20759
|
+
"required": true,
|
20760
|
+
"type": "string"
|
20761
|
+
},
|
20762
|
+
{
|
20763
|
+
"disabled": false,
|
20764
|
+
"document": "资源类型",
|
20765
|
+
"example": "sparta-waf",
|
20766
|
+
"member": "string",
|
20767
|
+
"name": "Edition",
|
20768
|
+
"required": true,
|
20769
|
+
"type": "string"
|
20770
|
+
},
|
20771
|
+
{
|
20772
|
+
"disabled": false,
|
20773
|
+
"document": "大类规则ID",
|
20774
|
+
"example": "[010000000,020000000]",
|
20775
|
+
"member": "string",
|
20776
|
+
"name": "TypeIDs",
|
20777
|
+
"required": true,
|
20778
|
+
"type": "list"
|
20779
|
+
},
|
20780
|
+
{
|
20781
|
+
"disabled": false,
|
20782
|
+
"document": "0表示观察,1表示拦截",
|
20783
|
+
"example": "0",
|
20784
|
+
"member": "int64",
|
20785
|
+
"name": "Mode",
|
20786
|
+
"required": true,
|
20787
|
+
"type": "int"
|
20788
|
+
}
|
20789
|
+
],
|
20790
|
+
"type": "object"
|
20791
|
+
},
|
20792
|
+
"UpdateProtectionModesResponse": {
|
20793
|
+
"document": "UpdateProtectionModes返回参数结构体",
|
20794
|
+
"members": [
|
20795
|
+
{
|
20796
|
+
"disabled": false,
|
20797
|
+
"document": "操作结果\n注意:此字段可能返回 null,表示取不到有效值。",
|
20798
|
+
"example": "无",
|
20799
|
+
"member": "CommonRspData",
|
20800
|
+
"name": "CommonRsp",
|
20801
|
+
"output_required": false,
|
20802
|
+
"type": "object",
|
20803
|
+
"value_allowed_null": true
|
20804
|
+
},
|
20805
|
+
{
|
20806
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
20807
|
+
"member": "string",
|
20808
|
+
"name": "RequestId",
|
20809
|
+
"type": "string"
|
20810
|
+
}
|
20811
|
+
],
|
20812
|
+
"type": "object"
|
20813
|
+
},
|
20671
20814
|
"UpsertCCAutoStatusRequest": {
|
20672
20815
|
"document": "UpsertCCAutoStatus请求参数结构体",
|
20673
20816
|
"members": [
|
@@ -1120,6 +1120,14 @@
|
|
1120
1120
|
"title": "查询示例"
|
1121
1121
|
}
|
1122
1122
|
],
|
1123
|
+
"ModifyUserSignatureClass": [
|
1124
|
+
{
|
1125
|
+
"document": "",
|
1126
|
+
"input": "POST / HTTP/1.1\nHost: waf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyUserSignatureClass\n<公共请求参数>\n\n{\n \"Domain\": \"www.test.com\",\n \"TypeID\": \"010000000\",\n \"Status\": 0\n}",
|
1127
|
+
"output": "{\n \"Response\": {\n \"TypeID\": \"010000000\",\n \"Status\": 0,\n \"RequestId\": \"f5063595-f20c-4fa8-9ae4-aed9f16dcb43\"\n }\n}",
|
1128
|
+
"title": "切换Tiga引擎规则类型的生效开关"
|
1129
|
+
}
|
1130
|
+
],
|
1123
1131
|
"ModifyUserSignatureRule": [
|
1124
1132
|
{
|
1125
1133
|
"document": "",
|
@@ -1208,6 +1216,14 @@
|
|
1208
1216
|
"title": "切换弹性的开关"
|
1209
1217
|
}
|
1210
1218
|
],
|
1219
|
+
"UpdateProtectionModes": [
|
1220
|
+
{
|
1221
|
+
"document": "",
|
1222
|
+
"input": "POST / HTTP/1.1\nHost: waf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: UpdateProtectionModes\n<公共请求参数>\n\n{\n \"Domain\": \"abc\",\n \"Edition\": \"abc\",\n \"TypeIDs\": [\n \"abc\"\n ],\n \"Mode\": 0\n}",
|
1223
|
+
"output": "{\n \"Response\": {\n \"CommonRsp\": {\n \"Code\": 0,\n \"Msg\": \"abc\"\n },\n \"RequestId\": \"abc\"\n }\n}",
|
1224
|
+
"title": "更新Tiga引擎下大类规则的防护模式"
|
1225
|
+
}
|
1226
|
+
],
|
1211
1227
|
"UpsertCCAutoStatus": [
|
1212
1228
|
{
|
1213
1229
|
"document": "",
|
tccli/services/waf/waf_client.py
CHANGED
@@ -7609,6 +7609,58 @@ def doModifyApiSecEventChange(args, parsed_globals):
|
|
7609
7609
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7610
7610
|
|
7611
7611
|
|
7612
|
+
def doModifyUserSignatureClass(args, parsed_globals):
|
7613
|
+
g_param = parse_global_arg(parsed_globals)
|
7614
|
+
|
7615
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
7616
|
+
cred = credential.CVMRoleCredential()
|
7617
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7618
|
+
cred = credential.STSAssumeRoleCredential(
|
7619
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7620
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7621
|
+
)
|
7622
|
+
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):
|
7623
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
7624
|
+
else:
|
7625
|
+
cred = credential.Credential(
|
7626
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
7627
|
+
)
|
7628
|
+
http_profile = HttpProfile(
|
7629
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
7630
|
+
reqMethod="POST",
|
7631
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
7632
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
7633
|
+
)
|
7634
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
7635
|
+
if g_param[OptionsDefine.Language]:
|
7636
|
+
profile.language = g_param[OptionsDefine.Language]
|
7637
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
7638
|
+
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
7639
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
7640
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7641
|
+
model = models.ModifyUserSignatureClassRequest()
|
7642
|
+
model.from_json_string(json.dumps(args))
|
7643
|
+
start_time = time.time()
|
7644
|
+
while True:
|
7645
|
+
rsp = client.ModifyUserSignatureClass(model)
|
7646
|
+
result = rsp.to_json_string()
|
7647
|
+
try:
|
7648
|
+
json_obj = json.loads(result)
|
7649
|
+
except TypeError as e:
|
7650
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
7651
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
7652
|
+
break
|
7653
|
+
cur_time = time.time()
|
7654
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
7655
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
7656
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
7657
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
7658
|
+
else:
|
7659
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
7660
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
7661
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7662
|
+
|
7663
|
+
|
7612
7664
|
def doAddDomainWhiteRule(args, parsed_globals):
|
7613
7665
|
g_param = parse_global_arg(parsed_globals)
|
7614
7666
|
|
@@ -7713,6 +7765,58 @@ def doModifyDomainIpv6Status(args, parsed_globals):
|
|
7713
7765
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7714
7766
|
|
7715
7767
|
|
7768
|
+
def doUpdateProtectionModes(args, parsed_globals):
|
7769
|
+
g_param = parse_global_arg(parsed_globals)
|
7770
|
+
|
7771
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
7772
|
+
cred = credential.CVMRoleCredential()
|
7773
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
7774
|
+
cred = credential.STSAssumeRoleCredential(
|
7775
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
7776
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
7777
|
+
)
|
7778
|
+
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):
|
7779
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
7780
|
+
else:
|
7781
|
+
cred = credential.Credential(
|
7782
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
7783
|
+
)
|
7784
|
+
http_profile = HttpProfile(
|
7785
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
7786
|
+
reqMethod="POST",
|
7787
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
7788
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
7789
|
+
)
|
7790
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
7791
|
+
if g_param[OptionsDefine.Language]:
|
7792
|
+
profile.language = g_param[OptionsDefine.Language]
|
7793
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
7794
|
+
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
7795
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
7796
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
7797
|
+
model = models.UpdateProtectionModesRequest()
|
7798
|
+
model.from_json_string(json.dumps(args))
|
7799
|
+
start_time = time.time()
|
7800
|
+
while True:
|
7801
|
+
rsp = client.UpdateProtectionModes(model)
|
7802
|
+
result = rsp.to_json_string()
|
7803
|
+
try:
|
7804
|
+
json_obj = json.loads(result)
|
7805
|
+
except TypeError as e:
|
7806
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
7807
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
7808
|
+
break
|
7809
|
+
cur_time = time.time()
|
7810
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
7811
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
7812
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
7813
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
7814
|
+
else:
|
7815
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
7816
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
7817
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
7818
|
+
|
7819
|
+
|
7716
7820
|
def doModifyUserLevel(args, parsed_globals):
|
7717
7821
|
g_param = parse_global_arg(parsed_globals)
|
7718
7822
|
|
@@ -7922,8 +8026,10 @@ ACTION_MAP = {
|
|
7922
8026
|
"FreshAntiFakeUrl": doFreshAntiFakeUrl,
|
7923
8027
|
"DescribeDomainRules": doDescribeDomainRules,
|
7924
8028
|
"ModifyApiSecEventChange": doModifyApiSecEventChange,
|
8029
|
+
"ModifyUserSignatureClass": doModifyUserSignatureClass,
|
7925
8030
|
"AddDomainWhiteRule": doAddDomainWhiteRule,
|
7926
8031
|
"ModifyDomainIpv6Status": doModifyDomainIpv6Status,
|
8032
|
+
"UpdateProtectionModes": doUpdateProtectionModes,
|
7927
8033
|
"ModifyUserLevel": doModifyUserLevel,
|
7928
8034
|
|
7929
8035
|
}
|