tccli 3.0.1286.1__py2.py3-none-any.whl → 3.0.1288.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.
Files changed (59) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/autoscaling/autoscaling_client.py +53 -0
  3. tccli/services/autoscaling/v20180419/api.json +53 -0
  4. tccli/services/autoscaling/v20180419/examples.json +8 -0
  5. tccli/services/billing/v20180709/api.json +254 -254
  6. tccli/services/captcha/v20190722/api.json +79 -77
  7. tccli/services/cdc/v20201214/api.json +123 -113
  8. tccli/services/cdwch/v20200915/api.json +70 -2
  9. tccli/services/cdwch/v20200915/examples.json +2 -2
  10. tccli/services/cdz/v20221123/api.json +10 -10
  11. tccli/services/cfs/v20190719/api.json +1 -1
  12. tccli/services/cvm/cvm_client.py +53 -0
  13. tccli/services/cvm/v20170312/api.json +110 -5
  14. tccli/services/cvm/v20170312/examples.json +8 -0
  15. tccli/services/cwp/v20180228/api.json +63 -15
  16. tccli/services/cynosdb/v20190107/api.json +298 -298
  17. tccli/services/dbbrain/v20210527/api.json +11 -2
  18. tccli/services/domain/v20180808/api.json +49 -29
  19. tccli/services/ess/v20201111/api.json +25 -1
  20. tccli/services/essbasic/v20210526/api.json +27 -3
  21. tccli/services/hunyuan/hunyuan_client.py +53 -0
  22. tccli/services/hunyuan/v20230901/api.json +329 -12
  23. tccli/services/hunyuan/v20230901/examples.json +8 -0
  24. tccli/services/lcic/v20220817/api.json +2 -2
  25. tccli/services/lighthouse/v20200324/api.json +47 -47
  26. tccli/services/lke/v20231130/api.json +10 -10
  27. tccli/services/lke/v20231130/examples.json +1 -1
  28. tccli/services/mariadb/v20170312/api.json +30 -30
  29. tccli/services/mongodb/v20190725/api.json +3 -3
  30. tccli/services/ocr/v20181119/api.json +36 -0
  31. tccli/services/redis/v20180412/api.json +4 -4
  32. tccli/services/ses/v20201002/api.json +1 -1
  33. tccli/services/ssl/v20191205/api.json +317 -317
  34. tccli/services/ssl/v20191205/examples.json +6 -6
  35. tccli/services/tat/v20201028/api.json +7 -7
  36. tccli/services/tat/v20201028/examples.json +1 -1
  37. tccli/services/tcb/v20180608/api.json +232 -231
  38. tccli/services/tcb/v20180608/examples.json +1 -7
  39. tccli/services/tchd/tchd_client.py +53 -0
  40. tccli/services/tchd/v20230306/api.json +89 -0
  41. tccli/services/tchd/v20230306/examples.json +8 -0
  42. tccli/services/tdmq/v20200217/api.json +232 -222
  43. tccli/services/teo/v20220901/api.json +129 -7
  44. tccli/services/trocket/trocket_client.py +53 -0
  45. tccli/services/trocket/v20230308/api.json +61 -0
  46. tccli/services/trocket/v20230308/examples.json +8 -0
  47. tccli/services/trro/trro_client.py +53 -0
  48. tccli/services/trro/v20220325/api.json +70 -0
  49. tccli/services/trro/v20220325/examples.json +8 -0
  50. tccli/services/waf/v20180125/api.json +225 -0
  51. tccli/services/waf/v20180125/examples.json +24 -0
  52. tccli/services/waf/waf_client.py +159 -0
  53. tccli/services/wedata/v20210820/api.json +124 -204
  54. tccli/services/wedata/v20210820/examples.json +7 -1
  55. {tccli-3.0.1286.1.dist-info → tccli-3.0.1288.1.dist-info}/METADATA +2 -2
  56. {tccli-3.0.1286.1.dist-info → tccli-3.0.1288.1.dist-info}/RECORD +59 -59
  57. {tccli-3.0.1286.1.dist-info → tccli-3.0.1288.1.dist-info}/WHEEL +0 -0
  58. {tccli-3.0.1286.1.dist-info → tccli-3.0.1288.1.dist-info}/entry_points.txt +0 -0
  59. {tccli-3.0.1286.1.dist-info → tccli-3.0.1288.1.dist-info}/license_files/LICENSE +0 -0
