tccli 3.0.1291.1__py2.py3-none-any.whl → 3.0.1293.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 +3 -0
- tccli/services/advisor/v20200721/api.json +36 -36
- tccli/services/advisor/v20200721/examples.json +2 -2
- tccli/services/antiddos/antiddos_client.py +7 -113
- tccli/services/antiddos/v20200309/api.json +41 -401
- tccli/services/antiddos/v20200309/examples.json +1 -17
- tccli/services/apm/v20210622/api.json +44 -44
- tccli/services/apm/v20210622/examples.json +5 -5
- tccli/services/batch/v20170312/api.json +165 -165
- tccli/services/batch/v20170312/examples.json +1 -1
- tccli/services/cam/v20190116/api.json +18 -18
- tccli/services/cdwch/v20200915/api.json +303 -219
- tccli/services/cdwch/v20200915/examples.json +18 -18
- tccli/services/cdwpg/v20201230/api.json +135 -128
- tccli/services/cdwpg/v20201230/examples.json +5 -5
- tccli/services/chc/__init__.py +4 -0
- tccli/services/chc/chc_client.py +2062 -0
- tccli/services/chc/v20230418/api.json +5728 -0
- tccli/services/chc/v20230418/examples.json +293 -0
- tccli/services/ckafka/v20190819/api.json +1049 -1039
- tccli/services/ckafka/v20190819/examples.json +1 -1
- tccli/services/cls/v20201016/api.json +310 -310
- tccli/services/cls/v20201016/examples.json +1 -1
- tccli/services/dbbrain/dbbrain_client.py +240 -28
- tccli/services/dbbrain/v20191016/api.json +7 -7
- tccli/services/dbbrain/v20210527/api.json +487 -15
- tccli/services/dbbrain/v20210527/examples.json +32 -0
- tccli/services/domain/v20180808/api.json +2 -2
- tccli/services/ecdn/ecdn_client.py +7 -431
- tccli/services/ecdn/v20191012/api.json +0 -574
- tccli/services/ecdn/v20191012/examples.json +0 -64
- tccli/services/emr/v20190103/api.json +249 -13
- tccli/services/emr/v20190103/examples.json +2 -2
- tccli/services/ess/v20201111/api.json +12 -3
- tccli/services/essbasic/v20210526/api.json +9 -0
- tccli/services/gs/gs_client.py +1778 -29
- tccli/services/gs/v20191118/api.json +2618 -163
- tccli/services/gs/v20191118/examples.json +264 -0
- tccli/services/hai/v20230812/api.json +22 -22
- tccli/services/hunyuan/v20230901/api.json +13 -2
- tccli/services/iotexplorer/iotexplorer_client.py +53 -0
- tccli/services/iotexplorer/v20190423/api.json +72 -0
- tccli/services/iotexplorer/v20190423/examples.json +8 -0
- tccli/services/iotvideoindustry/v20201201/api.json +75 -75
- tccli/services/iotvideoindustry/v20201201/examples.json +1 -1
- tccli/services/lke/lke_client.py +0 -53
- tccli/services/lke/v20231130/api.json +14 -57
- tccli/services/lke/v20231130/examples.json +2 -10
- tccli/services/lkeap/v20240522/api.json +1 -1
- tccli/services/memcached/v20190318/api.json +1 -1
- tccli/services/mmps/v20200710/api.json +12 -12
- tccli/services/monitor/monitor_client.py +57 -4
- tccli/services/monitor/v20180724/api.json +249 -0
- tccli/services/monitor/v20180724/examples.json +8 -0
- tccli/services/mqtt/v20240516/api.json +13 -13
- tccli/services/mqtt/v20240516/examples.json +1 -1
- tccli/services/redis/v20180412/api.json +2 -2
- tccli/services/svp/v20240125/api.json +3 -3
- tccli/services/svp/v20240125/examples.json +1 -1
- tccli/services/tchd/v20230306/api.json +5 -5
- tccli/services/tcr/v20190924/api.json +22 -22
- tccli/services/tdmq/v20200217/api.json +267 -267
- tccli/services/teo/teo_client.py +53 -0
- tccli/services/teo/v20220901/api.json +50 -7
- tccli/services/teo/v20220901/examples.json +8 -0
- tccli/services/thpc/v20220401/api.json +9 -9
- tccli/services/thpc/v20230321/api.json +59 -47
- tccli/services/tione/v20211111/api.json +40 -1
- tccli/services/tke/v20180525/api.json +29 -29
- tccli/services/vpc/v20170312/api.json +1 -1
- tccli/services/wedata/v20210820/api.json +227 -13
- tccli/services/wedata/v20210820/examples.json +2 -8
- {tccli-3.0.1291.1.dist-info → tccli-3.0.1293.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1291.1.dist-info → tccli-3.0.1293.1.dist-info}/RECORD +78 -74
- {tccli-3.0.1291.1.dist-info → tccli-3.0.1293.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1291.1.dist-info → tccli-3.0.1293.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1291.1.dist-info → tccli-3.0.1293.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1293.1'
|
tccli/services/__init__.py
CHANGED
@@ -27,33 +27,33 @@
|
|
27
27
|
"members": [
|
28
28
|
{
|
29
29
|
"disabled": false,
|
30
|
-
"document": "警告条件ID
|
30
|
+
"document": "警告条件ID",
|
31
31
|
"example": "1",
|
32
32
|
"member": "uint64",
|
33
33
|
"name": "ConditionId",
|
34
|
-
"
|
34
|
+
"output_required": true,
|
35
35
|
"type": "int",
|
36
|
-
"value_allowed_null":
|
36
|
+
"value_allowed_null": false
|
37
37
|
},
|
38
38
|
{
|
39
39
|
"disabled": false,
|
40
|
-
"document": "警告级别,2:中风险,3
|
40
|
+
"document": "警告级别,2:中风险,3:高风险",
|
41
41
|
"example": "2",
|
42
42
|
"member": "uint64",
|
43
43
|
"name": "Level",
|
44
|
-
"
|
44
|
+
"output_required": true,
|
45
45
|
"type": "int",
|
46
|
-
"value_allowed_null":
|
46
|
+
"value_allowed_null": false
|
47
47
|
},
|
48
48
|
{
|
49
49
|
"disabled": false,
|
50
|
-
"document": "
|
50
|
+
"document": "警告级别描述",
|
51
51
|
"example": "中风险",
|
52
52
|
"member": "string",
|
53
53
|
"name": "LevelDesc",
|
54
|
-
"
|
54
|
+
"output_required": true,
|
55
55
|
"type": "string",
|
56
|
-
"value_allowed_null":
|
56
|
+
"value_allowed_null": false
|
57
57
|
},
|
58
58
|
{
|
59
59
|
"disabled": false,
|
@@ -61,7 +61,7 @@
|
|
61
61
|
"example": "Redis 实例未跨可用区部署",
|
62
62
|
"member": "string",
|
63
63
|
"name": "Desc",
|
64
|
-
"
|
64
|
+
"output_required": true,
|
65
65
|
"type": "string",
|
66
66
|
"value_allowed_null": false
|
67
67
|
}
|
@@ -78,13 +78,13 @@
|
|
78
78
|
"members": [
|
79
79
|
{
|
80
80
|
"disabled": false,
|
81
|
-
"document": "
|
81
|
+
"document": "评估项列表",
|
82
82
|
"example": "无",
|
83
83
|
"member": "Strategies",
|
84
84
|
"name": "Strategies",
|
85
85
|
"output_required": true,
|
86
86
|
"type": "list",
|
87
|
-
"value_allowed_null":
|
87
|
+
"value_allowed_null": false
|
88
88
|
},
|
89
89
|
{
|
90
90
|
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
@@ -155,7 +155,7 @@
|
|
155
155
|
"example": "无",
|
156
156
|
"member": "RiskFieldsDesc",
|
157
157
|
"name": "RiskFieldsDesc",
|
158
|
-
"
|
158
|
+
"output_required": true,
|
159
159
|
"type": "list",
|
160
160
|
"value_allowed_null": true
|
161
161
|
},
|
@@ -165,7 +165,7 @@
|
|
165
165
|
"example": "1",
|
166
166
|
"member": "uint64",
|
167
167
|
"name": "StrategyId",
|
168
|
-
"
|
168
|
+
"output_required": true,
|
169
169
|
"type": "int",
|
170
170
|
"value_allowed_null": true
|
171
171
|
},
|
@@ -175,17 +175,17 @@
|
|
175
175
|
"example": "10",
|
176
176
|
"member": "uint64",
|
177
177
|
"name": "RiskTotalCount",
|
178
|
-
"
|
178
|
+
"output_required": true,
|
179
179
|
"type": "int",
|
180
180
|
"value_allowed_null": true
|
181
181
|
},
|
182
182
|
{
|
183
183
|
"disabled": false,
|
184
184
|
"document": "风险实例详情列表,需要json decode\n注意:此字段可能返回 null,表示取不到有效值。",
|
185
|
-
"example": "
|
185
|
+
"example": "[{\\\"AppId\\\":12345678,\\\"IgnoreType\\\":\\\"\\\",\\\"Level\\\":\\\"2\\\",\\\"RiskDays\\\":1,\\\"conditionID\\\":8018},{\\\"AppId\\\":12345678,\\\"IgnoreType\\\":\\\"\\\",\\\"Level\\\":\\\"2\\\",\\\"RiskDays\\\":1,\\\"conditionID\\\":8018}]",
|
186
186
|
"member": "string",
|
187
187
|
"name": "Risks",
|
188
|
-
"
|
188
|
+
"output_required": true,
|
189
189
|
"type": "string",
|
190
190
|
"value_allowed_null": true
|
191
191
|
},
|
@@ -195,7 +195,7 @@
|
|
195
195
|
"example": "10",
|
196
196
|
"member": "uint64",
|
197
197
|
"name": "ResourceCount",
|
198
|
-
"
|
198
|
+
"output_required": true,
|
199
199
|
"type": "int",
|
200
200
|
"value_allowed_null": true
|
201
201
|
},
|
@@ -287,93 +287,93 @@
|
|
287
287
|
"members": [
|
288
288
|
{
|
289
289
|
"disabled": false,
|
290
|
-
"document": "评估项ID
|
290
|
+
"document": "评估项ID",
|
291
291
|
"example": "1",
|
292
292
|
"member": "uint64",
|
293
293
|
"name": "StrategyId",
|
294
294
|
"output_required": true,
|
295
295
|
"type": "int",
|
296
|
-
"value_allowed_null":
|
296
|
+
"value_allowed_null": false
|
297
297
|
},
|
298
298
|
{
|
299
299
|
"disabled": false,
|
300
|
-
"document": "
|
300
|
+
"document": "评估项名称",
|
301
301
|
"example": "云数据库(Redis)跨可用区部署",
|
302
302
|
"member": "string",
|
303
303
|
"name": "Name",
|
304
304
|
"output_required": true,
|
305
305
|
"type": "string",
|
306
|
-
"value_allowed_null":
|
306
|
+
"value_allowed_null": false
|
307
307
|
},
|
308
308
|
{
|
309
309
|
"disabled": false,
|
310
|
-
"document": "
|
310
|
+
"document": "评估项描述",
|
311
311
|
"example": "检查 Redis 实例是否跨可用区部署,如果实例未跨可用区部署,当实例出现可用区级别的灾难故障时,可能造成实例无法访问风险",
|
312
312
|
"member": "string",
|
313
313
|
"name": "Desc",
|
314
314
|
"output_required": true,
|
315
315
|
"type": "string",
|
316
|
-
"value_allowed_null":
|
316
|
+
"value_allowed_null": false
|
317
317
|
},
|
318
318
|
{
|
319
319
|
"disabled": false,
|
320
|
-
"document": "评估项对应产品ID
|
320
|
+
"document": "评估项对应产品ID",
|
321
321
|
"example": "redis",
|
322
322
|
"member": "string",
|
323
323
|
"name": "Product",
|
324
324
|
"output_required": true,
|
325
325
|
"type": "string",
|
326
|
-
"value_allowed_null":
|
326
|
+
"value_allowed_null": false
|
327
327
|
},
|
328
328
|
{
|
329
329
|
"disabled": false,
|
330
|
-
"document": "
|
330
|
+
"document": "评估项对应产品名称",
|
331
331
|
"example": "云数据库(Redis)",
|
332
332
|
"member": "string",
|
333
333
|
"name": "ProductDesc",
|
334
334
|
"output_required": true,
|
335
335
|
"type": "string",
|
336
|
-
"value_allowed_null":
|
336
|
+
"value_allowed_null": false
|
337
337
|
},
|
338
338
|
{
|
339
339
|
"disabled": false,
|
340
|
-
"document": "
|
340
|
+
"document": "评估项优化建议",
|
341
341
|
"example": "如果业务有较高容灾需求,建议采用跨可用区部署方案,提升业务可靠性,[跨可用区分布操作指引](https://cloud.tenc",
|
342
342
|
"member": "string",
|
343
343
|
"name": "Repair",
|
344
344
|
"output_required": true,
|
345
345
|
"type": "string",
|
346
|
-
"value_allowed_null":
|
346
|
+
"value_allowed_null": false
|
347
347
|
},
|
348
348
|
{
|
349
349
|
"disabled": false,
|
350
|
-
"document": "评估项类别ID
|
350
|
+
"document": "评估项类别ID",
|
351
351
|
"example": "2",
|
352
352
|
"member": "uint64",
|
353
353
|
"name": "GroupId",
|
354
354
|
"output_required": true,
|
355
355
|
"type": "int",
|
356
|
-
"value_allowed_null":
|
356
|
+
"value_allowed_null": false
|
357
357
|
},
|
358
358
|
{
|
359
359
|
"disabled": false,
|
360
|
-
"document": "
|
360
|
+
"document": "评估项类别名称",
|
361
361
|
"example": "可靠",
|
362
362
|
"member": "string",
|
363
363
|
"name": "GroupName",
|
364
364
|
"output_required": true,
|
365
365
|
"type": "string",
|
366
|
-
"value_allowed_null":
|
366
|
+
"value_allowed_null": false
|
367
367
|
},
|
368
368
|
{
|
369
369
|
"disabled": false,
|
370
|
-
"document": "
|
370
|
+
"document": "评估项风险列表",
|
371
371
|
"example": "[{\"ConditionId\":178,\"Level\":2,\"LevelDesc\":\"中风险\",\"Desc\":\"Redis 实例",
|
372
372
|
"member": "Conditions",
|
373
373
|
"name": "Conditions",
|
374
374
|
"output_required": true,
|
375
375
|
"type": "list",
|
376
|
-
"value_allowed_null":
|
376
|
+
"value_allowed_null": false
|
377
377
|
}
|
378
378
|
],
|
379
379
|
"usage": "out"
|
@@ -4,7 +4,7 @@
|
|
4
4
|
{
|
5
5
|
"document": "",
|
6
6
|
"input": "POST / HTTP/1.1\nHost: advisor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeStrategies\n<公共请求参数>\n\n{}",
|
7
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
7
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"\",\n \"Strategies\": [\n {\n \"StrategyId\": 131,\n \"Name\": \"云数据库(Redis)跨可用区部署\",\n \"Desc\": \"检查 Redis 实例是否跨可用区部署,如果实例未跨可用区部署,当实例出现可用区级别的灾难故障时,可能造成实例无法访问风险\",\n \"Product\": \"redis\",\n \"ProductDesc\": \"云数据库(Redis)\",\n \"Repair\": \"如果业务有较高容灾需求,建议采用跨可用区部署方案,提升业务可靠性,[跨可用区分布操作指引](https://cloud.tencent.com/document/product/239/51113)\",\n \"GroupId\": 2,\n \"GroupName\": \"可靠\",\n \"Conditions\": [\n {\n \"ConditionId\": 178,\n \"Level\": 2,\n \"LevelDesc\": \"中风险\",\n \"Desc\": \"Redis 实例未跨可用区部署\"\n }\n ]\n },\n {\n \"StrategyId\": 235,\n \"Name\": \"云数据库(Redis)使用基础网络\",\n \"Desc\": \"检查 Redis 是否使用基础网络\",\n \"Product\": \"redis\",\n \"ProductDesc\": \"云数据库(Redis)\",\n \"Repair\": \"建议更换为私有网络,私有网络是一块逻辑隔离的网络空间,基础网络是腾讯云上所有用户的公共网络资源池\",\n \"GroupId\": 2,\n \"GroupName\": \"可靠\",\n \"Conditions\": [\n {\n \"ConditionId\": 307,\n \"Level\": 2,\n \"LevelDesc\": \"中风险\",\n \"Desc\": \"实例使用基础网络\"\n }\n ]\n }\n ]\n }\n}",
|
8
8
|
"title": "查询评估项信息"
|
9
9
|
}
|
10
10
|
],
|
@@ -12,7 +12,7 @@
|
|
12
12
|
{
|
13
13
|
"document": "",
|
14
14
|
"input": "POST / HTTP/1.1\nHost: advisor.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTaskStrategyRisks\n<公共请求参数>\n\n{\n \"StrategyId\": 9\n}",
|
15
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"
|
15
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"aa-bb-cc-dd\",\n \"RiskFieldsDesc\": [\n {\n \"Field\": \"Level\",\n \"FieldName\": \"风险等级\",\n \"FieldType\": \"string\",\n \"FieldDict\": [\n {\n \"Key\": \"3\",\n \"Value\": \"高风险\"\n },\n {\n \"Key\": \"2\",\n \"Value\": \"中风险\"\n }\n ]\n },\n {\n \"Field\": \"AppId\",\n \"FieldName\": \"appid\",\n \"FieldType\": \"int\",\n \"FieldDict\": null\n },\n {\n \"Field\": \"RiskDays\",\n \"FieldName\": \"风险持续天数\",\n \"FieldType\": \"int\",\n \"FieldDict\": null\n },\n {\n \"Field\": \"conditionID\",\n \"FieldName\": \"条件ID\",\n \"FieldType\": \"int\",\n \"FieldDict\": null\n }\n ],\n \"RiskTotalCount\": 3,\n \"ResourceCount\": 10,\n \"Risks\": \"[{\\\"InstanceId\\\":\\\"ins-xxx1\\\",\\\"InstanceName\\\":\\\"xxx1\\\",\\\"InstanceState\\\":\\\"RUNNING\\\",\\\"PrivateIPAddresses\\\":[\\\"1.17.64.2\\\"],\\\"PublicIPAddresses\\\":null,\\\"Region\\\":\\\"ap-shanghai\\\",\\\"Tags\\\":null,\\\"Zone\\\":\\\"ap-shanghai-2\\\"},{\\\"InstanceId\\\":\\\"ins-xxx2\\\",\\\"InstanceName\\\":\\\"xxx2\\\",\\\"InstanceState\\\":\\\"RUNNING\\\",\\\"PrivateIPAddresses\\\":[\\\"1.17.64.11\\\"],\\\"PublicIPAddresses\\\":null,\\\"Region\\\":\\\"ap-shanghai\\\",\\\"Tags\\\":null,\\\"Zone\\\":\\\"ap-shanghai-2\\\"}]\",\n \"StrategyId\": 9\n }\n}",
|
16
16
|
"title": "查询评估项风险实例列表"
|
17
17
|
}
|
18
18
|
]
|
@@ -537,58 +537,6 @@ def doDescribeCcBlackWhiteIpList(args, parsed_globals):
|
|
537
537
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
538
|
|
539
539
|
|
540
|
-
def doDescribeBlackWhiteIpList(args, parsed_globals):
|
541
|
-
g_param = parse_global_arg(parsed_globals)
|
542
|
-
|
543
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
544
|
-
cred = credential.CVMRoleCredential()
|
545
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
546
|
-
cred = credential.STSAssumeRoleCredential(
|
547
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
548
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
549
|
-
)
|
550
|
-
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):
|
551
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
552
|
-
else:
|
553
|
-
cred = credential.Credential(
|
554
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
555
|
-
)
|
556
|
-
http_profile = HttpProfile(
|
557
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
558
|
-
reqMethod="POST",
|
559
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
560
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
561
|
-
)
|
562
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
563
|
-
if g_param[OptionsDefine.Language]:
|
564
|
-
profile.language = g_param[OptionsDefine.Language]
|
565
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
566
|
-
client = mod.AntiddosClient(cred, g_param[OptionsDefine.Region], profile)
|
567
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
568
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
569
|
-
model = models.DescribeBlackWhiteIpListRequest()
|
570
|
-
model.from_json_string(json.dumps(args))
|
571
|
-
start_time = time.time()
|
572
|
-
while True:
|
573
|
-
rsp = client.DescribeBlackWhiteIpList(model)
|
574
|
-
result = rsp.to_json_string()
|
575
|
-
try:
|
576
|
-
json_obj = json.loads(result)
|
577
|
-
except TypeError as e:
|
578
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
579
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
580
|
-
break
|
581
|
-
cur_time = time.time()
|
582
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
583
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
584
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
585
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
586
|
-
else:
|
587
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
588
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
589
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
590
|
-
|
591
|
-
|
592
540
|
def doDescribeCCLevelList(args, parsed_globals):
|
593
541
|
g_param = parse_global_arg(parsed_globals)
|
594
542
|
|
@@ -4541,58 +4489,6 @@ def doDeleteCcBlackWhiteIpList(args, parsed_globals):
|
|
4541
4489
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4542
4490
|
|
4543
4491
|
|
4544
|
-
def doDescribeListProtectThresholdConfig(args, parsed_globals):
|
4545
|
-
g_param = parse_global_arg(parsed_globals)
|
4546
|
-
|
4547
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4548
|
-
cred = credential.CVMRoleCredential()
|
4549
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4550
|
-
cred = credential.STSAssumeRoleCredential(
|
4551
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4552
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4553
|
-
)
|
4554
|
-
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):
|
4555
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4556
|
-
else:
|
4557
|
-
cred = credential.Credential(
|
4558
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4559
|
-
)
|
4560
|
-
http_profile = HttpProfile(
|
4561
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4562
|
-
reqMethod="POST",
|
4563
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
4564
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4565
|
-
)
|
4566
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4567
|
-
if g_param[OptionsDefine.Language]:
|
4568
|
-
profile.language = g_param[OptionsDefine.Language]
|
4569
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4570
|
-
client = mod.AntiddosClient(cred, g_param[OptionsDefine.Region], profile)
|
4571
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
4572
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4573
|
-
model = models.DescribeListProtectThresholdConfigRequest()
|
4574
|
-
model.from_json_string(json.dumps(args))
|
4575
|
-
start_time = time.time()
|
4576
|
-
while True:
|
4577
|
-
rsp = client.DescribeListProtectThresholdConfig(model)
|
4578
|
-
result = rsp.to_json_string()
|
4579
|
-
try:
|
4580
|
-
json_obj = json.loads(result)
|
4581
|
-
except TypeError as e:
|
4582
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4583
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4584
|
-
break
|
4585
|
-
cur_time = time.time()
|
4586
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4587
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4588
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4589
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4590
|
-
else:
|
4591
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4592
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4593
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4594
|
-
|
4595
|
-
|
4596
4492
|
def doDeleteCCPrecisionPolicy(args, parsed_globals):
|
4597
4493
|
g_param = parse_global_arg(parsed_globals)
|
4598
4494
|
|
@@ -4905,7 +4801,7 @@ def doCreateWaterPrintKey(args, parsed_globals):
|
|
4905
4801
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4906
4802
|
|
4907
4803
|
|
4908
|
-
def
|
4804
|
+
def doModifyDDoSGeoIPBlockConfig(args, parsed_globals):
|
4909
4805
|
g_param = parse_global_arg(parsed_globals)
|
4910
4806
|
|
4911
4807
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4934,11 +4830,11 @@ def doDeleteCCRequestLimitPolicy(args, parsed_globals):
|
|
4934
4830
|
client = mod.AntiddosClient(cred, g_param[OptionsDefine.Region], profile)
|
4935
4831
|
client._sdkVersion += ("_CLI_" + __version__)
|
4936
4832
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4937
|
-
model = models.
|
4833
|
+
model = models.ModifyDDoSGeoIPBlockConfigRequest()
|
4938
4834
|
model.from_json_string(json.dumps(args))
|
4939
4835
|
start_time = time.time()
|
4940
4836
|
while True:
|
4941
|
-
rsp = client.
|
4837
|
+
rsp = client.ModifyDDoSGeoIPBlockConfig(model)
|
4942
4838
|
result = rsp.to_json_string()
|
4943
4839
|
try:
|
4944
4840
|
json_obj = json.loads(result)
|
@@ -4957,7 +4853,7 @@ def doDeleteCCRequestLimitPolicy(args, parsed_globals):
|
|
4957
4853
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4958
4854
|
|
4959
4855
|
|
4960
|
-
def
|
4856
|
+
def doDeleteCCRequestLimitPolicy(args, parsed_globals):
|
4961
4857
|
g_param = parse_global_arg(parsed_globals)
|
4962
4858
|
|
4963
4859
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -4986,11 +4882,11 @@ def doModifyDDoSGeoIPBlockConfig(args, parsed_globals):
|
|
4986
4882
|
client = mod.AntiddosClient(cred, g_param[OptionsDefine.Region], profile)
|
4987
4883
|
client._sdkVersion += ("_CLI_" + __version__)
|
4988
4884
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4989
|
-
model = models.
|
4885
|
+
model = models.DeleteCCRequestLimitPolicyRequest()
|
4990
4886
|
model.from_json_string(json.dumps(args))
|
4991
4887
|
start_time = time.time()
|
4992
4888
|
while True:
|
4993
|
-
rsp = client.
|
4889
|
+
rsp = client.DeleteCCRequestLimitPolicy(model)
|
4994
4890
|
result = rsp.to_json_string()
|
4995
4891
|
try:
|
4996
4892
|
json_obj = json.loads(result)
|
@@ -5030,7 +4926,6 @@ ACTION_MAP = {
|
|
5030
4926
|
"DescribeDDoSConnectLimitList": doDescribeDDoSConnectLimitList,
|
5031
4927
|
"DescribeNewL7RulesErrHealth": doDescribeNewL7RulesErrHealth,
|
5032
4928
|
"DescribeCcBlackWhiteIpList": doDescribeCcBlackWhiteIpList,
|
5033
|
-
"DescribeBlackWhiteIpList": doDescribeBlackWhiteIpList,
|
5034
4929
|
"DescribeCCLevelList": doDescribeCCLevelList,
|
5035
4930
|
"CreateCCPrecisionPolicy": doCreateCCPrecisionPolicy,
|
5036
4931
|
"DescribeCCThresholdList": doDescribeCCThresholdList,
|
@@ -5107,15 +5002,14 @@ ACTION_MAP = {
|
|
5107
5002
|
"CreateDDoSBlackWhiteIpList": doCreateDDoSBlackWhiteIpList,
|
5108
5003
|
"DescribeCCTrend": doDescribeCCTrend,
|
5109
5004
|
"DeleteCcBlackWhiteIpList": doDeleteCcBlackWhiteIpList,
|
5110
|
-
"DescribeListProtectThresholdConfig": doDescribeListProtectThresholdConfig,
|
5111
5005
|
"DeleteCCPrecisionPolicy": doDeleteCCPrecisionPolicy,
|
5112
5006
|
"DescribeDDoSBlackWhiteIpList": doDescribeDDoSBlackWhiteIpList,
|
5113
5007
|
"CreateDDoSConnectLimit": doCreateDDoSConnectLimit,
|
5114
5008
|
"CreateDDoSGeoIPBlockConfig": doCreateDDoSGeoIPBlockConfig,
|
5115
5009
|
"DescribeCcGeoIPBlockConfigList": doDescribeCcGeoIPBlockConfigList,
|
5116
5010
|
"CreateWaterPrintKey": doCreateWaterPrintKey,
|
5117
|
-
"DeleteCCRequestLimitPolicy": doDeleteCCRequestLimitPolicy,
|
5118
5011
|
"ModifyDDoSGeoIPBlockConfig": doModifyDDoSGeoIPBlockConfig,
|
5012
|
+
"DeleteCCRequestLimitPolicy": doDeleteCCRequestLimitPolicy,
|
5119
5013
|
|
5120
5014
|
}
|
5121
5015
|
|