tccli 3.0.897.1__py2.py3-none-any.whl → 3.0.899.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/examples/cdn/v20180606/ModifyDomainConfig.md +88 -0
- tccli/examples/cfs/v20190719/CreateMigrationTask.md +1 -1
- tccli/examples/cfs/v20190719/DeleteMigrationTask.md +1 -1
- tccli/examples/cfs/v20190719/ModifyFileSystemAutoScaleUpRule.md +1 -1
- tccli/examples/cfs/v20190719/ScaleUpFileSystem.md +1 -1
- tccli/examples/ckafka/v20190819/CreatePostPaidInstance.md +154 -0
- tccli/examples/cls/v20201016/DeleteShipper.md +2 -2
- tccli/examples/cls/v20201016/ModifyShipper.md +2 -2
- tccli/examples/cynosdb/v20190107/DescribeSupportProxyVersion.md +24 -0
- tccli/examples/ess/v20201111/CreateFlowApprovers.md +3 -1
- tccli/examples/ess/v20201111/DescribeThirdPartyAuthCode.md +1 -1
- tccli/examples/live/v20180801/DescribeLiveDomains.md +1 -1
- tccli/examples/nlp/v20190408/AnalyzeSentiment.md +24 -0
- tccli/examples/nlp/v20190408/ClassifyContent.md +39 -0
- tccli/examples/nlp/v20190408/ComposeCouplet.md +27 -0
- tccli/examples/nlp/v20190408/ComposePoetry.md +29 -0
- tccli/examples/postgres/v20170312/CreateReadOnlyDBInstance.md +1 -1
- tccli/examples/postgres/v20170312/UpgradeDBInstanceKernelVersion.md +1 -1
- tccli/examples/sqlserver/v20180328/DescribeDBInstancesAttribute.md +6 -1
- tccli/examples/sqlserver/v20180328/DescribeDBs.md +1 -1
- tccli/examples/tdmq/v20200217/CreateCmqQueue.md +2 -2
- tccli/examples/tke/v20180525/CreateClusterEndpointVip.md +1 -1
- tccli/examples/trp/v20210515/CreateCodeBatch.md +11 -5
- tccli/examples/trp/v20210515/DescribeScanLogs.md +1 -1
- tccli/examples/trp/v20210515/DescribeTraceCodeById.md +16 -11
- tccli/examples/trp/v20210515/ModifyCodeBatch.md +3 -3
- tccli/examples/waf/v20180125/ModifySpartaProtection.md +154 -0
- tccli/examples/wedata/v20210820/DescribeDimensionScore.md +15 -3
- tccli/examples/wedata/v20210820/DescribeQualityScore.md +1 -1
- tccli/examples/wedata/v20210820/DescribeQualityScoreTrend.md +10 -2
- tccli/examples/wedata/v20210820/DescribeTableQualityDetails.md +1 -1
- tccli/examples/wedata/v20210820/DescribeTableScoreTrend.md +10 -2
- tccli/services/antiddos/v20200309/api.json +45 -26
- tccli/services/apigateway/v20180808/api.json +17 -28
- tccli/services/asr/v20190614/api.json +3 -2
- tccli/services/cdb/v20170320/api.json +16 -11
- tccli/services/cdn/cdn_client.py +57 -4
- tccli/services/cdn/v20180606/api.json +52 -0
- tccli/services/cdn/v20180606/examples.json +26 -0
- tccli/services/cfs/v20190719/api.json +7 -0
- tccli/services/cfs/v20190719/examples.json +4 -4
- tccli/services/ckafka/ckafka_client.py +61 -8
- tccli/services/ckafka/v20190819/api.json +296 -6
- tccli/services/ckafka/v20190819/examples.json +20 -0
- tccli/services/cls/v20201016/api.json +3 -4
- tccli/services/cls/v20201016/examples.json +4 -4
- tccli/services/cynosdb/cynosdb_client.py +53 -0
- tccli/services/cynosdb/v20190107/api.json +72 -0
- tccli/services/cynosdb/v20190107/examples.json +8 -0
- tccli/services/ess/v20201111/api.json +44 -11
- tccli/services/ess/v20201111/examples.json +3 -3
- tccli/services/essbasic/v20210526/api.json +27 -1
- tccli/services/live/v20180801/api.json +4 -11
- tccli/services/live/v20180801/examples.json +1 -1
- tccli/services/nlp/nlp_client.py +216 -4
- tccli/services/nlp/v20190408/api.json +329 -0
- tccli/services/nlp/v20190408/examples.json +32 -0
- tccli/services/postgres/v20170312/api.json +2 -31
- tccli/services/postgres/v20170312/examples.json +2 -2
- tccli/services/sqlserver/v20180328/api.json +72 -15
- tccli/services/sqlserver/v20180328/examples.json +3 -3
- tccli/services/tbaas/tbaas_client.py +4 -322
- tccli/services/tbaas/v20180416/api.json +123 -825
- tccli/services/tbaas/v20180416/examples.json +0 -48
- tccli/services/tdid/tdid_client.py +60 -1650
- tccli/services/tdid/v20210519/api.json +394 -3848
- tccli/services/tdid/v20210519/examples.json +0 -240
- tccli/services/tdmq/v20200217/api.json +2 -19
- tccli/services/tdmq/v20200217/examples.json +2 -2
- tccli/services/tione/v20211111/api.json +24 -2
- tccli/services/tke/v20180525/api.json +4 -6
- tccli/services/tke/v20180525/examples.json +2 -2
- tccli/services/trp/v20210515/api.json +285 -113
- tccli/services/trp/v20210515/examples.json +6 -6
- tccli/services/tts/v20190823/api.json +7 -3
- tccli/services/waf/v20180125/api.json +401 -0
- tccli/services/waf/v20180125/examples.json +26 -0
- tccli/services/waf/waf_client.py +57 -4
- tccli/services/wedata/v20210820/api.json +151 -83
- tccli/services/wedata/v20210820/examples.json +8 -8
- {tccli-3.0.897.1.dist-info → tccli-3.0.899.1.dist-info}/METADATA +2 -2
- {tccli-3.0.897.1.dist-info → tccli-3.0.899.1.dist-info}/RECORD +86 -78
- {tccli-3.0.897.1.dist-info → tccli-3.0.899.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.897.1.dist-info → tccli-3.0.899.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.897.1.dist-info → tccli-3.0.899.1.dist-info}/license_files/LICENSE +0 -0
@@ -11,8 +11,8 @@
|
|
11
11
|
"CreateCodeBatch": [
|
12
12
|
{
|
13
13
|
"document": "新增批次",
|
14
|
-
"input": "POST / HTTP/1.1\nHost: trp.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateCodeBatch\n<公共请求参数>\n\n{\n \"
|
15
|
-
"output": "{\n \"Response\": {\n \"BatchId\": \"
|
14
|
+
"input": "POST / HTTP/1.1\nHost: trp.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CreateCodeBatch\n<公共请求参数>\n\n{\n \"MerchantId\": \"abc\",\n \"ProductId\": \"abc\",\n \"BatchType\": 1,\n \"BatchId\": \"abc\",\n \"Remark\": \"abc\",\n \"MpTpl\": \"abc\",\n \"CloneId\": \"abc\",\n \"BatchCode\": \"abc\",\n \"ValidDate\": \"abc\",\n \"ProductionDate\": \"abc\"\n}",
|
15
|
+
"output": "{\n \"Response\": {\n \"BatchId\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
|
16
16
|
"title": "新增批次"
|
17
17
|
}
|
18
18
|
],
|
@@ -242,7 +242,7 @@
|
|
242
242
|
],
|
243
243
|
"DescribeScanLogs": [
|
244
244
|
{
|
245
|
-
"document": "
|
245
|
+
"document": "查询扫描明细,查询参数 Code, Openid 至少需要一个",
|
246
246
|
"input": "POST / HTTP/1.1\nHost: trp.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeScanLogs\n<公共请求参数>\n\n{\n \"Code\": \"https://anxin.m.qq.com/qr/eqdmnz70000243813742005003\"\n}",
|
247
247
|
"output": "{\n \"Response\": {\n \"Products\": [],\n \"ScanLogs\": [\n {\n \"LogId\": 2,\n \"Openid\": \"abc\",\n \"Nickname\": \"demo\",\n \"CreateTime\": \"2021-12-06T07:13:35.000Z\",\n \"Code\": \"https://anxin.m.qq.com/qr/eqdmnz70000243813742005003\",\n \"CorpId\": 10000,\n \"MerchantId\": \"\",\n \"ProductId\": \"\",\n \"Ip\": \"127.0.0.1\",\n \"Country\": \"\",\n \"Province\": \"广东\",\n \"City\": \"广州\",\n \"District\": \"\"\n }\n ],\n \"TotalCount\": 1,\n \"RequestId\": \"ee4f0117-953f-4a5b-9a3f-6a1831ac3c0a\"\n }\n}",
|
248
248
|
"title": "查询扫描记录"
|
@@ -268,7 +268,7 @@
|
|
268
268
|
{
|
269
269
|
"document": "根据ID查询码",
|
270
270
|
"input": "POST / HTTP/1.1\nHost: trp.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTraceCodeById\n<公共请求参数>\n\n{\n \"Code\": \"https://anxin.m.qq.com/qr/eqdmnz7020bmtvi9_000243813742005003\"\n}",
|
271
|
-
"output": "{\n \"Response\": {\n \"TraceCode\": {\n \"
|
271
|
+
"output": "{\n \"Response\": {\n \"TraceCode\": {\n \"Code\": \"abc\",\n \"CorpId\": 1,\n \"PackId\": \"abc\",\n \"BatchId\": \"abc\",\n \"MerchantId\": \"abc\",\n \"ProductId\": \"abc\",\n \"Status\": 1,\n \"CreateTime\": \"abc\",\n \"UpdateTime\": \"abc\",\n \"MerchantName\": \"abc\",\n \"ProductName\": \"abc\",\n \"AgentId\": 1,\n \"Level\": 1\n },\n \"CodePath\": [\n \"abc\"\n ],\n \"RequestId\": \"abc\"\n }\n}",
|
272
272
|
"title": "根据ID查询码"
|
273
273
|
}
|
274
274
|
],
|
@@ -307,8 +307,8 @@
|
|
307
307
|
"ModifyCodeBatch": [
|
308
308
|
{
|
309
309
|
"document": "激活批次",
|
310
|
-
"input": "POST / HTTP/1.1\nHost: trp.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyCodeBatch\n<公共请求参数>\n\n{\n \"BatchId\": \"
|
311
|
-
"output": "{\n \"Response\": {\n \"BatchId\": \"
|
310
|
+
"input": "POST / HTTP/1.1\nHost: trp.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyCodeBatch\n<公共请求参数>\n\n{\n \"BatchId\": \"abc\",\n \"Status\": 1\n}",
|
311
|
+
"output": "{\n \"Response\": {\n \"BatchId\": \"abc\",\n \"RequestId\": \"abc\"\n }\n}",
|
312
312
|
"title": "修改批次状态"
|
313
313
|
}
|
314
314
|
],
|
@@ -61,7 +61,7 @@
|
|
61
61
|
},
|
62
62
|
{
|
63
63
|
"disabled": false,
|
64
|
-
"document": "语速,范围:[-2,2],分别对应不同语速:<li>-2代表0.6倍</li><li>-1代表0.8倍</li><li>0代表1.0倍(默认)</li><li>1代表1.2倍</li><li>2代表1.5倍</li
|
64
|
+
"document": "语速,范围:[-2,2],分别对应不同语速:<li>-2代表0.6倍</li><li>-1代表0.8倍</li><li>0代表1.0倍(默认)</li><li>1代表1.2倍</li><li>2代表1.5倍</li>如果需要更细化的语速,可以保留小数点后 2 位,例如0.5 1.1 1.8等。<br>参数值与实际语速转换,可参考[代码示例](https://sdk-1300466766.cos.ap-shanghai.myqcloud.com/sample/speed_sample.tar.gz)",
|
65
65
|
"example": "1",
|
66
66
|
"member": "float",
|
67
67
|
"name": "Speed",
|
@@ -160,6 +160,7 @@
|
|
160
160
|
"example": "\"gz-0d7faf5f-9165-47b5-93b2-bb98ca340755\"",
|
161
161
|
"member": "CreateTtsTaskRespData",
|
162
162
|
"name": "Data",
|
163
|
+
"output_required": true,
|
163
164
|
"type": "object",
|
164
165
|
"value_allowed_null": false
|
165
166
|
},
|
@@ -369,7 +370,7 @@
|
|
369
370
|
},
|
370
371
|
{
|
371
372
|
"disabled": false,
|
372
|
-
"document": "语速,范围:[-2,6],分别对应不同语速:<li>-2代表0.6倍</li><li>-1代表0.8倍</li><li>0代表1.0倍(默认)</li><li>1代表1.2倍</li><li>2代表1.5倍</li><li>6代表2.5倍</li
|
373
|
+
"document": "语速,范围:[-2,6],分别对应不同语速:<li>-2代表0.6倍</li><li>-1代表0.8倍</li><li>0代表1.0倍(默认)</li><li>1代表1.2倍</li><li>2代表1.5倍</li><li>6代表2.5倍</li>如果需要更细化的语速,可以保留小数点后 2 位,例如0.5 1.1 1.8等。<br>参数值与实际语速转换,可参考[代码示例](https://sdk-1300466766.cos.ap-shanghai.myqcloud.com/sample/speed_sample.tar.gz)",
|
373
374
|
"example": "1",
|
374
375
|
"member": "float",
|
375
376
|
"name": "Speed",
|
@@ -450,7 +451,7 @@
|
|
450
451
|
},
|
451
452
|
{
|
452
453
|
"disabled": false,
|
453
|
-
"document": "控制合成音频的情感,仅支持多情感音色使用。取值: neutral(中性)、sad(悲伤)、happy(高兴)、angry(生气)、fear(恐惧)、news(新闻)、story(故事)、radio(广播)、poetry(诗歌)、call(客服)",
|
454
|
+
"document": "控制合成音频的情感,仅支持多情感音色使用。取值: neutral(中性)、sad(悲伤)、happy(高兴)、angry(生气)、fear(恐惧)、news(新闻)、story(故事)、radio(广播)、poetry(诗歌)、call(客服)、撒娇(sajiao)、厌恶(disgusted)、震惊(amaze)、平静(peaceful)、兴奋(exciting)",
|
454
455
|
"example": "无",
|
455
456
|
"member": "string",
|
456
457
|
"name": "EmotionCategory",
|
@@ -478,6 +479,7 @@
|
|
478
479
|
"example": "UklGRlR/AABXQVZFZm10IBAAAAABAAEAgD4AAAB9AAACABAAZGF0YSx9AAD+",
|
479
480
|
"member": "string",
|
480
481
|
"name": "Audio",
|
482
|
+
"output_required": true,
|
481
483
|
"type": "string",
|
482
484
|
"value_allowed_null": false
|
483
485
|
},
|
@@ -487,6 +489,7 @@
|
|
487
489
|
"example": "session-1234",
|
488
490
|
"member": "string",
|
489
491
|
"name": "SessionId",
|
492
|
+
"output_required": true,
|
490
493
|
"type": "string",
|
491
494
|
"value_allowed_null": false
|
492
495
|
},
|
@@ -496,6 +499,7 @@
|
|
496
499
|
"example": "无",
|
497
500
|
"member": "Subtitle",
|
498
501
|
"name": "Subtitles",
|
502
|
+
"output_required": true,
|
499
503
|
"type": "list",
|
500
504
|
"value_allowed_null": false
|
501
505
|
},
|
@@ -294,6 +294,13 @@
|
|
294
294
|
"output": "ModifyDomainWhiteRuleResponse",
|
295
295
|
"status": "online"
|
296
296
|
},
|
297
|
+
"ModifySpartaProtection": {
|
298
|
+
"document": "修改域名配置",
|
299
|
+
"input": "ModifySpartaProtectionRequest",
|
300
|
+
"name": "修改域名配置",
|
301
|
+
"output": "ModifySpartaProtectionResponse",
|
302
|
+
"status": "online"
|
303
|
+
},
|
297
304
|
"ModifyWafAutoDenyRules": {
|
298
305
|
"document": "修改ip惩罚规则",
|
299
306
|
"input": "ModifyWafAutoDenyRulesRequest",
|
@@ -6268,6 +6275,344 @@
|
|
6268
6275
|
],
|
6269
6276
|
"type": "object"
|
6270
6277
|
},
|
6278
|
+
"ModifySpartaProtectionRequest": {
|
6279
|
+
"document": "ModifySpartaProtection请求参数结构体",
|
6280
|
+
"members": [
|
6281
|
+
{
|
6282
|
+
"default": "",
|
6283
|
+
"disabled": false,
|
6284
|
+
"document": "域名",
|
6285
|
+
"example": "www.test.com",
|
6286
|
+
"member": "string",
|
6287
|
+
"name": "Domain",
|
6288
|
+
"required": true,
|
6289
|
+
"type": "string"
|
6290
|
+
},
|
6291
|
+
{
|
6292
|
+
"default": "",
|
6293
|
+
"disabled": false,
|
6294
|
+
"document": "域名ID",
|
6295
|
+
"example": "s2dfd342dfd34423sdfs",
|
6296
|
+
"member": "string",
|
6297
|
+
"name": "DomainId",
|
6298
|
+
"required": false,
|
6299
|
+
"type": "string"
|
6300
|
+
},
|
6301
|
+
{
|
6302
|
+
"default": "",
|
6303
|
+
"disabled": false,
|
6304
|
+
"document": "证书类型,0表示没有证书,CertType=1表示自有证书,2 为托管证书",
|
6305
|
+
"example": "0",
|
6306
|
+
"member": "int64",
|
6307
|
+
"name": "CertType",
|
6308
|
+
"required": false,
|
6309
|
+
"type": "int"
|
6310
|
+
},
|
6311
|
+
{
|
6312
|
+
"default": "",
|
6313
|
+
"disabled": false,
|
6314
|
+
"document": "CertType=1时,需要填次参数,表示证书内容",
|
6315
|
+
"example": "sdfdfdf",
|
6316
|
+
"member": "string",
|
6317
|
+
"name": "Cert",
|
6318
|
+
"required": false,
|
6319
|
+
"type": "string"
|
6320
|
+
},
|
6321
|
+
{
|
6322
|
+
"default": "",
|
6323
|
+
"disabled": false,
|
6324
|
+
"document": "CertType=1时,需要填次参数,表示证书的私钥",
|
6325
|
+
"example": "sdfsdfs",
|
6326
|
+
"member": "string",
|
6327
|
+
"name": "PrivateKey",
|
6328
|
+
"required": false,
|
6329
|
+
"type": "string"
|
6330
|
+
},
|
6331
|
+
{
|
6332
|
+
"default": "",
|
6333
|
+
"disabled": false,
|
6334
|
+
"document": "CertType=2时,需要填次参数,表示证书的ID",
|
6335
|
+
"example": "3434",
|
6336
|
+
"member": "string",
|
6337
|
+
"name": "SSLId",
|
6338
|
+
"required": false,
|
6339
|
+
"type": "string"
|
6340
|
+
},
|
6341
|
+
{
|
6342
|
+
"default": "",
|
6343
|
+
"disabled": false,
|
6344
|
+
"document": "表示是否开启了CDN代理",
|
6345
|
+
"example": "0",
|
6346
|
+
"member": "int64",
|
6347
|
+
"name": "IsCdn",
|
6348
|
+
"required": false,
|
6349
|
+
"type": "int"
|
6350
|
+
},
|
6351
|
+
{
|
6352
|
+
"default": "",
|
6353
|
+
"disabled": false,
|
6354
|
+
"document": "HTTPS回源协议",
|
6355
|
+
"example": "https",
|
6356
|
+
"member": "string",
|
6357
|
+
"name": "UpstreamScheme",
|
6358
|
+
"required": false,
|
6359
|
+
"type": "string"
|
6360
|
+
},
|
6361
|
+
{
|
6362
|
+
"default": "",
|
6363
|
+
"disabled": false,
|
6364
|
+
"document": "HTTPS回源端口,仅UpstreamScheme为http时需要填当前字段",
|
6365
|
+
"example": "\"80,443\"",
|
6366
|
+
"member": "string",
|
6367
|
+
"name": "HttpsUpstreamPort",
|
6368
|
+
"required": false,
|
6369
|
+
"type": "string"
|
6370
|
+
},
|
6371
|
+
{
|
6372
|
+
"default": "",
|
6373
|
+
"disabled": false,
|
6374
|
+
"document": "表示是否强制跳转到HTTPS,1表示开启,0表示不开启",
|
6375
|
+
"example": "1",
|
6376
|
+
"member": "uint64",
|
6377
|
+
"name": "HttpsRewrite",
|
6378
|
+
"required": false,
|
6379
|
+
"type": "int"
|
6380
|
+
},
|
6381
|
+
{
|
6382
|
+
"default": "",
|
6383
|
+
"disabled": false,
|
6384
|
+
"document": "回源类型,0表示通过IP回源,1 表示通过域名回源",
|
6385
|
+
"example": "0",
|
6386
|
+
"member": "int64",
|
6387
|
+
"name": "UpstreamType",
|
6388
|
+
"required": false,
|
6389
|
+
"type": "int"
|
6390
|
+
},
|
6391
|
+
{
|
6392
|
+
"default": "",
|
6393
|
+
"disabled": false,
|
6394
|
+
"document": "UpstreamType=1时,填次字段表示回源域名",
|
6395
|
+
"example": "www.qq.com",
|
6396
|
+
"member": "string",
|
6397
|
+
"name": "UpstreamDomain",
|
6398
|
+
"required": false,
|
6399
|
+
"type": "string"
|
6400
|
+
},
|
6401
|
+
{
|
6402
|
+
"default": "",
|
6403
|
+
"disabled": false,
|
6404
|
+
"document": "UpstreamType=0时,填次字段表示回源ip",
|
6405
|
+
"example": "[\"1.1.1.1\\n\"]",
|
6406
|
+
"member": "string",
|
6407
|
+
"name": "SrcList",
|
6408
|
+
"required": false,
|
6409
|
+
"type": "list"
|
6410
|
+
},
|
6411
|
+
{
|
6412
|
+
"default": "",
|
6413
|
+
"disabled": false,
|
6414
|
+
"document": "是否开启HTTP2,1表示开启,0表示不开启http2。开启HTTP2需要HTTPS支持",
|
6415
|
+
"example": "0",
|
6416
|
+
"member": "int64",
|
6417
|
+
"name": "IsHttp2",
|
6418
|
+
"required": false,
|
6419
|
+
"type": "int"
|
6420
|
+
},
|
6421
|
+
{
|
6422
|
+
"default": "",
|
6423
|
+
"disabled": false,
|
6424
|
+
"document": "是否开启WebSocket, 1:开启WebSocket,0:不开启WebSocket",
|
6425
|
+
"example": "0",
|
6426
|
+
"member": "int64",
|
6427
|
+
"name": "IsWebsocket",
|
6428
|
+
"required": false,
|
6429
|
+
"type": "int"
|
6430
|
+
},
|
6431
|
+
{
|
6432
|
+
"default": "",
|
6433
|
+
"disabled": false,
|
6434
|
+
"document": "负载均衡策略,0表示轮徇,1表示IP hash",
|
6435
|
+
"example": "0",
|
6436
|
+
"member": "int64",
|
6437
|
+
"name": "LoadBalance",
|
6438
|
+
"required": false,
|
6439
|
+
"type": "int"
|
6440
|
+
},
|
6441
|
+
{
|
6442
|
+
"default": "",
|
6443
|
+
"disabled": false,
|
6444
|
+
"document": "是否灰度",
|
6445
|
+
"example": "0",
|
6446
|
+
"member": "int64",
|
6447
|
+
"name": "IsGray",
|
6448
|
+
"required": false,
|
6449
|
+
"type": "int"
|
6450
|
+
},
|
6451
|
+
{
|
6452
|
+
"default": "",
|
6453
|
+
"disabled": false,
|
6454
|
+
"document": "WAF版本",
|
6455
|
+
"example": "sparta-waf",
|
6456
|
+
"member": "string",
|
6457
|
+
"name": "Edition",
|
6458
|
+
"required": false,
|
6459
|
+
"type": "string"
|
6460
|
+
},
|
6461
|
+
{
|
6462
|
+
"default": "",
|
6463
|
+
"disabled": false,
|
6464
|
+
"document": "端口信息",
|
6465
|
+
"example": "无",
|
6466
|
+
"member": "SpartaProtectionPort",
|
6467
|
+
"name": "Ports",
|
6468
|
+
"required": false,
|
6469
|
+
"type": "list"
|
6470
|
+
},
|
6471
|
+
{
|
6472
|
+
"default": "",
|
6473
|
+
"disabled": false,
|
6474
|
+
"document": "长短连接标志,仅IP回源时有效",
|
6475
|
+
"example": "1",
|
6476
|
+
"member": "string",
|
6477
|
+
"name": "IsKeepAlive",
|
6478
|
+
"required": false,
|
6479
|
+
"type": "string"
|
6480
|
+
},
|
6481
|
+
{
|
6482
|
+
"default": "",
|
6483
|
+
"disabled": false,
|
6484
|
+
"document": "实例id",
|
6485
|
+
"example": "waf-sdjfksl",
|
6486
|
+
"member": "string",
|
6487
|
+
"name": "InstanceID",
|
6488
|
+
"required": false,
|
6489
|
+
"type": "string"
|
6490
|
+
},
|
6491
|
+
{
|
6492
|
+
"default": "",
|
6493
|
+
"disabled": false,
|
6494
|
+
"document": "是否为Anycast ip类型:1 Anycast 0 普通ip",
|
6495
|
+
"example": "0",
|
6496
|
+
"member": "int64",
|
6497
|
+
"name": "Anycast",
|
6498
|
+
"required": false,
|
6499
|
+
"type": "int"
|
6500
|
+
},
|
6501
|
+
{
|
6502
|
+
"default": "",
|
6503
|
+
"disabled": false,
|
6504
|
+
"document": "src的权重",
|
6505
|
+
"example": "[1.1.1]",
|
6506
|
+
"member": "int64",
|
6507
|
+
"name": "Weights",
|
6508
|
+
"required": false,
|
6509
|
+
"type": "list"
|
6510
|
+
},
|
6511
|
+
{
|
6512
|
+
"default": "",
|
6513
|
+
"disabled": false,
|
6514
|
+
"document": "是否开启源站的主动健康检测,1表示开启,0表示不开启",
|
6515
|
+
"example": "0",
|
6516
|
+
"member": "int64",
|
6517
|
+
"name": "ActiveCheck",
|
6518
|
+
"required": false,
|
6519
|
+
"type": "int"
|
6520
|
+
},
|
6521
|
+
{
|
6522
|
+
"default": "",
|
6523
|
+
"disabled": false,
|
6524
|
+
"document": "TLS版本信息",
|
6525
|
+
"example": "0",
|
6526
|
+
"member": "int64",
|
6527
|
+
"name": "TLSVersion",
|
6528
|
+
"required": false,
|
6529
|
+
"type": "int"
|
6530
|
+
},
|
6531
|
+
{
|
6532
|
+
"default": "",
|
6533
|
+
"disabled": false,
|
6534
|
+
"document": "加密套件信息",
|
6535
|
+
"example": "[0,1]",
|
6536
|
+
"member": "int64",
|
6537
|
+
"name": "Ciphers",
|
6538
|
+
"required": false,
|
6539
|
+
"type": "list"
|
6540
|
+
},
|
6541
|
+
{
|
6542
|
+
"default": "",
|
6543
|
+
"disabled": false,
|
6544
|
+
"document": "0:不支持选择:默认模版 1:通用型模版 2:安全型模版 3:自定义模版",
|
6545
|
+
"example": "0",
|
6546
|
+
"member": "int64",
|
6547
|
+
"name": "CipherTemplate",
|
6548
|
+
"required": false,
|
6549
|
+
"type": "int"
|
6550
|
+
},
|
6551
|
+
{
|
6552
|
+
"default": "",
|
6553
|
+
"disabled": false,
|
6554
|
+
"document": "300s",
|
6555
|
+
"example": "300",
|
6556
|
+
"member": "int64",
|
6557
|
+
"name": "ProxyReadTimeout",
|
6558
|
+
"required": false,
|
6559
|
+
"type": "int"
|
6560
|
+
},
|
6561
|
+
{
|
6562
|
+
"default": "",
|
6563
|
+
"disabled": false,
|
6564
|
+
"document": "300s",
|
6565
|
+
"example": "300",
|
6566
|
+
"member": "int64",
|
6567
|
+
"name": "ProxySendTimeout",
|
6568
|
+
"required": false,
|
6569
|
+
"type": "int"
|
6570
|
+
},
|
6571
|
+
{
|
6572
|
+
"default": "",
|
6573
|
+
"disabled": false,
|
6574
|
+
"document": "0:关闭SNI;1:开启SNI,SNI=源请求host;2:开启SNI,SNI=修改为源站host;3:开启SNI,自定义host,SNI=SniHost;",
|
6575
|
+
"example": "1",
|
6576
|
+
"member": "int64",
|
6577
|
+
"name": "SniType",
|
6578
|
+
"required": false,
|
6579
|
+
"type": "int"
|
6580
|
+
},
|
6581
|
+
{
|
6582
|
+
"default": "",
|
6583
|
+
"disabled": false,
|
6584
|
+
"document": "SniType=3时,需要填此参数,表示自定义的host;",
|
6585
|
+
"example": "test.com",
|
6586
|
+
"member": "string",
|
6587
|
+
"name": "SniHost",
|
6588
|
+
"required": false,
|
6589
|
+
"type": "string"
|
6590
|
+
},
|
6591
|
+
{
|
6592
|
+
"default": "",
|
6593
|
+
"disabled": false,
|
6594
|
+
"document": "IsCdn=3时,需要填此参数,表示自定义header",
|
6595
|
+
"example": "[\"x-real-ip\"]",
|
6596
|
+
"member": "string",
|
6597
|
+
"name": "IpHeaders",
|
6598
|
+
"required": false,
|
6599
|
+
"type": "list"
|
6600
|
+
}
|
6601
|
+
],
|
6602
|
+
"type": "object"
|
6603
|
+
},
|
6604
|
+
"ModifySpartaProtectionResponse": {
|
6605
|
+
"document": "ModifySpartaProtection返回参数结构体",
|
6606
|
+
"members": [
|
6607
|
+
{
|
6608
|
+
"document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
|
6609
|
+
"member": "string",
|
6610
|
+
"name": "RequestId",
|
6611
|
+
"type": "string"
|
6612
|
+
}
|
6613
|
+
],
|
6614
|
+
"type": "object"
|
6615
|
+
},
|
6271
6616
|
"ModifyWafAutoDenyRulesRequest": {
|
6272
6617
|
"document": "ModifyWafAutoDenyRules请求参数结构体",
|
6273
6618
|
"members": [
|
@@ -7211,6 +7556,62 @@
|
|
7211
7556
|
],
|
7212
7557
|
"type": "object"
|
7213
7558
|
},
|
7559
|
+
"SpartaProtectionPort": {
|
7560
|
+
"document": "waf斯巴达-编辑防护域名中的端口结构",
|
7561
|
+
"members": [
|
7562
|
+
{
|
7563
|
+
"default": "",
|
7564
|
+
"disabled": false,
|
7565
|
+
"document": "nginx Id",
|
7566
|
+
"member": "uint64",
|
7567
|
+
"name": "NginxServerId",
|
7568
|
+
"required": true,
|
7569
|
+
"type": "int",
|
7570
|
+
"value_allowed_null": false
|
7571
|
+
},
|
7572
|
+
{
|
7573
|
+
"default": "",
|
7574
|
+
"disabled": false,
|
7575
|
+
"document": "端口",
|
7576
|
+
"member": "string",
|
7577
|
+
"name": "Port",
|
7578
|
+
"required": true,
|
7579
|
+
"type": "string",
|
7580
|
+
"value_allowed_null": false
|
7581
|
+
},
|
7582
|
+
{
|
7583
|
+
"default": "",
|
7584
|
+
"disabled": false,
|
7585
|
+
"document": "协议",
|
7586
|
+
"member": "string",
|
7587
|
+
"name": "Protocol",
|
7588
|
+
"required": true,
|
7589
|
+
"type": "string",
|
7590
|
+
"value_allowed_null": false
|
7591
|
+
},
|
7592
|
+
{
|
7593
|
+
"default": "",
|
7594
|
+
"disabled": false,
|
7595
|
+
"document": "后端端口",
|
7596
|
+
"member": "string",
|
7597
|
+
"name": "UpstreamPort",
|
7598
|
+
"required": true,
|
7599
|
+
"type": "string",
|
7600
|
+
"value_allowed_null": false
|
7601
|
+
},
|
7602
|
+
{
|
7603
|
+
"default": "",
|
7604
|
+
"disabled": false,
|
7605
|
+
"document": "后端协议",
|
7606
|
+
"member": "string",
|
7607
|
+
"name": "UpstreamProtocol",
|
7608
|
+
"required": true,
|
7609
|
+
"type": "string",
|
7610
|
+
"value_allowed_null": false
|
7611
|
+
}
|
7612
|
+
],
|
7613
|
+
"usage": "in"
|
7614
|
+
},
|
7214
7615
|
"Strategy": {
|
7215
7616
|
"document": "自定义规则的匹配条件结构体",
|
7216
7617
|
"members": [
|
@@ -354,6 +354,32 @@
|
|
354
354
|
"title": "更改某一条规则"
|
355
355
|
}
|
356
356
|
],
|
357
|
+
"ModifySpartaProtection": [
|
358
|
+
{
|
359
|
+
"document": "",
|
360
|
+
"input": "POST / HTTP/1.1\nHost: waf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifySpartaProtection\n<公共请求参数>\n\n{\n \"Domain\": \"www.test.com\",\n \"LoadBalance\": \"0\",\n \"UpstreamType\": \"0\",\n \"CertType\": \"0\",\n \"Ports\": [\n {\n \"NginxServerId\": \"0\",\n \"Protocol\": \"http\",\n \"Port\": \"80\",\n \"UpstreamPort\": \"80\",\n \"UpstreamProtocol\": \"http\"\n }\n ],\n \"SrcList\": [\n \"1.1.1.1\"\n ],\n \"IsCdn\": \"0\",\n \"IsWebsocket\": \"0\",\n \"IsGray\": \"0\",\n \"IsHttp2\": \"0\"\n}",
|
361
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"9ee8be5b-6caa-4c39-ab70-890e0e673515\"\n }\n}",
|
362
|
+
"title": "修改域名配置"
|
363
|
+
},
|
364
|
+
{
|
365
|
+
"document": "",
|
366
|
+
"input": "POST / HTTP/1.1\nHost: waf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifySpartaProtection\n<公共请求参数>\n\n{\n \"Domain\": \"lucas0407-1.qcloudwaf.com\",\n \"LoadBalance\": \"0\",\n \"InstanceID\": \"waf_2kuj60v200b09bsr\",\n \"UpstreamType\": \"0\",\n \"IsWebsocket\": \"0\",\n \"IsHttp2\": \"0\",\n \"SrcList\": [\n \"11.148.84.137\"\n ],\n \"CertType\": \"0\",\n \"DomainId\": \"eb454223185451fe8b255a82b9d4bf94\",\n \"Weights\": [\n \"100\"\n ],\n \"IsKeepAlive\": \"1\",\n \"IsCdn\": \"1\",\n \"IsGray\": \"0\",\n \"Anycast\": \"0\",\n \"Ports\": [\n {\n \"NginxServerId\": \"62094\",\n \"Protocol\": \"http\",\n \"Port\": \"80\",\n \"UpstreamPort\": \"80\",\n \"UpstreamProtocol\": \"http\"\n }\n ],\n \"ActiveCheck\": \"1\"\n}",
|
367
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"9c553d61-526a-44cf-a874-b24956033973\"\n }\n}",
|
368
|
+
"title": "修改域名接入配置"
|
369
|
+
},
|
370
|
+
{
|
371
|
+
"document": "",
|
372
|
+
"input": "POST / HTTP/1.1\nHost: waf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifySpartaProtection\n<公共请求参数>\n\n{\n \"IsGray\": \"0\",\n \"Domain\": \"lucas0407-1.qcloudwaf.com\",\n \"LoadBalance\": \"0\",\n \"CipherTemplate\": \"0\",\n \"InstanceID\": \"waf_2kuj60v200b09bsr\",\n \"UpstreamType\": \"0\",\n \"IsWebsocket\": \"0\",\n \"IsHttp2\": \"0\",\n \"SrcList\": [\n \"114.132.223.23\"\n ],\n \"CertType\": \"0\",\n \"DomainId\": \"eb454223185451fe8b255a82b9d4bf94\",\n \"Weights\": [\n \"100\"\n ],\n \"IsKeepAlive\": \"1\",\n \"IsCdn\": \"1\",\n \"TLSVersion\": \"3\",\n \"Anycast\": \"0\",\n \"Ports\": [\n {\n \"NginxServerId\": \"62094\",\n \"Protocol\": \"http\",\n \"Port\": \"80\",\n \"UpstreamPort\": \"80\",\n \"UpstreamProtocol\": \"http\"\n }\n ],\n \"ActiveCheck\": \"1\"\n}",
|
373
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"13b8a309-3e7d-4393-91a4-271bf6d5dd71\"\n }\n}",
|
374
|
+
"title": "ts"
|
375
|
+
},
|
376
|
+
{
|
377
|
+
"document": "",
|
378
|
+
"input": "POST / HTTP/1.1\nHost: waf.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifySpartaProtection\n<公共请求参数>\n\n{\n \"IsGray\": \"0\",\n \"Domain\": \"lucas0919.qcloudwaf.com\",\n \"LoadBalance\": \"0\",\n \"CipherTemplate\": \"0\",\n \"InstanceID\": \"lucas\",\n \"UpstreamType\": \"0\",\n \"IsWebsocket\": \"0\",\n \"IsHttp2\": \"0\",\n \"SrcList\": [\n \"114.132.223.23\"\n ],\n \"CertType\": \"0\",\n \"DomainId\": \"e801733b69605960a17388999868512a\",\n \"Weights\": [\n \"100\"\n ],\n \"IsKeepAlive\": \"1\",\n \"IsCdn\": \"1\",\n \"TLSVersion\": \"3\",\n \"Anycast\": \"0\",\n \"Ports\": [\n {\n \"NginxServerId\": \"63953\",\n \"Protocol\": \"http\",\n \"Port\": \"80\",\n \"UpstreamPort\": \"80\",\n \"UpstreamProtocol\": \"http\"\n }\n ],\n \"ActiveCheck\": \"1\"\n}",
|
379
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"d6bd6f14-926e-4a3e-9a34-bb1dd7d9a51d\"\n }\n}",
|
380
|
+
"title": "Modify-Host-1"
|
381
|
+
}
|
382
|
+
],
|
357
383
|
"ModifyWafAutoDenyRules": [
|
358
384
|
{
|
359
385
|
"document": "修改ip惩罚配置",
|
tccli/services/waf/waf_client.py
CHANGED
@@ -1577,6 +1577,58 @@ def doModifyWafThreatenIntelligence(args, parsed_globals):
|
|
1577
1577
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1578
1578
|
|
1579
1579
|
|
1580
|
+
def doDescribeAttackOverview(args, parsed_globals):
|
1581
|
+
g_param = parse_global_arg(parsed_globals)
|
1582
|
+
|
1583
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1584
|
+
cred = credential.CVMRoleCredential()
|
1585
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1586
|
+
cred = credential.STSAssumeRoleCredential(
|
1587
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1588
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
|
1589
|
+
)
|
1590
|
+
elif os.getenv(OptionsDefine.ENV_TKE_REGION) and os.getenv(OptionsDefine.ENV_TKE_PROVIDER_ID) and os.getenv(OptionsDefine.ENV_TKE_IDENTITY_TOKEN_FILE) and os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN):
|
1591
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1592
|
+
else:
|
1593
|
+
cred = credential.Credential(
|
1594
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1595
|
+
)
|
1596
|
+
http_profile = HttpProfile(
|
1597
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1598
|
+
reqMethod="POST",
|
1599
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1600
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1601
|
+
)
|
1602
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1603
|
+
if g_param[OptionsDefine.Language]:
|
1604
|
+
profile.language = g_param[OptionsDefine.Language]
|
1605
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1606
|
+
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
1607
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1608
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1609
|
+
model = models.DescribeAttackOverviewRequest()
|
1610
|
+
model.from_json_string(json.dumps(args))
|
1611
|
+
start_time = time.time()
|
1612
|
+
while True:
|
1613
|
+
rsp = client.DescribeAttackOverview(model)
|
1614
|
+
result = rsp.to_json_string()
|
1615
|
+
try:
|
1616
|
+
json_obj = json.loads(result)
|
1617
|
+
except TypeError as e:
|
1618
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1619
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1620
|
+
break
|
1621
|
+
cur_time = time.time()
|
1622
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1623
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1624
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1625
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1626
|
+
else:
|
1627
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1628
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1629
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1630
|
+
|
1631
|
+
|
1580
1632
|
def doAddCustomWhiteRule(args, parsed_globals):
|
1581
1633
|
g_param = parse_global_arg(parsed_globals)
|
1582
1634
|
|
@@ -1837,7 +1889,7 @@ def doDescribeWafAutoDenyRules(args, parsed_globals):
|
|
1837
1889
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1838
1890
|
|
1839
1891
|
|
1840
|
-
def
|
1892
|
+
def doModifySpartaProtection(args, parsed_globals):
|
1841
1893
|
g_param = parse_global_arg(parsed_globals)
|
1842
1894
|
|
1843
1895
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1866,11 +1918,11 @@ def doDescribeAttackOverview(args, parsed_globals):
|
|
1866
1918
|
client = mod.WafClient(cred, g_param[OptionsDefine.Region], profile)
|
1867
1919
|
client._sdkVersion += ("_CLI_" + __version__)
|
1868
1920
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1869
|
-
model = models.
|
1921
|
+
model = models.ModifySpartaProtectionRequest()
|
1870
1922
|
model.from_json_string(json.dumps(args))
|
1871
1923
|
start_time = time.time()
|
1872
1924
|
while True:
|
1873
|
-
rsp = client.
|
1925
|
+
rsp = client.ModifySpartaProtection(model)
|
1874
1926
|
result = rsp.to_json_string()
|
1875
1927
|
try:
|
1876
1928
|
json_obj = json.loads(result)
|
@@ -2658,12 +2710,13 @@ ACTION_MAP = {
|
|
2658
2710
|
"ModifyCustomRuleStatus": doModifyCustomRuleStatus,
|
2659
2711
|
"DescribePeakValue": doDescribePeakValue,
|
2660
2712
|
"ModifyWafThreatenIntelligence": doModifyWafThreatenIntelligence,
|
2713
|
+
"DescribeAttackOverview": doDescribeAttackOverview,
|
2661
2714
|
"AddCustomWhiteRule": doAddCustomWhiteRule,
|
2662
2715
|
"ModifyWafAutoDenyRules": doModifyWafAutoDenyRules,
|
2663
2716
|
"DescribeUserClbWafRegions": doDescribeUserClbWafRegions,
|
2664
2717
|
"DeleteAttackDownloadRecord": doDeleteAttackDownloadRecord,
|
2665
2718
|
"DescribeWafAutoDenyRules": doDescribeWafAutoDenyRules,
|
2666
|
-
"
|
2719
|
+
"ModifySpartaProtection": doModifySpartaProtection,
|
2667
2720
|
"DeleteDownloadRecord": doDeleteDownloadRecord,
|
2668
2721
|
"CreateHost": doCreateHost,
|
2669
2722
|
"DeleteSession": doDeleteSession,
|