@@ -176,7 +176,7 @@
176
176
  "status": "online"
177
177
  },
178
178
  "CreateRule": {
179
- "document": "本接口为旧版,EdgeOne 已对规则引擎相关接口全面升级,详情请参考 [CreateL7AccRules](https://cloud.tencent.com/document/product/1552/115822)",
179
+ "document": "本接口为旧版本创建规则引擎接口,EdgeOne 2025 年 1 月 21 日已对规则引擎相关接口全面升级,新版本创建七层加速规则接口详情请参考 [CreateL7AccRules](https://cloud.tencent.com/document/product/1552/115822)。\n<p style=\"color: red;\">注意:自 2025 年 1 月 21 日起,旧版接口停止更新迭代,后续新增功能将仅在新版接口中提供,旧版接口支持的原有能力将不受影响。为避免在使用旧版接口时出现数据字段冲突,建议您尽早迁移到新版规则引擎接口。</p>",
180
180
  "input": "CreateRuleRequest",
181
181
  "name": "创建规则引擎规则(旧)",
182
182
  "output": "CreateRuleResponse",
@@ -309,7 +309,7 @@
309
309
  "status": "online"
310
310
  },
311
311
  "DeleteRules": {
312
- "document": "本接口为旧版,EdgeOne 已对规则引擎相关接口全面升级,详情请参考 [DeleteL7AccRules](https://cloud.tencent.com/document/product/1552/115821)",
312
+ "document": "本接口为旧版本删除规则引擎接口,EdgeOne 2025 年 1 月 21 日已对规则引擎相关接口全面升级,新版本删除七层加速规则接口详情请参考 [DeleteL7AccRules](https://cloud.tencent.com/document/product/1552/115821)。\n<p style=\"color: red;\">注意:自 2025 年 1 月 21 日起,旧版接口停止更新迭代,后续新增功能将仅在新版接口中提供,旧版接口支持的原有能力将不受影响。为避免在使用旧版接口时出现数据字段冲突,建议您尽早迁移到新版规则引擎接口。</p>",
313
313
  "input": "DeleteRulesRequest",
314
314
  "name": "批量删除规则引擎规则(旧)",
315
315
  "output": "DeleteRulesResponse",
@@ -589,7 +589,7 @@
589
589
  "status": "online"
590
590
  },
591
591
  "DescribeRules": {
592
- "document": "本接口为旧版,EdgeOne 已对规则引擎相关接口全面升级,详情请参考 [DescribeL7AccRules](https://cloud.tencent.com/document/product/1552/115820)",
592
+ "document": "本接口为旧版本查询规则引擎规则接口,EdgeOne 2025 年 1 月 21 日已对规则引擎相关接口全面升级,新版本查询七层加速规则接口详情请参考 [DescribeL7AccRules](https://cloud.tencent.com/document/product/1552/115820)。\n<p style=\"color: red;\">注意:自 2025 年 1 月 21 日起,旧版接口停止更新迭代,后续新增功能将仅在新版接口中提供,旧版接口支持的原有能力将不受影响。为避免在使用旧版接口时出现数据字段冲突,建议您尽早迁移到新版规则引擎接口。</p>",
593
593
  "input": "DescribeRulesRequest",
594
594
  "name": "查询规则引擎规则(旧)",
595
595
  "output": "DescribeRulesResponse",
@@ -918,7 +918,7 @@
918
918
  "status": "online"
919
919
  },
