tccli 3.0.1390.1__py2.py3-none-any.whl → 3.0.1391.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.
@@ -77,6 +77,13 @@
77
77
  "output": "CreateAreaBanRuleResponse",
78
78
  "status": "online"
79
79
  },
80
+ "CreateBatchIpAccessControl": {
81
+ "document": "批量IP黑白名单新增接口",
82
+ "input": "CreateBatchIpAccessControlRequest",
83
+ "name": "批量IP黑白名单新增接口",
84
+ "output": "CreateBatchIpAccessControlResponse",
85
+ "status": "online"
86
+ },
80
87
  "CreateDeals": {
81
88
  "document": "计费资源购买、续费下单接口",
82
89
  "input": "CreateDealsRequest",
@@ -161,6 +168,13 @@
161
168
  "output": "DeleteAttackWhiteRuleResponse",
162
169
  "status": "online"
163
170
  },
171
+ "DeleteBatchIpAccessControl": {
172
+ "document": "批量黑白名单删除接口",
173
+ "input": "DeleteBatchIpAccessControlRequest",
174
+ "name": "批量IP黑白名单删除接口",
175
+ "output": "DeleteBatchIpAccessControlResponse",
176
+ "status": "online"
177
+ },
164
178
  "DeleteBotSceneUCBRule": {
165
179
  "document": "场景化后删除Bot的UCB自定义规则",
166
180
  "input": "DeleteBotSceneUCBRuleRequest",
@@ -910,6 +924,13 @@
910
924
  "output": "ModifyAttackWhiteRuleResponse",
911
925
  "status": "online"
912
926
  },
927
+ "ModifyBatchIpAccessControl": {
928
+ "document": "批量IP黑白名单新增接口",
929
+ "input": "ModifyBatchIpAccessControlRequest",
930
+ "name": "批量IP黑白名单编辑接口",
931
+ "output": "ModifyBatchIpAccessControlResponse",
932
+ "status": "online"
933
+ },
913
934
  "ModifyBotSceneStatus": {
914
935
  "document": "bot子场景开关",
915
936
  "input": "ModifyBotSceneStatusRequest",
@@ -3568,6 +3589,34 @@
3568
3589
  ],
3569
3590
  "usage": "both"
3570
3591
  },
3592
+ "BatchDomainResult": {
3593
+ "document": "批量防护失败的域名以及对应的原因。",
3594
+ "members": [
3595
+ {
3596
+ "disabled": false,
3597
+ "document": "批量操作中失败的域名",
3598
+ "example": "www.testwaf.com",
3599
+ "member": "string",
3600
+ "name": "Domain",
3601
+ "output_required": false,
3602
+ "required": false,
3603
+ "type": "string",
3604
+ "value_allowed_null": false
3605
+ },
3606
+ {
3607
+ "disabled": false,
3608
+ "document": "操作失败的原因",
3609
+ "example": "超过规格限制",
3610
+ "member": "string",
3611
+ "name": "Message",
3612
+ "output_required": false,
3613
+ "required": false,
3614
+ "type": "string",
3615
+ "value_allowed_null": false
3616
+ }
3617
+ ],
3618
+ "usage": "both"
3619
+ },
3571
3620
  "BatchIpAccessControlData": {
3572
3621
  "document": "多域名黑白名单describe返回",
3573
3622
  "members": [
@@ -6108,6 +6157,107 @@
6108
6157
  ],
6109
6158
  "type": "object"
6110
6159
  },
