tccli 3.0.1355.1__py2.py3-none-any.whl → 3.0.1356.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/bi/v20220105/api.json +1 -1
- tccli/services/billing/v20180709/api.json +11 -11
- tccli/services/cdb/cdb_client.py +53 -0
- tccli/services/cdb/v20170320/api.json +57 -5
- tccli/services/cdb/v20170320/examples.json +8 -0
- tccli/services/cdwch/v20200915/api.json +1 -1
- tccli/services/clb/v20180317/api.json +1 -1
- tccli/services/cynosdb/cynosdb_client.py +53 -0
- tccli/services/cynosdb/v20190107/api.json +107 -0
- tccli/services/cynosdb/v20190107/examples.json +8 -0
- tccli/services/faceid/v20180301/api.json +26 -26
- tccli/services/gme/v20180711/api.json +1 -1
- tccli/services/gs/v20191118/api.json +9 -0
- tccli/services/live/v20180801/api.json +1 -1
- tccli/services/monitor/v20180724/api.json +1 -1
- tccli/services/mps/v20190612/api.json +11 -0
- tccli/services/ocr/v20181119/api.json +9 -0
- tccli/services/teo/teo_client.py +114 -8
- tccli/services/teo/v20220901/api.json +154 -0
- tccli/services/teo/v20220901/examples.json +16 -0
- tccli/services/vpc/v20170312/api.json +5 -5
- {tccli-3.0.1355.1.dist-info → tccli-3.0.1356.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1355.1.dist-info → tccli-3.0.1356.1.dist-info}/RECORD +27 -27
- {tccli-3.0.1355.1.dist-info → tccli-3.0.1356.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1355.1.dist-info → tccli-3.0.1356.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1355.1.dist-info → tccli-3.0.1356.1.dist-info}/license_files/LICENSE +0 -0
@@ -529,7 +529,7 @@
|
|
529
529
|
{
|
530
530
|
"disabled": false,
|
531
531
|
"document": "一比一时间时间戳,13位。",
|
532
|
-
"example": "
|
532
|
+
"example": "1638781186273",
|
533
533
|
"member": "string",
|
534
534
|
"name": "ReqTime",
|
535
535
|
"output_required": true,
|
@@ -539,7 +539,7 @@
|
|
539
539
|
{
|
540
540
|
"disabled": false,
|
541
541
|
"document": "一比一请求的唯一标记。",
|
542
|
-
"example": "
|
542
|
+
"example": "e594dc57-9ee3-409b-a8e4-7b46945887c3",
|
543
543
|
"member": "string",
|
544
544
|
"name": "Seq",
|
545
545
|
"output_required": true,
|
@@ -549,7 +549,7 @@
|
|
549
549
|
{
|
550
550
|
"disabled": false,
|
551
551
|
"document": "一比一时使用的、脱敏后的身份证号。",
|
552
|
-
"example": "
|
552
|
+
"example": "11204416541220243X",
|
553
553
|
"member": "string",
|
554
554
|
"name": "IdCard",
|
555
555
|
"output_required": true,
|
@@ -569,7 +569,7 @@
|
|
569
569
|
{
|
570
570
|
"disabled": false,
|
571
571
|
"document": "一比一时使用的、脱敏后的姓名。",
|
572
|
-
"example": "
|
572
|
+
"example": "韦小宝",
|
573
573
|
"member": "string",
|
574
574
|
"name": "Name",
|
575
575
|
"output_required": true,
|
@@ -579,7 +579,7 @@
|
|
579
579
|
{
|
580
580
|
"disabled": false,
|
581
581
|
"document": "一比一的相似度。0-100,保留2位小数。",
|
582
|
-
"example": "
|
582
|
+
"example": "100.00",
|
583
583
|
"member": "string",
|
584
584
|
"name": "Sim",
|
585
585
|
"output_required": true,
|
@@ -589,7 +589,7 @@
|
|
589
589
|
{
|
590
590
|
"disabled": false,
|
591
591
|
"document": "本次详情是否收费。",
|
592
|
-
"example": "
|
592
|
+
"example": "true",
|
593
593
|
"member": "bool",
|
594
594
|
"name": "IsNeedCharge",
|
595
595
|
"output_required": true,
|
@@ -599,7 +599,7 @@
|
|
599
599
|
{
|
600
600
|
"disabled": false,
|
601
601
|
"document": "收费类型,比对、核身、混合部署。",
|
602
|
-
"example": "
|
602
|
+
"example": "核身",
|
603
603
|
"member": "string",
|
604
604
|
"name": "ChargeType",
|
605
605
|
"output_required": true,
|
@@ -609,7 +609,7 @@
|
|
609
609
|
{
|
610
610
|
"disabled": false,
|
611
611
|
"document": "本次活体一比一最终结果。",
|
612
|
-
"example": "
|
612
|
+
"example": "0",
|
613
613
|
"member": "string",
|
614
614
|
"name": "ErrorCode",
|
615
615
|
"output_required": true,
|
@@ -619,7 +619,7 @@
|
|
619
619
|
{
|
620
620
|
"disabled": false,
|
621
621
|
"document": "本次活体一比一最终结果描述。",
|
622
|
-
"example": "
|
622
|
+
"example": "成功",
|
623
623
|
"member": "string",
|
624
624
|
"name": "ErrorMessage",
|
625
625
|
"output_required": true,
|
@@ -1201,7 +1201,7 @@
|
|
1201
1201
|
{
|
1202
1202
|
"disabled": false,
|
1203
1203
|
"document": "本接口不需要传递此参数。",
|
1204
|
-
"example": "
|
1204
|
+
"example": "本接口不需要传递此参数。",
|
1205
1205
|
"member": "string",
|
1206
1206
|
"name": "TerminalType",
|
1207
1207
|
"required": false,
|
@@ -1264,7 +1264,7 @@
|
|
1264
1264
|
{
|
1265
1265
|
"disabled": false,
|
1266
1266
|
"document": "意愿核身(朗读模式)使用的文案。\n- 若未使用意愿核身(朗读模式),则该字段无需传入。\n- 最长可接受120的字符串长度。",
|
1267
|
-
"example": "
|
1267
|
+
"example": "我同意办理该业务。",
|
1268
1268
|
"member": "string",
|
1269
1269
|
"name": "IntentionVerifyText",
|
1270
1270
|
"required": false,
|
@@ -1338,7 +1338,7 @@
|
|
1338
1338
|
{
|
1339
1339
|
"disabled": false,
|
1340
1340
|
"document": "请求时间戳。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1341
|
-
"example": "
|
1341
|
+
"example": "1753091765496",
|
1342
1342
|
"member": "string",
|
1343
1343
|
"name": "ReqTime",
|
1344
1344
|
"output_required": true,
|
@@ -1348,7 +1348,7 @@
|
|
1348
1348
|
{
|
1349
1349
|
"disabled": false,
|
1350
1350
|
"document": "本次活体一比一请求的唯一标记。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1351
|
-
"example": "
|
1351
|
+
"example": "5139af2d-442c-4500-837f-9683baba76ae",
|
1352
1352
|
"member": "string",
|
1353
1353
|
"name": "Seq",
|
1354
1354
|
"output_required": true,
|
@@ -1358,7 +1358,7 @@
|
|
1358
1358
|
{
|
1359
1359
|
"disabled": false,
|
1360
1360
|
"document": "参与本次活体一比一的身份证号。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1361
|
-
"example": "
|
1361
|
+
"example": "440111199001010000",
|
1362
1362
|
"member": "string",
|
1363
1363
|
"name": "Idcard",
|
1364
1364
|
"output_required": true,
|
@@ -1368,7 +1368,7 @@
|
|
1368
1368
|
{
|
1369
1369
|
"disabled": false,
|
1370
1370
|
"document": "参与本次活体一比一的姓名。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1371
|
-
"example": "
|
1371
|
+
"example": "张三",
|
1372
1372
|
"member": "string",
|
1373
1373
|
"name": "Name",
|
1374
1374
|
"output_required": true,
|
@@ -1378,7 +1378,7 @@
|
|
1378
1378
|
{
|
1379
1379
|
"disabled": false,
|
1380
1380
|
"document": "本次活体一比一的相似度。\n注意:此字段可能返回 null,表示取不到有效值。",
|
1381
|
-
"example": "
|
1381
|
+
"example": "100.00",
|
1382
1382
|
"member": "string",
|
1383
1383
|
"name": "Sim",
|
1384
1384
|
"output_required": true,
|
@@ -1408,7 +1408,7 @@
|
|
1408
1408
|
{
|
1409
1409
|
"disabled": false,
|
1410
1410
|
"document": "本次活体一比一最终结果描述。(仅描述用,文案更新时不会通知。)\n注意:此字段可能返回 null,表示取不到有效值。",
|
1411
|
-
"example": "
|
1411
|
+
"example": "成功",
|
1412
1412
|
"member": "string",
|
1413
1413
|
"name": "Errmsg",
|
1414
1414
|
"output_required": true,
|
@@ -1428,7 +1428,7 @@
|
|
1428
1428
|
{
|
1429
1429
|
"disabled": false,
|
1430
1430
|
"document": "本次活体结果描述。(仅描述用,文案更新时不会通知。)\n注意:此字段可能返回 null,表示取不到有效值。",
|
1431
|
-
"example": "
|
1431
|
+
"example": "成功",
|
1432
1432
|
"member": "string",
|
1433
1433
|
"name": "Livemsg",
|
1434
1434
|
"output_required": true,
|
@@ -1448,7 +1448,7 @@
|
|
1448
1448
|
{
|
1449
1449
|
"disabled": false,
|
1450
1450
|
"document": "本次一比一结果描述。(仅描述用,文案更新时不会通知。)\n注意:此字段可能返回 null,表示取不到有效值。",
|
1451
|
-
"example": "
|
1451
|
+
"example": "成功",
|
1452
1452
|
"member": "string",
|
1453
1453
|
"name": "Comparemsg",
|
1454
1454
|
"output_required": true,
|
@@ -1458,7 +1458,7 @@
|
|
1458
1458
|
{
|
1459
1459
|
"disabled": false,
|
1460
1460
|
"document": "比对库源类型。包括:\n公安商业库;\n业务方自有库(用户上传照片、客户的混合库、混合部署库);\n二次验证库;\n人工审核库;\n注意:此字段可能返回 null,表示取不到有效值。",
|
1461
|
-
"example": "
|
1461
|
+
"example": "公安商业库",
|
1462
1462
|
"member": "string",
|
1463
1463
|
"name": "CompareLibType",
|
1464
1464
|
"output_required": true,
|
@@ -5248,10 +5248,10 @@
|
|
5248
5248
|
{
|
5249
5249
|
"disabled": false,
|
5250
5250
|
"document": "token",
|
5251
|
-
"example": "
|
5251
|
+
"example": "14E43038-CC2F-4945-941E-AD6D5989AF9F",
|
5252
5252
|
"member": "string",
|
5253
5253
|
"name": "BizToken",
|
5254
|
-
"
|
5254
|
+
"output_required": true,
|
5255
5255
|
"type": "string",
|
5256
5256
|
"value_allowed_null": false
|
5257
5257
|
},
|
@@ -5261,7 +5261,7 @@
|
|
5261
5261
|
"example": "0",
|
5262
5262
|
"member": "uint64",
|
5263
5263
|
"name": "ChargeCount",
|
5264
|
-
"
|
5264
|
+
"output_required": true,
|
5265
5265
|
"type": "int",
|
5266
5266
|
"value_allowed_null": false
|
5267
5267
|
},
|
@@ -5271,17 +5271,17 @@
|
|
5271
5271
|
"example": "无",
|
5272
5272
|
"member": "ChargeDetail",
|
5273
5273
|
"name": "ChargeDetails",
|
5274
|
-
"
|
5274
|
+
"output_required": true,
|
5275
5275
|
"type": "list",
|
5276
5276
|
"value_allowed_null": false
|
5277
5277
|
},
|
5278
5278
|
{
|
5279
5279
|
"disabled": false,
|
5280
5280
|
"document": "业务RuleId",
|
5281
|
-
"example": "
|
5281
|
+
"example": "1",
|
5282
5282
|
"member": "string",
|
5283
5283
|
"name": "RuleId",
|
5284
|
-
"
|
5284
|
+
"output_required": true,
|
5285
5285
|
"type": "string",
|
5286
5286
|
"value_allowed_null": false
|
5287
5287
|
}
|
@@ -3219,6 +3219,15 @@
|
|
3219
3219
|
"name": "Limit",
|
3220
3220
|
"required": false,
|
3221
3221
|
"type": "int"
|
3222
|
+
},
|
3223
|
+
{
|
3224
|
+
"disabled": false,
|
3225
|
+
"document": "时间范围限制,以天数为单位",
|
3226
|
+
"example": "7",
|
3227
|
+
"member": "int64",
|
3228
|
+
"name": "RecentDays",
|
3229
|
+
"required": false,
|
3230
|
+
"type": "int"
|
3222
3231
|
}
|
3223
3232
|
],
|
3224
3233
|
"type": "object"
|
@@ -1636,6 +1636,17 @@
|
|
1636
1636
|
"required": false,
|
1637
1637
|
"type": "string",
|
1638
1638
|
"value_allowed_null": false
|
1639
|
+
},
|
1640
|
+
{
|
1641
|
+
"disabled": false,
|
1642
|
+
"document": "字幕参数\n注意:此字段可能返回 null,表示取不到有效值。",
|
1643
|
+
"example": "无",
|
1644
|
+
"member": "SubtitleTemplate",
|
1645
|
+
"name": "SubtitleTemplate",
|
1646
|
+
"output_required": false,
|
1647
|
+
"required": false,
|
1648
|
+
"type": "object",
|
1649
|
+
"value_allowed_null": true
|
1639
1650
|
}
|
1640
1651
|
],
|
1641
1652
|
"usage": "both"
|
@@ -5418,6 +5418,15 @@
|
|
5418
5418
|
"name": "ConfigAdvanced",
|
5419
5419
|
"required": false,
|
5420
5420
|
"type": "object"
|
5421
|
+
},
|
5422
|
+
{
|
5423
|
+
"disabled": false,
|
5424
|
+
"document": "cn时,添加的key为中文 \nen时,添加的key为英语",
|
5425
|
+
"example": "cn",
|
5426
|
+
"member": "string",
|
5427
|
+
"name": "OutputLanguage",
|
5428
|
+
"required": false,
|
5429
|
+
"type": "string"
|
5421
5430
|
}
|
5422
5431
|
],
|
5423
5432
|
"type": "object"
|
tccli/services/teo/teo_client.py
CHANGED
@@ -331,6 +331,58 @@ def doCreatePurgeTask(args, parsed_globals):
|
|
331
331
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
332
332
|
|
333
333
|
|
334
|
+
def doDescribeDDoSProtection(args, parsed_globals):
|
335
|
+
g_param = parse_global_arg(parsed_globals)
|
336
|
+
|
337
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
338
|
+
cred = credential.CVMRoleCredential()
|
339
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
340
|
+
cred = credential.STSAssumeRoleCredential(
|
341
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
342
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
343
|
+
)
|
344
|
+
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):
|
345
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
346
|
+
else:
|
347
|
+
cred = credential.Credential(
|
348
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
349
|
+
)
|
350
|
+
http_profile = HttpProfile(
|
351
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
352
|
+
reqMethod="POST",
|
353
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
354
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
355
|
+
)
|
356
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
357
|
+
if g_param[OptionsDefine.Language]:
|
358
|
+
profile.language = g_param[OptionsDefine.Language]
|
359
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
360
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
361
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
362
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
363
|
+
model = models.DescribeDDoSProtectionRequest()
|
364
|
+
model.from_json_string(json.dumps(args))
|
365
|
+
start_time = time.time()
|
366
|
+
while True:
|
367
|
+
rsp = client.DescribeDDoSProtection(model)
|
368
|
+
result = rsp.to_json_string()
|
369
|
+
try:
|
370
|
+
json_obj = json.loads(result)
|
371
|
+
except TypeError as e:
|
372
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
373
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
374
|
+
break
|
375
|
+
cur_time = time.time()
|
376
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
377
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
378
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
379
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
380
|
+
else:
|
381
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
382
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
383
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
384
|
+
|
385
|
+
|
334
386
|
def doDescribeMultiPathGatewayRegions(args, parsed_globals):
|
335
387
|
g_param = parse_global_arg(parsed_globals)
|
336
388
|
|
@@ -1267,7 +1319,7 @@ def doModifyL7AccSetting(args, parsed_globals):
|
|
1267
1319
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1268
1320
|
|
1269
1321
|
|
1270
|
-
def
|
1322
|
+
def doDescribeConfigGroupVersions(args, parsed_globals):
|
1271
1323
|
g_param = parse_global_arg(parsed_globals)
|
1272
1324
|
|
1273
1325
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1296,11 +1348,11 @@ def doModifyMultiPathGatewayLine(args, parsed_globals):
|
|
1296
1348
|
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
1297
1349
|
client._sdkVersion += ("_CLI_" + __version__)
|
1298
1350
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1299
|
-
model = models.
|
1351
|
+
model = models.DescribeConfigGroupVersionsRequest()
|
1300
1352
|
model.from_json_string(json.dumps(args))
|
1301
1353
|
start_time = time.time()
|
1302
1354
|
while True:
|
1303
|
-
rsp = client.
|
1355
|
+
rsp = client.DescribeConfigGroupVersions(model)
|
1304
1356
|
result = rsp.to_json_string()
|
1305
1357
|
try:
|
1306
1358
|
json_obj = json.loads(result)
|
@@ -3035,7 +3087,7 @@ def doModifyFunctionRule(args, parsed_globals):
|
|
3035
3087
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3036
3088
|
|
3037
3089
|
|
3038
|
-
def
|
3090
|
+
def doModifyMultiPathGatewayLine(args, parsed_globals):
|
3039
3091
|
g_param = parse_global_arg(parsed_globals)
|
3040
3092
|
|
3041
3093
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -3064,11 +3116,11 @@ def doDescribeConfigGroupVersions(args, parsed_globals):
|
|
3064
3116
|
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
3065
3117
|
client._sdkVersion += ("_CLI_" + __version__)
|
3066
3118
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3067
|
-
model = models.
|
3119
|
+
model = models.ModifyMultiPathGatewayLineRequest()
|
3068
3120
|
model.from_json_string(json.dumps(args))
|
3069
3121
|
start_time = time.time()
|
3070
3122
|
while True:
|
3071
|
-
rsp = client.
|
3123
|
+
rsp = client.ModifyMultiPathGatewayLine(model)
|
3072
3124
|
result = rsp.to_json_string()
|
3073
3125
|
try:
|
3074
3126
|
json_obj = json.loads(result)
|
@@ -8183,6 +8235,58 @@ def doDescribeDnsRecords(args, parsed_globals):
|
|
8183
8235
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8184
8236
|
|
8185
8237
|
|
8238
|
+
def doModifyDDoSProtection(args, parsed_globals):
|
8239
|
+
g_param = parse_global_arg(parsed_globals)
|
8240
|
+
|
8241
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
8242
|
+
cred = credential.CVMRoleCredential()
|
8243
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
8244
|
+
cred = credential.STSAssumeRoleCredential(
|
8245
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
8246
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
8247
|
+
)
|
8248
|
+
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):
|
8249
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
8250
|
+
else:
|
8251
|
+
cred = credential.Credential(
|
8252
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
8253
|
+
)
|
8254
|
+
http_profile = HttpProfile(
|
8255
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
8256
|
+
reqMethod="POST",
|
8257
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
8258
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
8259
|
+
)
|
8260
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
8261
|
+
if g_param[OptionsDefine.Language]:
|
8262
|
+
profile.language = g_param[OptionsDefine.Language]
|
8263
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
8264
|
+
client = mod.TeoClient(cred, g_param[OptionsDefine.Region], profile)
|
8265
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
8266
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
8267
|
+
model = models.ModifyDDoSProtectionRequest()
|
8268
|
+
model.from_json_string(json.dumps(args))
|
8269
|
+
start_time = time.time()
|
8270
|
+
while True:
|
8271
|
+
rsp = client.ModifyDDoSProtection(model)
|
8272
|
+
result = rsp.to_json_string()
|
8273
|
+
try:
|
8274
|
+
json_obj = json.loads(result)
|
8275
|
+
except TypeError as e:
|
8276
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
8277
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
8278
|
+
break
|
8279
|
+
cur_time = time.time()
|
8280
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
8281
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
8282
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
8283
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
8284
|
+
else:
|
8285
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
8286
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
8287
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
8288
|
+
|
8289
|
+
|
8186
8290
|
def doImportZoneConfig(args, parsed_globals):
|
8187
8291
|
g_param = parse_global_arg(parsed_globals)
|
8188
8292
|
|
@@ -8722,6 +8826,7 @@ ACTION_MAP = {
|
|
8722
8826
|
"DescribeContentIdentifiers": doDescribeContentIdentifiers,
|
8723
8827
|
"DeleteFunction": doDeleteFunction,
|
8724
8828
|
"CreatePurgeTask": doCreatePurgeTask,
|
8829
|
+
"DescribeDDoSProtection": doDescribeDDoSProtection,
|
8725
8830
|
"DescribeMultiPathGatewayRegions": doDescribeMultiPathGatewayRegions,
|
8726
8831
|
"DownloadL4Logs": doDownloadL4Logs,
|
8727
8832
|
"CreatePlanForZone": doCreatePlanForZone,
|
@@ -8740,7 +8845,7 @@ ACTION_MAP = {
|
|
8740
8845
|
"ModifyOriginGroup": doModifyOriginGroup,
|
8741
8846
|
"DeleteApplicationProxy": doDeleteApplicationProxy,
|
8742
8847
|
"ModifyL7AccSetting": doModifyL7AccSetting,
|
8743
|
-
"
|
8848
|
+
"DescribeConfigGroupVersions": doDescribeConfigGroupVersions,
|
8744
8849
|
"ModifyL4ProxyStatus": doModifyL4ProxyStatus,
|
8745
8850
|
"DownloadL7Logs": doDownloadL7Logs,
|
8746
8851
|
"DescribeEnvironments": doDescribeEnvironments,
|
@@ -8774,7 +8879,7 @@ ACTION_MAP = {
|
|
8774
8879
|
"ModifyDnsRecords": doModifyDnsRecords,
|
8775
8880
|
"DescribeTimingL7CacheData": doDescribeTimingL7CacheData,
|
8776
8881
|
"ModifyFunctionRule": doModifyFunctionRule,
|
8777
|
-
"
|
8882
|
+
"ModifyMultiPathGatewayLine": doModifyMultiPathGatewayLine,
|
8778
8883
|
"ModifyWebSecurityTemplate": doModifyWebSecurityTemplate,
|
8779
8884
|
"ModifyL7AccRulePriority": doModifyL7AccRulePriority,
|
8780
8885
|
"ModifyZoneSetting": doModifyZoneSetting,
|
@@ -8873,6 +8978,7 @@ ACTION_MAP = {
|
|
8873
8978
|
"DeleteZone": doDeleteZone,
|
8874
8979
|
"DescribeSecurityIPGroupInfo": doDescribeSecurityIPGroupInfo,
|
8875
8980
|
"DescribeDnsRecords": doDescribeDnsRecords,
|
8981
|
+
"ModifyDDoSProtection": doModifyDDoSProtection,
|
8876
8982
|
"ImportZoneConfig": doImportZoneConfig,
|
8877
8983
|
"CreateMultiPathGatewaySecretKey": doCreateMultiPathGatewaySecretKey,
|
8878
8984
|
"ModifyCustomErrorPage": doModifyCustomErrorPage,
|