920
920
  "ModifyRule": {
921
- "document": "本接口为旧版,EdgeOne 已对规则引擎相关接口全面升级,详情请参考 [ModifyL7AccRule](https://cloud.tencent.com/document/product/1552/115818)",
921
+ "document": "本接口为旧版本修改规则引擎接口,EdgeOne 2025 年 1 月 21 日已对规则引擎相关接口全面升级,新版本修改七层加速规则接口详情请参考 [ModifyL7AccRule](https://cloud.tencent.com/document/product/1552/115818)。\n<p style=\"color: red;\">注意:自 2025 年 1 月 21 日起,旧版接口停止更新迭代,后续新增功能将仅在新版接口中提供,旧版接口支持的原有能力将不受影响。为避免在使用旧版接口时出现数据字段冲突,建议您尽早迁移到新版规则引擎接口。</p>",
922
922
  "input": "ModifyRuleRequest",
923
923
  "name": "修改规则引擎规则(旧)",
924
924
  "output": "ModifyRuleResponse",
@@ -5863,7 +5863,7 @@
5863
5863
  {
5864
5864
  "disabled": false,
5865
5865
  "document": "规则标签。",
5866
- "example": "test",
5866
+ "example": "[\"Cache Key Configuration\"]",
5867
5867
  "member": "string",
5868
5868
  "name": "Tags",
5869
5869
  "required": false,
@@ -11343,6 +11343,112 @@
11343
11343
  ],
11344
11344
  "usage": "out"
11345
11345
  },