6160
+ "CreateBatchIpAccessControlRequest": {
6161
+ "document": "CreateBatchIpAccessControl请求参数结构体",
6162
+ "members": [
6163
+ {
6164
+ "disabled": false,
6165
+ "document": "IP参数列表",
6166
+ "example": "[\"192.16.8.1.1\",\"192.168.2.1\"]",
6167
+ "member": "string",
6168
+ "name": "IpList",
6169
+ "required": true,
6170
+ "type": "list"
6171
+ },
6172
+ {
6173
+ "disabled": false,
6174
+ "document": "规则执行的方式,TimedJob为定时执行,CronJob为周期执行",
6175
+ "example": "TimedJob",
6176
+ "member": "string",
6177
+ "name": "JobType",
6178
+ "required": true,
6179
+ "type": "string"
6180
+ },
6181
+ {
6182
+ "disabled": false,
6183
+ "document": "定时任务配置",
6184
+ "example": "{\"Timed\":[{\"StartDateTime\":1711618518,\"EndDateTime\":1711918518}],\"Cron\":[{\"Day\":12,\"WDay\":2,\"StartTime\":\"12:11\",\"EndTime\":\"21:00\"}],\"TimeTZone\":\"UTC+8\"}",
6185
+ "member": "JobDateTime",
6186
+ "name": "JobDateTime",
6187
+ "required": true,
6188
+ "type": "object"
6189
+ },
6190
+ {
6191
+ "disabled": false,
6192
+ "document": "42为黑名单,40为白名单",
6193
+ "example": "42",
6194
+ "member": "int64",
6195
+ "name": "ActionType",
6196
+ "required": true,
6197
+ "type": "int"
6198
+ },
6199
+ {
6200
+ "disabled": false,
6201
+ "document": "防护对象组ID列表,如果绑定的是防护对象组,和Domains参数二选一",
6202
+ "example": "[11101, 11102]",
6203
+ "member": "uint64",
6204
+ "name": "GroupIds",
6205
+ "required": false,
6206
+ "type": "list"
6207
+ },
6208
+ {
6209
+ "disabled": false,
6210
+ "document": "域名列表,如果绑定的是批量域名,和GroupIds参数二选一",
6211
+ "example": "[\"www.qcloudwaf.com\",\"test.waf.com\"]",
6212
+ "member": "string",
6213
+ "name": "Domains",
6214
+ "required": false,
6215
+ "type": "list"
6216
+ },
6217
+ {
6218
+ "disabled": false,
6219
+ "document": "备注",
6220
+ "example": "备注",
6221
+ "member": "string",
6222
+ "name": "Note",
6223
+ "required": false,
6224
+ "type": "string"
6225
+ }
6226
+ ],
6227
+ "type": "object"
6228
+ },
6229
+ "CreateBatchIpAccessControlResponse": {
6230
+ "document": "CreateBatchIpAccessControl返回参数结构体",
6231
+ "members": [
6232
+ {
6233
+ "disabled": false,
6234
+ "document": "添加失败的域名列表,如果非空则表示有域名添加失败,整个批量规则添加失败,否则则表示批量规则添加成功。",
6235
+ "example": "[{\"Domain\":\"www.testwaf.com\", \"Message\":\"域名IP个数超过规格\"}]",
6236
+ "member": "BatchDomainResult",
6237
+ "name": "Failed",
6238
+ "output_required": false,
6239
+ "type": "list",
6240
+ "value_allowed_null": false
6241
+ },
6242
+ {
6243
+ "disabled": false,
6244
+ "document": "添加成功的批量规则ID",
6245
+ "example": "11101",
6246
+ "member": "uint64",
6247
+ "name": "RuleId",
6248
+ "output_required": false,
6249
+ "type": "int",
6250
+ "value_allowed_null": false
6251
+ },
6252
+ {
6253
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
6254
+ "member": "string",
6255
+ "name": "RequestId",
6256
+ "type": "string"
6257
+ }
6258
+ ],
6259
+ "type": "object"
6260
+ },
6111
6261
  "CreateDealsGoods": {
6112
6262
  "document": "计费下单接口出入参Goods",
6113
6263
  "members": [
@@ -7172,6 +7322,33 @@
7172
7322
  ],
7173
7323
  "type": "object"
7174
7324
  },
