tccli 3.0.1191.1__py2.py3-none-any.whl → 3.0.1192.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/services/cdb/v20170320/api.json +9 -0
- tccli/services/cfw/cfw_client.py +53 -0
- tccli/services/cfw/v20190904/api.json +473 -0
- tccli/services/cfw/v20190904/examples.json +8 -0
- tccli/services/ckafka/ckafka_client.py +53 -0
- tccli/services/ckafka/v20190819/api.json +80 -0
- tccli/services/ckafka/v20190819/examples.json +8 -0
- tccli/services/cls/v20201016/examples.json +1 -1
- tccli/services/dlc/v20210125/api.json +11 -8
- tccli/services/dlc/v20210125/examples.json +3 -3
- tccli/services/emr/v20190103/api.json +7 -7
- tccli/services/ess/v20201111/api.json +2 -2
- tccli/services/ess/v20201111/examples.json +6 -0
- tccli/services/essbasic/v20210526/examples.json +43 -1
- tccli/services/irp/v20220805/api.json +11 -2
- tccli/services/lke/v20231130/api.json +82 -4
- tccli/services/ocr/v20181119/api.json +10 -0
- tccli/services/ocr/v20181119/examples.json +1 -1
- tccli/services/omics/v20221128/api.json +13 -2
- tccli/services/vdb/v20230616/api.json +9 -0
- tccli/services/vdb/v20230616/examples.json +2 -2
- tccli/services/vpc/v20170312/api.json +3 -3
- {tccli-3.0.1191.1.dist-info → tccli-3.0.1192.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1191.1.dist-info → tccli-3.0.1192.1.dist-info}/RECORD +28 -28
- {tccli-3.0.1191.1.dist-info → tccli-3.0.1192.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1191.1.dist-info → tccli-3.0.1192.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1191.1.dist-info → tccli-3.0.1192.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1192.1'
|
@@ -12275,6 +12275,15 @@
|
|
12275
12275
|
"name": "InstType",
|
12276
12276
|
"required": false,
|
12277
12277
|
"type": "string"
|
12278
|
+
},
|
12279
|
+
{
|
12280
|
+
"disabled": false,
|
12281
|
+
"document": "节点ID",
|
12282
|
+
"example": "dbn-j57njp5s",
|
12283
|
+
"member": "string",
|
12284
|
+
"name": "OpResourceId",
|
12285
|
+
"required": false,
|
12286
|
+
"type": "string"
|
12278
12287
|
}
|
12279
12288
|
],
|
12280
12289
|
"type": "object"
|
tccli/services/cfw/cfw_client.py
CHANGED
@@ -4177,6 +4177,58 @@ def doModifyAclRule(args, parsed_globals):
|
|
4177
4177
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4178
4178
|
|
4179
4179
|
|
4180
|
+
def doDescribeEnterpriseSecurityGroupRuleList(args, parsed_globals):
|
4181
|
+
g_param = parse_global_arg(parsed_globals)
|
4182
|
+
|
4183
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4184
|
+
cred = credential.CVMRoleCredential()
|
4185
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4186
|
+
cred = credential.STSAssumeRoleCredential(
|
4187
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4188
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4189
|
+
)
|
4190
|
+
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):
|
4191
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4192
|
+
else:
|
4193
|
+
cred = credential.Credential(
|
4194
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4195
|
+
)
|
4196
|
+
http_profile = HttpProfile(
|
4197
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4198
|
+
reqMethod="POST",
|
4199
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
4200
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4201
|
+
)
|
4202
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4203
|
+
if g_param[OptionsDefine.Language]:
|
4204
|
+
profile.language = g_param[OptionsDefine.Language]
|
4205
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4206
|
+
client = mod.CfwClient(cred, g_param[OptionsDefine.Region], profile)
|
4207
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
4208
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4209
|
+
model = models.DescribeEnterpriseSecurityGroupRuleListRequest()
|
4210
|
+
model.from_json_string(json.dumps(args))
|
4211
|
+
start_time = time.time()
|
4212
|
+
while True:
|
4213
|
+
rsp = client.DescribeEnterpriseSecurityGroupRuleList(model)
|
4214
|
+
result = rsp.to_json_string()
|
4215
|
+
try:
|
4216
|
+
json_obj = json.loads(result)
|
4217
|
+
except TypeError as e:
|
4218
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4219
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4220
|
+
break
|
4221
|
+
cur_time = time.time()
|
4222
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4223
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4224
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4225
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4226
|
+
else:
|
4227
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4228
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4229
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4230
|
+
|
4231
|
+
|
4180
4232
|
def doDescribeCfwEips(args, parsed_globals):
|
4181
4233
|
g_param = parse_global_arg(parsed_globals)
|
4182
4234
|
|
@@ -6036,6 +6088,7 @@ ACTION_MAP = {
|
|
6036
6088
|
"SetNatFwEip": doSetNatFwEip,
|
6037
6089
|
"CreateAlertCenterRule": doCreateAlertCenterRule,
|
6038
6090
|
"ModifyAclRule": doModifyAclRule,
|
6091
|
+
"DescribeEnterpriseSecurityGroupRuleList": doDescribeEnterpriseSecurityGroupRuleList,
|
6039
6092
|
"DescribeCfwEips": doDescribeCfwEips,
|
6040
6093
|
"DescribeBlockIgnoreList": doDescribeBlockIgnoreList,
|
6041
6094
|
"RemoveNatAcRule": doRemoveNatAcRule,
|
@@ -294,6 +294,13 @@
|
|
294
294
|
"output": "DescribeEnterpriseSecurityGroupRuleResponse",
|
295
295
|
"status": "online"
|
296
296
|
},
|
297
|
+
"DescribeEnterpriseSecurityGroupRuleList": {
|
298
|
+
"document": "查询新企业安全组规则 从node接口迁移 原接口DescribeSecurityGroupNewList",
|
299
|
+
"input": "DescribeEnterpriseSecurityGroupRuleListRequest",
|
300
|
+
"name": "查询新企业安全组规则列表",
|
301
|
+
"output": "DescribeEnterpriseSecurityGroupRuleListResponse",
|
302
|
+
"status": "online"
|
303
|
+
},
|
297
304
|
"DescribeFwEdgeIps": {
|
298
305
|
"document": "串行防火墙IP开关列表",
|
299
306
|
"input": "DescribeFwEdgeIpsRequest",
|
@@ -5612,6 +5619,127 @@
|
|
5612
5619
|
],
|
5613
5620
|
"type": "object"
|
5614
5621
|
},
|
5622
|
+
"DescribeEnterpriseSecurityGroupRuleListRequest": {
|
5623
|
+
"document": "DescribeEnterpriseSecurityGroupRuleList请求参数结构体",
|
5624
|
+
"members": [
|
5625
|
+
{
|
5626
|
+
"disabled": false,
|
5627
|
+
"document": "分页每页数量",
|
5628
|
+
"example": "10",
|
5629
|
+
"member": "int64",
|
5630
|
+
"name": "Limit",
|
5631
|
+
"required": true,
|
5632
|
+
"type": "int"
|
5633
|
+
},
|
5634
|
+
{
|
5635
|
+
"disabled": false,
|
5636
|
+
"document": "分页当前页",
|
5637
|
+
"example": "0",
|
5638
|
+
"member": "int64",
|
5639
|
+
"name": "Offset",
|
5640
|
+
"required": true,
|
5641
|
+
"type": "int"
|
5642
|
+
},
|
5643
|
+
{
|
5644
|
+
"disabled": false,
|
5645
|
+
"document": "启用状态 1启用 0 未启用",
|
5646
|
+
"example": "1",
|
5647
|
+
"member": "string",
|
5648
|
+
"name": "Status",
|
5649
|
+
"required": false,
|
5650
|
+
"type": "string"
|
5651
|
+
},
|
5652
|
+
{
|
5653
|
+
"disabled": false,
|
5654
|
+
"document": "地域",
|
5655
|
+
"example": "ap-guangzhou",
|
5656
|
+
"member": "string",
|
5657
|
+
"name": "Area",
|
5658
|
+
"required": false,
|
5659
|
+
"type": "string"
|
5660
|
+
},
|
5661
|
+
{
|
5662
|
+
"disabled": false,
|
5663
|
+
"document": "规则下发方式筛选 1 新规则和延迟下发 2 仅看新规则 ",
|
5664
|
+
"example": "1",
|
5665
|
+
"member": "int64",
|
5666
|
+
"name": "Filter",
|
5667
|
+
"required": false,
|
5668
|
+
"type": "int"
|
5669
|
+
},
|
5670
|
+
{
|
5671
|
+
"disabled": false,
|
5672
|
+
"document": "查询条件",
|
5673
|
+
"example": "{\\\"Port\\\":\\\"tcp好多个\\\",\\\"common\\\":\\\"\\\"}",
|
5674
|
+
"member": "string",
|
5675
|
+
"name": "SearchValue",
|
5676
|
+
"required": false,
|
5677
|
+
"type": "string"
|
5678
|
+
},
|
5679
|
+
{
|
5680
|
+
"disabled": false,
|
5681
|
+
"document": "查询条件新",
|
5682
|
+
"example": "[{\"Name\":\"test\",\"Values\":[\"test\"]}]",
|
5683
|
+
"member": "CommonFilter",
|
5684
|
+
"name": "SearchFilters",
|
5685
|
+
"required": false,
|
5686
|
+
"type": "list"
|
5687
|
+
}
|
5688
|
+
],
|
5689
|
+
"type": "object"
|
5690
|
+
},
|
5691
|
+
"DescribeEnterpriseSecurityGroupRuleListResponse": {
|
5692
|
+
"document": "DescribeEnterpriseSecurityGroupRuleList返回参数结构体",
|
5693
|
+
"members": [
|
5694
|
+
{
|
5695
|
+
"disabled": false,
|
5696
|
+
"document": "查询结果总数",
|
5697
|
+
"example": "1",
|
5698
|
+
"member": "int64",
|
5699
|
+
"name": "Total",
|
5700
|
+
"output_required": true,
|
5701
|
+
"type": "int",
|
5702
|
+
"value_allowed_null": false
|
5703
|
+
},
|
5704
|
+
{
|
5705
|
+
"disabled": false,
|
5706
|
+
"document": "规则总数",
|
5707
|
+
"example": "10",
|
5708
|
+
"member": "int64",
|
5709
|
+
"name": "AllTotal",
|
5710
|
+
"output_required": true,
|
5711
|
+
"type": "int",
|
5712
|
+
"value_allowed_null": false
|
5713
|
+
},
|
5714
|
+
{
|
5715
|
+
"disabled": false,
|
5716
|
+
"document": "规则列表",
|
5717
|
+
"example": "无",
|
5718
|
+
"member": "EnterpriseSecurityGroupRuleRuleInfo",
|
5719
|
+
"name": "Data",
|
5720
|
+
"output_required": true,
|
5721
|
+
"type": "list",
|
5722
|
+
"value_allowed_null": false
|
5723
|
+
},
|
5724
|
+
{
|
5725
|
+
"disabled": false,
|
5726
|
+
"document": "规则整体启用状态",
|
5727
|
+
"example": "1",
|
5728
|
+
"member": "int64",
|
5729
|
+
"name": "Enable",
|
5730
|
+
"output_required": true,
|
5731
|
+
"type": "int",
|
5732
|
+
"value_allowed_null": false
|
5733
|
+
},
|
5734
|
+
{
|
5735
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
5736
|
+
"member": "string",
|
5737
|
+
"name": "RequestId",
|
5738
|
+
"type": "string"
|
5739
|
+
}
|
5740
|
+
],
|
5741
|
+
"type": "object"
|
5742
|
+
},
|
5615
5743
|
"DescribeEnterpriseSecurityGroupRuleRequest": {
|
5616
5744
|
"document": "DescribeEnterpriseSecurityGroupRule请求参数结构体",
|
5617
5745
|
"members": [
|
@@ -8302,6 +8430,351 @@
|
|
8302
8430
|
],
|
8303
8431
|
"usage": "in"
|
8304
8432
|
},
|
8433
|
+
"EnterpriseSecurityGroupRuleBetaInfo": {
|
8434
|
+
"document": "企业安全组自动化任务信息",
|
8435
|
+
"members": [
|
8436
|
+
{
|
8437
|
+
"disabled": false,
|
8438
|
+
"document": "任务id\n注意:此字段可能返回 null,表示取不到有效值。",
|
8439
|
+
"example": "xxx",
|
8440
|
+
"member": "int64",
|
8441
|
+
"name": "TaskId",
|
8442
|
+
"output_required": false,
|
8443
|
+
"required": false,
|
8444
|
+
"type": "int",
|
8445
|
+
"value_allowed_null": true
|
8446
|
+
},
|
8447
|
+
{
|
8448
|
+
"disabled": false,
|
8449
|
+
"document": "任务名称\n注意:此字段可能返回 null,表示取不到有效值。",
|
8450
|
+
"example": "test",
|
8451
|
+
"member": "string",
|
8452
|
+
"name": "TaskName",
|
8453
|
+
"output_required": false,
|
8454
|
+
"required": false,
|
8455
|
+
"type": "string",
|
8456
|
+
"value_allowed_null": true
|
8457
|
+
},
|
8458
|
+
{
|
8459
|
+
"disabled": false,
|
8460
|
+
"document": "时间\n注意:此字段可能返回 null,表示取不到有效值。",
|
8461
|
+
"example": "1999-01-01 00:00:01",
|
8462
|
+
"member": "string",
|
8463
|
+
"name": "LastTime",
|
8464
|
+
"output_required": false,
|
8465
|
+
"required": false,
|
8466
|
+
"type": "string",
|
8467
|
+
"value_allowed_null": true
|
8468
|
+
}
|
8469
|
+
],
|
8470
|
+
"usage": "both"
|
8471
|
+
},
|
8472
|
+
"EnterpriseSecurityGroupRuleRuleInfo": {
|
8473
|
+
"document": "企业安全组规则列表信息",
|
8474
|
+
"members": [
|
8475
|
+
{
|
8476
|
+
"disabled": false,
|
8477
|
+
"document": "排序\n注意:此字段可能返回 null,表示取不到有效值。",
|
8478
|
+
"example": "1",
|
8479
|
+
"member": "int64",
|
8480
|
+
"name": "OrderIndex",
|
8481
|
+
"output_required": false,
|
8482
|
+
"type": "int",
|
8483
|
+
"value_allowed_null": true
|
8484
|
+
},
|
8485
|
+
{
|
8486
|
+
"disabled": false,
|
8487
|
+
"document": "主键id\n注意:此字段可能返回 null,表示取不到有效值。",
|
8488
|
+
"example": "1",
|
8489
|
+
"member": "uint64",
|
8490
|
+
"name": "RuleUuid",
|
8491
|
+
"output_required": false,
|
8492
|
+
"type": "int",
|
8493
|
+
"value_allowed_null": true
|
8494
|
+
},
|
8495
|
+
{
|
8496
|
+
"disabled": false,
|
8497
|
+
"document": "规则uuid\n注意:此字段可能返回 null,表示取不到有效值。",
|
8498
|
+
"example": "sg-xxx",
|
8499
|
+
"member": "string",
|
8500
|
+
"name": "Uuid",
|
8501
|
+
"output_required": false,
|
8502
|
+
"type": "string",
|
8503
|
+
"value_allowed_null": true
|
8504
|
+
},
|
8505
|
+
{
|
8506
|
+
"disabled": false,
|
8507
|
+
"document": "源规则内容\n注意:此字段可能返回 null,表示取不到有效值。",
|
8508
|
+
"example": "test",
|
8509
|
+
"member": "string",
|
8510
|
+
"name": "SourceId",
|
8511
|
+
"output_required": false,
|
8512
|
+
"type": "string",
|
8513
|
+
"value_allowed_null": true
|
8514
|
+
},
|
8515
|
+
{
|
8516
|
+
"disabled": false,
|
8517
|
+
"document": "源规则类型\n注意:此字段可能返回 null,表示取不到有效值。",
|
8518
|
+
"example": "1",
|
8519
|
+
"member": "int64",
|
8520
|
+
"name": "SourceType",
|
8521
|
+
"output_required": false,
|
8522
|
+
"type": "int",
|
8523
|
+
"value_allowed_null": true
|
8524
|
+
},
|
8525
|
+
{
|
8526
|
+
"disabled": false,
|
8527
|
+
"document": "目的规则内容\n注意:此字段可能返回 null,表示取不到有效值。",
|
8528
|
+
"example": "test",
|
8529
|
+
"member": "string",
|
8530
|
+
"name": "TargetId",
|
8531
|
+
"output_required": false,
|
8532
|
+
"type": "string",
|
8533
|
+
"value_allowed_null": true
|
8534
|
+
},
|
8535
|
+
{
|
8536
|
+
"disabled": false,
|
8537
|
+
"document": "目的规则类型\n注意:此字段可能返回 null,表示取不到有效值。",
|
8538
|
+
"example": "1",
|
8539
|
+
"member": "int64",
|
8540
|
+
"name": "TargetType",
|
8541
|
+
"output_required": false,
|
8542
|
+
"type": "int",
|
8543
|
+
"value_allowed_null": true
|
8544
|
+
},
|
8545
|
+
{
|
8546
|
+
"disabled": false,
|
8547
|
+
"document": "协议名称\n注意:此字段可能返回 null,表示取不到有效值。",
|
8548
|
+
"example": "TCP",
|
8549
|
+
"member": "string",
|
8550
|
+
"name": "Protocol",
|
8551
|
+
"output_required": false,
|
8552
|
+
"type": "string",
|
8553
|
+
"value_allowed_null": true
|
8554
|
+
},
|
8555
|
+
{
|
8556
|
+
"disabled": false,
|
8557
|
+
"document": "端口\n注意:此字段可能返回 null,表示取不到有效值。",
|
8558
|
+
"example": "3306",
|
8559
|
+
"member": "string",
|
8560
|
+
"name": "Port",
|
8561
|
+
"output_required": false,
|
8562
|
+
"type": "string",
|
8563
|
+
"value_allowed_null": true
|
8564
|
+
},
|
8565
|
+
{
|
8566
|
+
"disabled": false,
|
8567
|
+
"document": "策略,1阻断,2放行\n注意:此字段可能返回 null,表示取不到有效值。",
|
8568
|
+
"example": "1",
|
8569
|
+
"member": "int64",
|
8570
|
+
"name": "Strategy",
|
8571
|
+
"output_required": false,
|
8572
|
+
"type": "int",
|
8573
|
+
"value_allowed_null": true
|
8574
|
+
},
|
8575
|
+
{
|
8576
|
+
"disabled": false,
|
8577
|
+
"document": "启用状态 ,0未开启,1开启\n注意:此字段可能返回 null,表示取不到有效值。",
|
8578
|
+
"example": "1",
|
8579
|
+
"member": "int64",
|
8580
|
+
"name": "Status",
|
8581
|
+
"output_required": false,
|
8582
|
+
"type": "int",
|
8583
|
+
"value_allowed_null": true
|
8584
|
+
},
|
8585
|
+
{
|
8586
|
+
"disabled": false,
|
8587
|
+
"document": "描述\n注意:此字段可能返回 null,表示取不到有效值。",
|
8588
|
+
"example": "test",
|
8589
|
+
"member": "string",
|
8590
|
+
"name": "Detail",
|
8591
|
+
"output_required": false,
|
8592
|
+
"type": "string",
|
8593
|
+
"value_allowed_null": true
|
8594
|
+
},
|
8595
|
+
{
|
8596
|
+
"disabled": false,
|
8597
|
+
"document": "标签\n注意:此字段可能返回 null,表示取不到有效值。",
|
8598
|
+
"example": "tag",
|
8599
|
+
"member": "string",
|
8600
|
+
"name": "AclTags",
|
8601
|
+
"output_required": false,
|
8602
|
+
"type": "string",
|
8603
|
+
"value_allowed_null": true
|
8604
|
+
},
|
8605
|
+
{
|
8606
|
+
"disabled": false,
|
8607
|
+
"document": "是否最新一次改动的规则,0否,1是\n注意:此字段可能返回 null,表示取不到有效值。",
|
8608
|
+
"example": "1",
|
8609
|
+
"member": "int64",
|
8610
|
+
"name": "IsNew",
|
8611
|
+
"output_required": false,
|
8612
|
+
"type": "int",
|
8613
|
+
"value_allowed_null": true
|
8614
|
+
},
|
8615
|
+
{
|
8616
|
+
"disabled": false,
|
8617
|
+
"document": "地域\n注意:此字段可能返回 null,表示取不到有效值。",
|
8618
|
+
"example": "ap-guangzhou",
|
8619
|
+
"member": "string",
|
8620
|
+
"name": "Region",
|
8621
|
+
"output_required": false,
|
8622
|
+
"type": "string",
|
8623
|
+
"value_allowed_null": true
|
8624
|
+
},
|
8625
|
+
{
|
8626
|
+
"disabled": false,
|
8627
|
+
"document": "是否延迟下发\n注意:此字段可能返回 null,表示取不到有效值。",
|
8628
|
+
"example": "0",
|
8629
|
+
"member": "int64",
|
8630
|
+
"name": "IsDelay",
|
8631
|
+
"output_required": false,
|
8632
|
+
"type": "int",
|
8633
|
+
"value_allowed_null": true
|
8634
|
+
},
|
8635
|
+
{
|
8636
|
+
"disabled": false,
|
8637
|
+
"document": "服务模版id\n注意:此字段可能返回 null,表示取不到有效值。",
|
8638
|
+
"example": "tpm-xxxx",
|
8639
|
+
"member": "string",
|
8640
|
+
"name": "ServiceTemplateId",
|
8641
|
+
"output_required": false,
|
8642
|
+
"type": "string",
|
8643
|
+
"value_allowed_null": true
|
8644
|
+
},
|
8645
|
+
{
|
8646
|
+
"disabled": false,
|
8647
|
+
"document": "源资产名称\n注意:此字段可能返回 null,表示取不到有效值。",
|
8648
|
+
"example": "ins-xxx",
|
8649
|
+
"member": "string",
|
8650
|
+
"name": "SouInstanceName",
|
8651
|
+
"output_required": false,
|
8652
|
+
"type": "string",
|
8653
|
+
"value_allowed_null": true
|
8654
|
+
},
|
8655
|
+
{
|
8656
|
+
"disabled": false,
|
8657
|
+
"document": "源资产公网ip\n注意:此字段可能返回 null,表示取不到有效值。",
|
8658
|
+
"example": "1.1.1.1",
|
8659
|
+
"member": "string",
|
8660
|
+
"name": "SouPublicIp",
|
8661
|
+
"output_required": false,
|
8662
|
+
"type": "string",
|
8663
|
+
"value_allowed_null": true
|
8664
|
+
},
|
8665
|
+
{
|
8666
|
+
"disabled": false,
|
8667
|
+
"document": "源资产内网ip\n注意:此字段可能返回 null,表示取不到有效值。",
|
8668
|
+
"example": "1.1.1.1",
|
8669
|
+
"member": "string",
|
8670
|
+
"name": "SouPrivateIp",
|
8671
|
+
"output_required": false,
|
8672
|
+
"type": "string",
|
8673
|
+
"value_allowed_null": true
|
8674
|
+
},
|
8675
|
+
{
|
8676
|
+
"disabled": false,
|
8677
|
+
"document": "源资产网段信息\n注意:此字段可能返回 null,表示取不到有效值。",
|
8678
|
+
"example": "10.0.0.0/32",
|
8679
|
+
"member": "string",
|
8680
|
+
"name": "SouCidr",
|
8681
|
+
"output_required": false,
|
8682
|
+
"type": "string",
|
8683
|
+
"value_allowed_null": true
|
8684
|
+
},
|
8685
|
+
{
|
8686
|
+
"disabled": false,
|
8687
|
+
"document": "源模版名称\n注意:此字段可能返回 null,表示取不到有效值。",
|
8688
|
+
"example": "test",
|
8689
|
+
"member": "string",
|
8690
|
+
"name": "SouParameterName",
|
8691
|
+
"output_required": false,
|
8692
|
+
"type": "string",
|
8693
|
+
"value_allowed_null": true
|
8694
|
+
},
|
8695
|
+
{
|
8696
|
+
"disabled": false,
|
8697
|
+
"document": "目的资产名称\n注意:此字段可能返回 null,表示取不到有效值。",
|
8698
|
+
"example": "ins-xxx",
|
8699
|
+
"member": "string",
|
8700
|
+
"name": "InstanceName",
|
8701
|
+
"output_required": false,
|
8702
|
+
"type": "string",
|
8703
|
+
"value_allowed_null": true
|
8704
|
+
},
|
8705
|
+
{
|
8706
|
+
"disabled": false,
|
8707
|
+
"document": "目的资产公网ip\n注意:此字段可能返回 null,表示取不到有效值。",
|
8708
|
+
"example": "1.1.1.1",
|
8709
|
+
"member": "string",
|
8710
|
+
"name": "PublicIp",
|
8711
|
+
"output_required": false,
|
8712
|
+
"type": "string",
|
8713
|
+
"value_allowed_null": true
|
8714
|
+
},
|
8715
|
+
{
|
8716
|
+
"disabled": false,
|
8717
|
+
"document": "目的资产内网ip\n注意:此字段可能返回 null,表示取不到有效值。",
|
8718
|
+
"example": "1.1.1.1",
|
8719
|
+
"member": "string",
|
8720
|
+
"name": "PrivateIp",
|
8721
|
+
"output_required": false,
|
8722
|
+
"type": "string",
|
8723
|
+
"value_allowed_null": true
|
8724
|
+
},
|
8725
|
+
{
|
8726
|
+
"disabled": false,
|
8727
|
+
"document": "目的资产网段信息\n注意:此字段可能返回 null,表示取不到有效值。",
|
8728
|
+
"example": "10.0.0.0/32",
|
8729
|
+
"member": "string",
|
8730
|
+
"name": "Cidr",
|
8731
|
+
"output_required": false,
|
8732
|
+
"type": "string",
|
8733
|
+
"value_allowed_null": true
|
8734
|
+
},
|
8735
|
+
{
|
8736
|
+
"disabled": false,
|
8737
|
+
"document": "目的模版名称\n注意:此字段可能返回 null,表示取不到有效值。",
|
8738
|
+
"example": "test",
|
8739
|
+
"member": "string",
|
8740
|
+
"name": "ParameterName",
|
8741
|
+
"output_required": false,
|
8742
|
+
"type": "string",
|
8743
|
+
"value_allowed_null": true
|
8744
|
+
},
|
8745
|
+
{
|
8746
|
+
"disabled": false,
|
8747
|
+
"document": "端口模版名称\n注意:此字段可能返回 null,表示取不到有效值。",
|
8748
|
+
"example": "test",
|
8749
|
+
"member": "string",
|
8750
|
+
"name": "ProtocolPortName",
|
8751
|
+
"output_required": false,
|
8752
|
+
"type": "string",
|
8753
|
+
"value_allowed_null": true
|
8754
|
+
},
|
8755
|
+
{
|
8756
|
+
"disabled": false,
|
8757
|
+
"document": "自动化任务任务信息\n注意:此字段可能返回 null,表示取不到有效值。",
|
8758
|
+
"example": "[{}]",
|
8759
|
+
"member": "EnterpriseSecurityGroupRuleBetaInfo",
|
8760
|
+
"name": "BetaList",
|
8761
|
+
"output_required": false,
|
8762
|
+
"type": "list",
|
8763
|
+
"value_allowed_null": true
|
8764
|
+
},
|
8765
|
+
{
|
8766
|
+
"disabled": false,
|
8767
|
+
"document": "规则id\n注意:此字段可能返回 null,表示取不到有效值。",
|
8768
|
+
"example": "无",
|
8769
|
+
"member": "int64",
|
8770
|
+
"name": "Id",
|
8771
|
+
"output_required": false,
|
8772
|
+
"type": "int",
|
8773
|
+
"value_allowed_null": true
|
8774
|
+
}
|
8775
|
+
],
|
8776
|
+
"usage": "out"
|
8777
|
+
},
|
8305
8778
|
"ExpandCfwVerticalRequest": {
|
8306
8779
|
"document": "ExpandCfwVertical请求参数结构体",
|
8307
8780
|
"members": [
|
@@ -354,6 +354,14 @@
|
|
354
354
|
"title": "查询新企业安全组规则"
|
355
355
|
}
|
356
356
|
],
|
357
|
+
"DescribeEnterpriseSecurityGroupRuleList": [
|
358
|
+
{
|
359
|
+
"document": "示例1",
|
360
|
+
"input": "POST / HTTP/1.1\nHost: cfw.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeEnterpriseSecurityGroupRuleList\n<公共请求参数>\n\n{\n \"Limit\": 1,\n \"Offset\": 0,\n \"SearchFilters\": [\n {\n \"Name\": \"common\",\n \"Values\": [\n \"模板\"\n ],\n \"OperatorType\": 9\n }\n ]\n}",
|
361
|
+
"output": "{\n \"Response\": {\n \"AllTotal\": 30,\n \"Data\": [\n {\n \"AclTags\": \"云防火墙封禁IP自动下发,请勿删除或修改\",\n \"BetaList\": [],\n \"Cidr\": \"\",\n \"Detail\": \"云防火墙封禁IP自动下发,请勿删除或修改\",\n \"InstanceName\": \"\",\n \"IsDelay\": 0,\n \"IsNew\": 1,\n \"OrderIndex\": 1,\n \"ParameterName\": \"\",\n \"Port\": \"-1/-1\",\n \"PrivateIp\": \"\",\n \"Protocol\": \"ANY\",\n \"ProtocolPortName\": \"\",\n \"PublicIp\": \"\",\n \"Region\": \"AllRegion\",\n \"RuleUuid\": 61257,\n \"ServiceTemplateId\": \"\",\n \"SouCidr\": \"\",\n \"SouInstanceName\": \"\",\n \"SouParameterName\": \"云防火墙拦截列表IP地址组IN,请勿删除\",\n \"SouPrivateIp\": \"\",\n \"SouPublicIp\": \"\",\n \"SourceId\": \"ipmg-17hphuxg\",\n \"SourceType\": 7,\n \"Status\": 1,\n \"Strategy\": 1,\n \"TargetId\": \"cfwrg-b803523898534bcbd9b7d2c7d92c175e1712804418\",\n \"TargetType\": 100,\n \"Uuid\": \"cfw_newsg_1300448058_0.0.0.0/0_17228848067531\"\n }\n ],\n \"Enable\": 2,\n \"RequestId\": \"d835bbe0-99e8-4cb7-a29a-3dfe2eff7d14\",\n \"Total\": 28\n }\n}",
|
362
|
+
"title": "示例1"
|
363
|
+
}
|
364
|
+
],
|
357
365
|
"DescribeFwEdgeIps": [
|
358
366
|
{
|
359
367
|
"document": "串行防火墙开关列表",
|
@@ -3709,6 +3709,58 @@ def doDescribeTopicAttributes(args, parsed_globals):
|
|
3709
3709
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3710
3710
|
|
3711
3711
|
|
3712
|
+
def doFetchMessageListByTimestamp(args, parsed_globals):
|
3713
|
+
g_param = parse_global_arg(parsed_globals)
|
3714
|
+
|
3715
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
3716
|
+
cred = credential.CVMRoleCredential()
|
3717
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
3718
|
+
cred = credential.STSAssumeRoleCredential(
|
3719
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
3720
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
3721
|
+
)
|
3722
|
+
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):
|
3723
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
3724
|
+
else:
|
3725
|
+
cred = credential.Credential(
|
3726
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
3727
|
+
)
|
3728
|
+
http_profile = HttpProfile(
|
3729
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
3730
|
+
reqMethod="POST",
|
3731
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
3732
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
3733
|
+
)
|
3734
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
3735
|
+
if g_param[OptionsDefine.Language]:
|
3736
|
+
profile.language = g_param[OptionsDefine.Language]
|
3737
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
3738
|
+
client = mod.CkafkaClient(cred, g_param[OptionsDefine.Region], profile)
|
3739
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3740
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3741
|
+
model = models.FetchMessageListByTimestampRequest()
|
3742
|
+
model.from_json_string(json.dumps(args))
|
3743
|
+
start_time = time.time()
|
3744
|
+
while True:
|
3745
|
+
rsp = client.FetchMessageListByTimestamp(model)
|
3746
|
+
result = rsp.to_json_string()
|
3747
|
+
try:
|
3748
|
+
json_obj = json.loads(result)
|
3749
|
+
except TypeError as e:
|
3750
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
3751
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
3752
|
+
break
|
3753
|
+
cur_time = time.time()
|
3754
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
3755
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
3756
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
3757
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
3758
|
+
else:
|
3759
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
3760
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
3761
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3762
|
+
|
3763
|
+
|
3712
3764
|
def doAuthorizeToken(args, parsed_globals):
|
3713
3765
|
g_param = parse_global_arg(parsed_globals)
|
3714
3766
|
|
@@ -4467,6 +4519,7 @@ ACTION_MAP = {
|
|
4467
4519
|
"DeleteUser": doDeleteUser,
|
4468
4520
|
"DescribeTopicSyncReplica": doDescribeTopicSyncReplica,
|
4469
4521
|
"DescribeTopicAttributes": doDescribeTopicAttributes,
|
4522
|
+
"FetchMessageListByTimestamp": doFetchMessageListByTimestamp,
|
4470
4523
|
"AuthorizeToken": doAuthorizeToken,
|
4471
4524
|
"DescribeTopicProduceConnection": doDescribeTopicProduceConnection,
|
4472
4525
|
"CreatePostPaidInstance": doCreatePostPaidInstance,
|