11346
+ "DetectLengthLimitCondition": {
11347
+ "document": "检测长度限制配置条件。",
11348
+ "members": [
11349
+ {
11350
+ "disabled": false,
11351
+ "document": "匹配条件的参数名称,取值有:\n<li>body_depth:请求正文包部分的检测深度。</li>",
11352
+ "example": "无",
11353
+ "member": "string",
11354
+ "name": "Name",
11355
+ "output_required": false,
11356
+ "required": true,
11357
+ "type": "string",
11358
+ "value_allowed_null": false
11359
+ },
11360
+ {
11361
+ "disabled": false,
11362
+ "document": "匹配条件的参数值,取值与 Name 成对使用。\n当 Name 值为 body_depth 时, Values 只支持传入单个值,取值有:\n<li>8KB;</li>\n<li>64KB;</li>\n<li>128KB。</li>",
11363
+ "example": "无",
11364
+ "member": "string",
11365
+ "name": "Values",
11366
+ "output_required": false,
11367
+ "required": true,
11368
+ "type": "list",
11369
+ "value_allowed_null": false
11370
+ }
11371
+ ],
11372
+ "usage": "both"
11373
+ },
11374
+ "DetectLengthLimitConfig": {
11375
+ "document": "检测长度限制",
11376
+ "members": [
11377
+ {
11378
+ "disabled": false,
11379
+ "document": "检测长度限制的规则列表。",
11380
+ "example": "无",
11381
+ "member": "DetectLengthLimitRule",
11382
+ "name": "DetectLengthLimitRules",
11383
+ "output_required": false,
11384
+ "required": true,
11385
+ "type": "list",
11386
+ "value_allowed_null": false
11387
+ }
11388
+ ],
11389
+ "usage": "both"
11390
+ },
11391
+ "DetectLengthLimitRule": {
11392
+ "document": "检测长度限制规则详情",
11393
+ "members": [
11394
+ {
11395
+ "disabled": false,
11396
+ "document": "规则Id。仅出参使用。",
11397
+ "example": "无",
11398
+ "member": "uint64",
11399
+ "name": "RuleId",
11400
+ "output_required": false,
11401
+ "required": true,
11402
+ "type": "int",
11403
+ "value_allowed_null": false
11404
+ },
11405
+ {
11406
+ "disabled": false,
11407
+ "document": "规则名称。仅出参使用。",
11408
+ "example": "无",
11409
+ "member": "string",
11410
+ "name": "RuleName",
11411
+ "output_required": false,
11412
+ "required": true,
11413
+ "type": "string",
11414
+ "value_allowed_null": false
11415
+ },
11416
+ {
11417
+ "disabled": false,
11418
+ "document": "规则描述,仅出参使用。",
11419
+ "example": "无",
11420
+ "member": "string",
11421
+ "name": "Description",
11422
+ "output_required": false,
11423
+ "required": true,
11424
+ "type": "string",
11425
+ "value_allowed_null": false
11426
+ },
11427
+ {
11428
+ "disabled": false,
11429
+ "document": "规则配置条件。仅出参使用。",
11430
+ "example": "无",
11431
+ "member": "DetectLengthLimitCondition",
11432
+ "name": "Conditions",
11433
+ "output_required": false,
11434
+ "required": true,
11435
+ "type": "list",
11436
+ "value_allowed_null": false
11437
+ },
11438
+ {
11439
+ "disabled": false,
11440
+ "document": "处置方式,取值有:\n<li>skip:当请求正文数据超过 Conditions 出参中 body_depth 设置的检测深度时,跳过所有请求正文内容的检测;</li>\n<li>scan:仅检测 Conditions 出参中 body_depth 设置的检测深度,对超出部分的请求正文内容直接截断处理,超出部分的请求正文不会经过安全检测。</li>仅出参使用。",
11441
+ "example": "无",
11442
+ "member": "string",
11443
+ "name": "Action",
11444
+ "output_required": false,
11445
+ "required": true,
11446
+ "type": "string",
11447
+ "value_allowed_null": false
11448
+ }
11449
+ ],
11450
+ "usage": "both"
11451
+ },
11346
11452
  "DiffIPWhitelist": {
11347
11453
  "document": "最新IP白名单列表相比于当前IP白名单列表的区别",
11348
11454
  "members": [
@@ -16357,7 +16463,7 @@
16357
16463
  {
16358
16464
  "disabled": false,
16359
16465
  "document": "规则标签。",
16360
- "example": "test",
16466
+ "example": "[\"Cache Key Configuration\"]",
16361
16467
  "member": "string",
16362
16468
  "name": "Tags",
16363
16469
  "required": false,
@@ -20193,7 +20299,7 @@
20193
20299
  "usage": "out"
20194
20300
  },
20195
20301
  "SecurityConfig": {
20196
- "document": "安全配置",
20302
+ "document": "Web安全配置",
20197
20303
  "members": [
20198
20304
  {
20199
20305
  "disabled": false,
@@ -20304,6 +20410,17 @@
20304
20410
  "required": false,
20305
20411
  "type": "object",
20306
20412
  "value_allowed_null": true
20413
+ },
20414
+ {
20415
+ "disabled": false,
20416
+ "document": "检测长度限制配置。仅出参使用。\n注意:此字段可能返回 null,表示取不到有效值。",
20417
+ "example": "无",
20418
+ "member": "DetectLengthLimitConfig",
20419
+ "name": "DetectLengthLimitConfig",
20420
+ "output_required": true,
20421
+ "required": false,
20422
+ "type": "object",
20423
+ "value_allowed_null": true
20307
20424
  }
20308
20425
  ],
20309
20426
  "usage": "both"
@@ -21735,6 +21852,7 @@
21735
21852
  "example": "off",
21736
21853
  "member": "string",
21737
21854
  "name": "Switch",
21855
+ "output_required": true,
21738
21856
  "required": true,
21739
21857
  "type": "string",
21740
21858
  "value_allowed_null": false
@@ -21745,6 +21863,7 @@
21745
21863
  "example": "strict",
21746
21864
  "member": "string",
21747
21865
  "name": "Level",
21866
+ "output_required": true,
21748
21867
  "required": true,
21749
21868
  "type": "string",
21750
21869
  "value_allowed_null": false
@@ -21755,6 +21874,7 @@
21755
21874
  "example": "block",
21756
21875
  "member": "string",
21757
21876
  "name": "Mode",
21877
+ "output_required": true,
21758
21878
  "required": true,
21759
21879
  "type": "string",
21760
21880
  "value_allowed_null": false
@@ -21765,6 +21885,7 @@
21765
21885
  "example": "无",
21766
21886
  "member": "WafRule",
21767
21887
  "name": "WafRule",
21888
+ "output_required": true,
21768
21889
  "required": false,
21769
21890
  "type": "object",
21770
21891
  "value_allowed_null": false
@@ -21775,6 +21896,7 @@
21775
21896
  "example": "无",
21776
21897
  "member": "AiRule",
21777
21898
  "name": "AiRule",
21899
+ "output_required": true,
21778
21900
  "required": false,
21779
21901
  "type": "object",
21780
21902
  "value_allowed_null": false
@@ -1681,6 +1681,58 @@ def doCreateInstance(args, parsed_globals):
1681
1681
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1682
1682
 
1683
1683
 
1684
+ def doResetConsumerGroupOffset(args, parsed_globals):
1685
+ g_param = parse_global_arg(parsed_globals)
1686
+
1687
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1688
+ cred = credential.CVMRoleCredential()
1689
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1690
+ cred = credential.STSAssumeRoleCredential(
1691
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1692
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1693
+ )
1694
+ 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):
1695
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1696
+ else:
1697
+ cred = credential.Credential(
1698
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1699
+ )
1700
+ http_profile = HttpProfile(
1701
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1702
+ reqMethod="POST",
1703
+ endpoint=g_param[OptionsDefine.Endpoint],
1704
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1705
+ )
1706
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1707
+ if g_param[OptionsDefine.Language]:
1708
+ profile.language = g_param[OptionsDefine.Language]
1709
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1710
+ client = mod.TrocketClient(cred, g_param[OptionsDefine.Region], profile)
1711
+ client._sdkVersion += ("_CLI_" + __version__)
1712
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1713
+ model = models.ResetConsumerGroupOffsetRequest()
1714
+ model.from_json_string(json.dumps(args))
1715
+ start_time = time.time()
1716
+ while True:
1717
+ rsp = client.ResetConsumerGroupOffset(model)
1718
+ result = rsp.to_json_string()
1719
+ try:
1720
+ json_obj = json.loads(result)
1721
+ except TypeError as e:
1722
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1723
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1724
+ break
1725
+ cur_time = time.time()
1726
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1727
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1728
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1729
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1730
+ else:
1731
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1732
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1733
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1734
+
1735
+
1684
1736
  def doDescribeMQTTTopicList(args, parsed_globals):
1685
1737
  g_param = parse_global_arg(parsed_globals)
1686
1738
 
@@ -2972,6 +3024,7 @@ ACTION_MAP = {
2972
3024
  "DescribeConsumerGroup": doDescribeConsumerGroup,
2973
3025
  "CreateTopic": doCreateTopic,
2974
3026
  "CreateInstance": doCreateInstance,
3027
+ "ResetConsumerGroupOffset": doResetConsumerGroupOffset,
2975
3028
  "DescribeMQTTTopicList": doDescribeMQTTTopicList,
2976
3029
  "DescribeMQTTInstance": doDescribeMQTTInstance,
2977
3030
  "CreateMQTTTopic": doCreateMQTTTopic,
@@ -391,6 +391,13 @@
391
391
  "name": "重新发送死信消息",
392
392
  "output": "ResendDeadLetterMessageResponse",
393
393
  "status": "online"
394
+ },
395
+ "ResetConsumerGroupOffset": {
396
+ "document": "重置消费位点",
397
+ "input": "ResetConsumerGroupOffsetRequest",
398
+ "name": "重置消费位点",
399
+ "output": "ResetConsumerGroupOffsetResponse",
400
+ "status": "online"
394
401
  }
395
402
  },
396
403
  "metadata": {
@@ -6751,6 +6758,60 @@
6751
6758
  ],
6752
6759
  "type": "object"
6753
6760
  },