7325
+ "DeleteBatchIpAccessControlRequest": {
7326
+ "document": "DeleteBatchIpAccessControl请求参数结构体",
7327
+ "members": [
7328
+ {
7329
+ "disabled": false,
7330
+ "document": "规则ID列表,支持批量删除",
7331
+ "example": "[552091011,552091010]",
7332
+ "member": "uint64",
7333
+ "name": "Ids",
7334
+ "required": false,
7335
+ "type": "list"
7336
+ }
7337
+ ],
7338
+ "type": "object"
7339
+ },
7340
+ "DeleteBatchIpAccessControlResponse": {
7341
+ "document": "DeleteBatchIpAccessControl返回参数结构体",
7342
+ "members": [
7343
+ {
7344
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
7345
+ "member": "string",
7346
+ "name": "RequestId",
7347
+ "type": "string"
7348
+ }
7349
+ ],
7350
+ "type": "object"
7351
+ },
7175
7352
  "DeleteBotSceneUCBRuleRequest": {
7176
7353
  "document": "DeleteBotSceneUCBRule请求参数结构体",
7177
7354
  "members": [
@@ -20193,6 +20370,106 @@
20193
20370
  ],
20194
20371
  "type": "object"
20195
20372
  },
20373
+ "ModifyBatchIpAccessControlRequest": {
20374
+ "document": "ModifyBatchIpAccessControl请求参数结构体",
20375
+ "members": [
20376
+ {
20377
+ "disabled": false,
20378
+ "document": "编辑的批量规则ID",
20379
+ "example": "1101",
20380
+ "member": "uint64",
20381
+ "name": "RuleId",
20382
+ "required": true,
20383
+ "type": "int"
20384
+ },
20385
+ {
20386
+ "disabled": false,
20387
+ "document": "IP参数列表",
20388
+ "example": "[\"192.16.8.1.1\",\"192.168.2.1\"]",
20389
+ "member": "string",
20390
+ "name": "IpList",
20391
+ "required": true,
20392
+ "type": "list"
20393
+ },
20394
+ {
20395
+ "disabled": false,
20396
+ "document": "规则执行的方式,TimedJob为定时执行,CronJob为周期执行",
20397
+ "example": "TimedJob",
20398
+ "member": "string",
20399
+ "name": "JobType",
20400
+ "required": true,
20401
+ "type": "string"
20402
+ },
20403
+ {
20404
+ "disabled": false,
20405
+ "document": "定时任务配置",
20406
+ "example": "{\"Timed\":[{\"StartDateTime\":1711618518,\"EndDateTime\":1711918518}],\"Cron\":[{\"Day\":12,\"WDay\":2,\"StartTime\":\"12:11\",\"EndTime\":\"21:00\"}],\"TimeTZone\":\"UTC+8\"}",
20407
+ "member": "JobDateTime",
20408
+ "name": "JobDateTime",
20409
+ "required": true,
20410
+ "type": "object"
20411
+ },
20412
+ {
20413
+ "disabled": false,
20414
+ "document": "42为黑名单,40为白名单",
20415
+ "example": "42",
20416
+ "member": "int64",
20417
+ "name": "ActionType",
20418
+ "required": true,
20419
+ "type": "int"
20420
+ },
20421
+ {
20422
+ "disabled": false,
20423
+ "document": "防护对象组ID列表,如果绑定的是防护对象组,和Domains参数二选一",
20424
+ "example": "[11101, 11102]",
20425
+ "member": "uint64",
20426
+ "name": "GroupIds",
20427
+ "required": false,
20428
+ "type": "list"
20429
+ },
20430
+ {
20431
+ "disabled": false,
20432
+ "document": "域名列表,如果绑定的是批量域名,和GroupIds参数二选一",
20433
+ "example": "[\"www.qcloudwaf.com\",\"test.waf.com\"]",
20434
+ "member": "string",
20435
+ "name": "Domains",
20436
+ "required": false,
20437
+ "type": "list"
20438
+ },
20439
+ {
20440
+ "disabled": false,
20441
+ "document": "备注",
20442
+ "example": "备注",
20443
+ "member": "string",
20444
+ "name": "Note",
20445
+ "required": false,
20446
+ "type": "string"
20447
+ }
20448
+ ],
20449
+ "type": "object"
20450
+ },
20451
+ "ModifyBatchIpAccessControlResponse": {
20452
+ "document": "ModifyBatchIpAccessControl返回参数结构体",
20453
+ "members": [
20454
+ {
20455
+ "disabled": false,
20456
+ "document": "编辑失败的域名列表,如果非空则表示有域名编辑失败,整个批量规则编辑失败,否则则表示批量规则编辑成功。",
20457
+ "example": "[{\"Domain\":\"www.testwaf.com\", \"Message\":\"域名IP个数超过规格\"}]",
20458
+ "member": "BatchDomainResult",
20459
+ "name": "Failed",
20460
+ "output_required": false,
20461
+ "type": "list",
20462
+ "value_allowed_null": false
20463
+ },
20464
+ {
20465
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
20466
+ "member": "string",
20467
+ "name": "RequestId",
20468
+ "type": "string"
20469
+ }
20470
+ ],
20471
+ "type": "object"
20472
+ },
20196
20473
  "ModifyBotSceneStatusRequest": {
20197
20474
  "document": "ModifyBotSceneStatus请求参数结构体",
20198
20475
  "members": [
@@ -94,6 +94,14 @@
94
94
  "title": "添加地域封禁规则"
95
95
  }
96
96
  ],