6761
+ "ResetConsumerGroupOffsetRequest": {
6762
+ "document": "ResetConsumerGroupOffset请求参数结构体",
6763
+ "members": [
6764
+ {
6765
+ "disabled": false,
6766
+ "document": "集群ID",
6767
+ "example": "rmq-72mo3a9o",
6768
+ "member": "string",
6769
+ "name": "InstanceId",
6770
+ "required": true,
6771
+ "type": "string"
6772
+ },
6773
+ {
6774
+ "disabled": false,
6775
+ "document": "主题名称",
6776
+ "example": "test_topic",
6777
+ "member": "string",
6778
+ "name": "Topic",
6779
+ "required": true,
6780
+ "type": "string"
6781
+ },
6782
+ {
6783
+ "disabled": false,
6784
+ "document": "重置位点时间(单位:毫秒)-1表示重置到最新位点",
6785
+ "example": "-1",
6786
+ "member": "int64",
6787
+ "name": "ResetTimestamp",
6788
+ "required": true,
6789
+ "type": "int"
6790
+ },
6791
+ {
6792
+ "disabled": false,
6793
+ "document": "消费组名称",
6794
+ "example": "test_group",
6795
+ "member": "string",
6796
+ "name": "ConsumerGroup",
6797
+ "required": false,
6798
+ "type": "string"
6799
+ }
6800
+ ],
6801
+ "type": "object"
6802
+ },
6803
+ "ResetConsumerGroupOffsetResponse": {
6804
+ "document": "ResetConsumerGroupOffset返回参数结构体",
6805
+ "members": [
6806
+ {
6807
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
6808
+ "member": "string",
6809
+ "name": "RequestId",
6810
+ "type": "string"
6811
+ }
6812
+ ],
6813
+ "type": "object"
6814
+ },
6754
6815
  "RoleItem": {
6755
6816
  "document": "角色信息",
6756
6817
  "members": [
@@ -453,6 +453,14 @@
453
453
  "output": "{\n \"Response\": {\n \"RequestId\": \"f4f1d3ba-3ed2-4e03-b741-9f6f696b9689\"\n }\n}",
454
454
  "title": "重发死信消息"
455
455
  }
456
+ ],
457
+ "ResetConsumerGroupOffset": [
458
+ {
459
+ "document": "",
460
+ "input": "POST / HTTP/1.1\nHost: trocket.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ResetConsumerGroupOffset\n<公共请求参数>\n\n{\n \"InstanceId\": \"rmq-72mo3a9o\",\n \"ConsumerGroup\": \"test_group\",\n \"Topic\": \"test_topic\",\n \"ResetTimestamp\": -1\n}",
461
+ "output": "{\n \"Response\": {\n \"RequestId\": \"707a78e5-019d-41f6-80fc-15743d99c81a\"\n }\n}",
462
+ "title": "重置消费位点"
463
+ }
456
464
  ]
457
465
  },
458
466
  "version": "1.0"
@@ -901,6 +901,58 @@ def doDescribeDeviceInfo(args, parsed_globals):
901
901
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
902
902
 
903
903
 
904
+ def doModifyProjectSecMode(args, parsed_globals):
905
+ g_param = parse_global_arg(parsed_globals)
906
+
907
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
908
+ cred = credential.CVMRoleCredential()
909
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
910
+ cred = credential.STSAssumeRoleCredential(
911
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
912
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
913
+ )
914
+ 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):
915
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
916
+ else:
917
+ cred = credential.Credential(
918
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
919
+ )
920
+ http_profile = HttpProfile(
921
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
922
+ reqMethod="POST",
923
+ endpoint=g_param[OptionsDefine.Endpoint],
924
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
925
+ )
926
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
927
+ if g_param[OptionsDefine.Language]:
928
+ profile.language = g_param[OptionsDefine.Language]
929
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
930
+ client = mod.TrroClient(cred, g_param[OptionsDefine.Region], profile)
931
+ client._sdkVersion += ("_CLI_" + __version__)
932
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
933
+ model = models.ModifyProjectSecModeRequest()
934
+ model.from_json_string(json.dumps(args))
935
+ start_time = time.time()
936
+ while True:
937
+ rsp = client.ModifyProjectSecMode(model)
938
+ result = rsp.to_json_string()
939
+ try:
940
+ json_obj = json.loads(result)
941
+ except TypeError as e:
942
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
943
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
944
+ break
945
+ cur_time = time.time()
946
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
947
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
948
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
949
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
950
+ else:
951
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
952
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
953
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
954
+
955
+
904
956
  def doDescribeDeviceSessionList(args, parsed_globals):
905
957
  g_param = parse_global_arg(parsed_globals)
906
958
 
@@ -1241,6 +1293,7 @@ ACTION_MAP = {
1241
1293
  "BatchDeleteDevices": doBatchDeleteDevices,
1242
1294
  "DescribeSessionStatistics": doDescribeSessionStatistics,
1243
1295
  "DescribeDeviceInfo": doDescribeDeviceInfo,
1296
+ "ModifyProjectSecMode": doModifyProjectSecMode,
1244
1297
  "DescribeDeviceSessionList": doDescribeDeviceSessionList,
1245
1298
  "CreateProject": doCreateProject,
1246
1299
  "DescribeRecentSessionList": doDescribeRecentSessionList,
@@ -160,6 +160,13 @@
160
160
  "name": "修改项目",
161
161
  "output": "ModifyProjectResponse",
162
162
  "status": "online"
163
+ },
164
+ "ModifyProjectSecMode": {
165
+ "document": "使用项目共享密钥可动态生成设备登录密钥,登录前无需对设备进行提前注册,适合希望简化业务流程的客户。由于是公共密钥,请务必注意保护项目共享密钥,并及时更新。建议项目共享密钥保存在服务器侧。由服务器生成设备登录密码下发给设备,避免密钥保存在客户端侧产生的密钥泄露风险。\n\n开启项目共享密钥后,对于已注册的设备,仍可使用原设备密码登录。若希望仅能通过共享密钥生成密码登录,请通过云 API 将设备密码更新为\"USEPROJECTKEYPWD\"。",
166
+ "input": "ModifyProjectSecModeRequest",
167
+ "name": "修改项目安全模式",
168
+ "output": "ModifyProjectSecModeResponse",
169
+ "status": "online"
163
170
  }