97
+ "CreateBatchIpAccessControl": [
98
+ {
99
+ "document": "",
100
+ "input": "POST / HTTP/1.1\nHost: waf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateBatchIpAccessControl\n<公共请求参数>\n\n{\n \"IpList\": [\n \"12.32.4.3\"\n ],\n \"ActionType\": 42,\n \"Domains\": [\n \"www.testwaf.com\",\n \"www.testwaf2.com\"\n ],\n \"Note\": \"\",\n \"JobType\": \"TimedJob\",\n \"JobDateTime\": {\n \"Timed\": [\n {\n \"StartDateTime\": 0,\n \"EndDateTime\": 0\n }\n ],\n \"TimeTZone\": \"UTC+8\"\n }\n}",
101
+ "output": "{\n \"Response\": {\n \"RequestId\": \"5331fe64-a3a5-49c4-8c4b-ada147d91403\",\n \"RuleId\": 5500921210\n }\n}",
102
+ "title": "新增批量IP黑白名单"
103
+ }
104
+ ],
97
105
  "CreateDeals": [
98
106
  {
99
107
  "document": "",
@@ -196,6 +204,14 @@
196
204
  "title": "查询示例"
197
205
  }
198
206
  ],
207
+ "DeleteBatchIpAccessControl": [
208
+ {
209
+ "document": "",
210
+ "input": "POST / HTTP/1.1\nHost: waf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteBatchIpAccessControl\n<公共请求参数>\n\n{\n \"Ids\": [\n 5500905783\n ]\n}",
211
+ "output": "{\n \"Response\": {\n \"RequestId\": \"90b403b2-186b-486c-8cc0-91703492fe2c\"\n }\n}",
212
+ "title": "批量删除IP黑白名单"
213
+ }
214
+ ],
199
215
  "DeleteBotSceneUCBRule": [
200
216
  {
201
217
  "document": "",
@@ -1070,6 +1086,14 @@
1070
1086
  "title": "修改示例"
1071
1087
  }
1072
1088
  ],