164
171
  },
165
172
  "metadata": {
@@ -2020,6 +2027,69 @@
2020
2027
  ],
2021
2028
  "type": "object"
2022
2029
  },
2030
+ "ModifyProjectSecModeRequest": {
2031
+ "document": "ModifyProjectSecMode请求参数结构体",
2032
+ "members": [
2033
+ {
2034
+ "disabled": false,
2035
+ "document": "项目ID",
2036
+ "example": "m82k540iwduvuuma",
2037
+ "member": "string",
2038
+ "name": "ProjectId",
2039
+ "required": true,
2040
+ "type": "string"
2041
+ },
2042
+ {
2043
+ "disabled": false,
2044
+ "document": "安全模式 \n0:关闭项目共享密钥 \n1:开启项目共享密钥",
2045
+ "example": "1",
2046
+ "member": "int64",
2047
+ "name": "Mode",
2048
+ "required": true,
2049
+ "type": "int"
2050
+ },
2051
+ {
2052
+ "disabled": false,
2053
+ "document": "项目密钥 32位 小写英文+数字; 项目密钥模式必填",
2054
+ "example": "123456789012345678901234567abcde",
2055
+ "member": "string",
2056
+ "name": "Key",
2057
+ "required": false,
2058
+ "type": "string"
2059
+ },
2060
+ {
2061
+ "disabled": false,
2062
+ "document": "自动注册方式\n0:关闭自动注册\n1:仅允许现场设备自动注册\n2:仅允许远端设备自动注册\n3:允许现场和远端设备均自动注册",
2063
+ "example": "1",
2064
+ "member": "int64",
2065
+ "name": "AutoRegister",
2066
+ "required": false,
2067
+ "type": "int"
2068
+ },
2069
+ {
2070
+ "disabled": false,
2071
+ "document": "是否允许远端获取现场设备列表(getGwList)\n0:不允许\n1:允许",
2072
+ "example": "1",
2073
+ "member": "int64",
2074
+ "name": "FieldListEnable",
2075
+ "required": false,
2076
+ "type": "int"
2077
+ }
2078
+ ],
2079
+ "type": "object"
2080
+ },
2081
+ "ModifyProjectSecModeResponse": {
2082
+ "document": "ModifyProjectSecMode返回参数结构体",
2083
+ "members": [
2084
+ {
2085
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
2086
+ "member": "string",
2087
+ "name": "RequestId",
2088
+ "type": "string"
2089
+ }
2090
+ ],
2091
+ "type": "object"
2092
+ },
2023
2093
  "MultiNet": {
2024
2094
  "document": "多网的网卡状态信息",
2025
2095
  "members": [
@@ -183,6 +183,14 @@
183
183
  "output": "{\n \"Response\": {\n \"RequestId\": \"3c140219-cfe9-470e-b241-907877d6fb03\"\n }\n}",
184
184
  "title": "修改项目接口示例"
185
185
  }
186
+ ],
187
+ "ModifyProjectSecMode": [
188
+ {
189
+ "document": "",
190
+ "input": "POST / HTTP/1.1\nHost: trro.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyProjectSecMode\n<公共请求参数>\n\n{\n \"ProjectId\": \"m82k540iwduvuuma\",\n \"Mode\": 1,\n \"Key\": \"123456789012345678901234567abcde\",\n \"AutoRegister\": 3,\n \"FieldListEnable\": 1\n}",
191
+ "output": "{\n \"Response\": {\n \"RequestId\": \"abcd\"\n }\n}",
192
+ "title": "修改项目授权模式"
193
+ }
186
194
  ]
187
195
  },
188
196
  "version": "1.0"