1089
+ "ModifyBatchIpAccessControl": [
1090
+ {
1091
+ "document": "",
1092
+ "input": "POST / HTTP/1.1\nHost: waf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyBatchIpAccessControl\n<公共请求参数>\n\n{\n \"IpList\": [\n \"1.1.1.1\"\n ],\n \"ActionType\": 42,\n \"Domains\": [\n \"www.testwaf.com\",\n \"www.testwaf2.com\"\n ],\n \"Note\": \"\",\n \"JobType\": \"TimedJob\",\n \"JobDateTime\": {\n \"Timed\": [\n {\n \"StartDateTime\": 0,\n \"EndDateTime\": 0\n }\n ],\n \"TimeTZone\": \"UTC+8\"\n },\n \"RuleId\": 5500894817\n}",
1093
+ "output": "{\n \"Response\": {\n \"RequestId\": \"f03362ba-b50e-4581-88e8-76bdc1b332f5\"\n }\n}",
1094
+ "title": "新增批量IP黑白名单"
1095
+ }
1096
+ ],
1073
1097
  "ModifyBotSceneStatus": [
1074
1098
  {
1075
1099
  "document": "",
@@ -3137,6 +3137,58 @@ def doDescribeVipInfo(args, parsed_globals):
3137
3137
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3138
3138
 
3139
3139
 
3140
+ def doDeleteBatchIpAccessControl(args, parsed_globals):
3141
+ g_param = parse_global_arg(parsed_globals)
3142
+
3143
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3144
+ cred = credential.CVMRoleCredential()
3145
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3146
+ cred = credential.STSAssumeRoleCredential(
3147
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3148
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3149
+ )
3150
+ 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):
3151
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3152
+ else:
3153
+ cred = credential.Credential(
3154
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3155
+ )
3156
+ http_profile = HttpProfile(
3157
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3158
+ reqMethod="POST",
3159
+ endpoint=g_param[OptionsDefine.Endpoint],
3160
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3161
+ )
3162
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3163
+ if g_param[OptionsDefine.Language]:
3164
+ profile.language = g_param[OptionsDefine.Language]
3165
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3166
+ client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
3167
+ client._sdkVersion += ("_CLI_" + __version__)
3168
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3169
+ model = models.DeleteBatchIpAccessControlRequest()
3170
+ model.from_json_string(json.dumps(args))
3171
+ start_time = time.time()
3172
+ while True:
3173
+ rsp = client.DeleteBatchIpAccessControl(model)
3174
+ result = rsp.to_json_string()
3175
+ try:
3176
+ json_obj = json.loads(result)
3177
+ except TypeError as e:
3178
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3179
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3180
+ break
3181
+ cur_time = time.time()
3182
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3183
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3184
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3185
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3186
+ else:
3187
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3188
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3189
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3190
+
3191
+
3140
3192
  def doDeleteHost(args, parsed_globals):
3141
3193
  g_param = parse_global_arg(parsed_globals)
3142
3194
 
@@ -4541,6 +4593,58 @@ def doModifyHost(args, parsed_globals):
4541
4593
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4542
4594
 
4543
4595
 
4596
+ def doModifyBatchIpAccessControl(args, parsed_globals):
4597
+ g_param = parse_global_arg(parsed_globals)
4598
+
4599
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
4600
+ cred = credential.CVMRoleCredential()
4601
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
4602
+ cred = credential.STSAssumeRoleCredential(
4603
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
4604
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
4605
+ )
4606
+ 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):
4607
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
4608
+ else:
4609
+ cred = credential.Credential(
4610
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
4611
+ )
4612
+ http_profile = HttpProfile(
4613
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
4614
+ reqMethod="POST",
4615
+ endpoint=g_param[OptionsDefine.Endpoint],
4616
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
4617
+ )
4618
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
4619
+ if g_param[OptionsDefine.Language]:
4620
+ profile.language = g_param[OptionsDefine.Language]
4621
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
4622
+ client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
4623
+ client._sdkVersion += ("_CLI_" + __version__)
4624
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
4625
+ model = models.ModifyBatchIpAccessControlRequest()
4626
+ model.from_json_string(json.dumps(args))
4627
+ start_time = time.time()
4628
+ while True:
4629
+ rsp = client.ModifyBatchIpAccessControl(model)
4630
+ result = rsp.to_json_string()
4631
+ try:
4632
+ json_obj = json.loads(result)
4633
+ except TypeError as e:
4634
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
4635
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
4636
+ break
4637
+ cur_time = time.time()
4638
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
4639
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
4640
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
4641
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
4642
+ else:
4643
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
4644
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
4645
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
4646
+
4647
+
4544
4648
  def doDescribeUserSignatureClass(args, parsed_globals):
4545
4649
  g_param = parse_global_arg(parsed_globals)
4546
4650
 
@@ -5217,6 +5321,58 @@ def doDescribeDomainDetailsSaas(args, parsed_globals):
5217
5321
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5218
5322
 
5219
5323
 
5324
+ def doCreateBatchIpAccessControl(args, parsed_globals):
5325
+ g_param = parse_global_arg(parsed_globals)
5326
+
5327
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5328
+ cred = credential.CVMRoleCredential()
5329
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5330
+ cred = credential.STSAssumeRoleCredential(
5331
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5332
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5333
+ )
5334
+ 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):
5335
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5336
+ else:
5337
+ cred = credential.Credential(
5338
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5339
+ )
5340
+ http_profile = HttpProfile(
5341
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5342
+ reqMethod="POST",
5343
+ endpoint=g_param[OptionsDefine.Endpoint],
5344
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5345
+ )
5346
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5347
+ if g_param[OptionsDefine.Language]:
5348
+ profile.language = g_param[OptionsDefine.Language]
5349
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5350
+ client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
5351
+ client._sdkVersion += ("_CLI_" + __version__)
5352
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5353
+ model = models.CreateBatchIpAccessControlRequest()
5354
+ model.from_json_string(json.dumps(args))
5355
+ start_time = time.time()
5356
+ while True:
5357
+ rsp = client.CreateBatchIpAccessControl(model)
5358
+ result = rsp.to_json_string()
5359
+ try:
5360
+ json_obj = json.loads(result)
5361
+ except TypeError as e:
5362
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5363
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5364
+ break
5365
+ cur_time = time.time()
5366
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5367
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5368
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5369
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5370
+ else:
5371
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5372
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5373
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5374
+
5375
+
5220
5376
  def doModifyBotStatus(args, parsed_globals):
5221
5377
  g_param = parse_global_arg(parsed_globals)
5222
5378
 
@@ -9552,6 +9708,7 @@ ACTION_MAP = {
9552
9708
  "DescribeUserSignatureRuleV2": doDescribeUserSignatureRuleV2,
9553
9709
  "DescribePostCKafkaFlows": doDescribePostCKafkaFlows,
9554
9710
  "DescribeVipInfo": doDescribeVipInfo,
9711
+ "DeleteBatchIpAccessControl": doDeleteBatchIpAccessControl,
9555
9712
  "DeleteHost": doDeleteHost,
9556
9713
  "DescribeAccessFastAnalysis": doDescribeAccessFastAnalysis,
9557
9714
  "CreateAreaBanRule": doCreateAreaBanRule,
@@ -9579,6 +9736,7 @@ ACTION_MAP = {
9579
9736
  "DescribeTopAttackDomain": doDescribeTopAttackDomain,
9580
9737
  "ModifyBotSceneStatus": doModifyBotSceneStatus,
9581
9738
  "ModifyHost": doModifyHost,
9739
+ "ModifyBatchIpAccessControl": doModifyBatchIpAccessControl,
9582
9740
  "DescribeUserSignatureClass": doDescribeUserSignatureClass,
9583
9741
  "DescribeTlsVersion": doDescribeTlsVersion,
9584
9742
  "ModifyProtectionStatus": doModifyProtectionStatus,
@@ -9592,6 +9750,7 @@ ACTION_MAP = {
9592
9750
  "DeleteDomainWhiteRules": doDeleteDomainWhiteRules,
9593
9751
  "ModifyAntiFakeUrlStatus": doModifyAntiFakeUrlStatus,
9594
9752
  "DescribeDomainDetailsSaas": doDescribeDomainDetailsSaas,
9753
+ "CreateBatchIpAccessControl": doCreateBatchIpAccessControl,
9595
9754
  "ModifyBotStatus": doModifyBotStatus,
9596
9755
  "ModifyAntiInfoLeakRules": doModifyAntiInfoLeakRules,
9597
9756
  "CreateIpAccessControl": doCreateIpAccessControl,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tccli
3
- Version: 3.0.1390.1
3
+ Version: 3.0.1391.1
4
4
  Summary: Universal Command Line Environment for Tencent Cloud
5
5
  Project-URL: Bug Tracker, https://github.com/TencentCloud/tencentcloud-cli/issues
6
6
  Project-URL: Homepage, https://github.com/TencentCloud/tencentcloud-cli
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 2.7
13
13
  Classifier: Programming Language :: Python :: 3
14
14
  Requires-Dist: jmespath==0.10.0
15
15
  Requires-Dist: six==1.16.0
16
- Requires-Dist: tencentcloud-sdk-python>=3.0.1390
16
+ Requires-Dist: tencentcloud-sdk-python>=3.0.1391
17
17
  Description-Content-Type: text/markdown
18
18
 
19
19
  # 命令行工具简介