tccli 3.0.1190.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.
Files changed (61) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/command.py +7 -1
  3. tccli/configure.py +11 -3
  4. tccli/loaders.py +43 -8
  5. tccli/oauth.py +115 -0
  6. tccli/plugin.py +30 -0
  7. tccli/plugins/__init__.py +0 -0
  8. tccli/plugins/auth/__init__.py +59 -0
  9. tccli/plugins/auth/browser_flow.py +88 -0
  10. tccli/plugins/auth/login.py +130 -0
  11. tccli/plugins/auth/logout.py +21 -0
  12. tccli/plugins/auth/texts.py +30 -0
  13. tccli/plugins/test/__init__.py +87 -0
  14. tccli/plugins/test/add.py +31 -0
  15. tccli/services/apm/v20210622/api.json +19 -0
  16. tccli/services/cam/cam_client.py +138 -32
  17. tccli/services/cam/v20190116/api.json +203 -0
  18. tccli/services/cam/v20190116/examples.json +16 -0
  19. tccli/services/cdb/v20170320/api.json +13 -4
  20. tccli/services/cfw/cfw_client.py +53 -0
  21. tccli/services/cfw/v20190904/api.json +473 -0
  22. tccli/services/cfw/v20190904/examples.json +8 -0
  23. tccli/services/ckafka/ckafka_client.py +53 -0
  24. tccli/services/ckafka/v20190819/api.json +80 -0
  25. tccli/services/ckafka/v20190819/examples.json +8 -0
  26. tccli/services/cls/v20201016/examples.json +1 -1
  27. tccli/services/dasb/dasb_client.py +53 -0
  28. tccli/services/dasb/v20191018/api.json +168 -0
  29. tccli/services/dasb/v20191018/examples.json +8 -0
  30. tccli/services/dlc/v20210125/api.json +298 -45
  31. tccli/services/dlc/v20210125/examples.json +21 -21
  32. tccli/services/dsgc/v20190723/api.json +13 -3
  33. tccli/services/emr/v20190103/api.json +8 -8
  34. tccli/services/ess/v20201111/api.json +49 -16
  35. tccli/services/ess/v20201111/examples.json +7 -1
  36. tccli/services/essbasic/v20210526/api.json +28 -1
  37. tccli/services/essbasic/v20210526/examples.json +43 -1
  38. tccli/services/irp/v20220805/api.json +11 -2
  39. tccli/services/lke/v20231130/api.json +82 -4
  40. tccli/services/mps/v20190612/api.json +126 -5
  41. tccli/services/ocr/v20181119/api.json +10 -0
  42. tccli/services/ocr/v20181119/examples.json +1 -1
  43. tccli/services/omics/v20221128/api.json +13 -2
  44. tccli/services/region/v20220627/api.json +11 -11
  45. tccli/services/region/v20220627/examples.json +1 -1
  46. tccli/services/tat/v20201028/api.json +10 -0
  47. tccli/services/tcb/v20180608/api.json +2 -2
  48. tccli/services/tdmq/v20200217/api.json +2 -2
  49. tccli/services/tdmq/v20200217/examples.json +2 -2
  50. tccli/services/tmt/v20180321/api.json +2 -2
  51. tccli/services/vdb/v20230616/api.json +38 -1
  52. tccli/services/vdb/v20230616/examples.json +2 -2
  53. tccli/services/vod/v20180717/api.json +30 -9
  54. tccli/services/vod/v20180717/examples.json +1 -1
  55. tccli/services/vpc/v20170312/api.json +3 -3
  56. tccli/services/wedata/v20210820/api.json +1 -1
  57. {tccli-3.0.1190.1.dist-info → tccli-3.0.1192.1.dist-info}/METADATA +2 -2
  58. {tccli-3.0.1190.1.dist-info → tccli-3.0.1192.1.dist-info}/RECORD +61 -51
  59. {tccli-3.0.1190.1.dist-info → tccli-3.0.1192.1.dist-info}/WHEEL +0 -0
  60. {tccli-3.0.1190.1.dist-info → tccli-3.0.1192.1.dist-info}/entry_points.txt +0 -0
  61. {tccli-3.0.1190.1.dist-info → tccli-3.0.1192.1.dist-info}/license_files/LICENSE +0 -0
@@ -602,6 +602,14 @@
602
602
  "title": "根据offset查询消息"
603
603
  }
604
604
  ],
605
+ "FetchMessageListByTimestamp": [
606
+ {
607
+ "document": "",
608
+ "input": "https://ckafka.tencentcloudapi.com/?Action=FetchMessageListByTimestamp\n&InstanceId=xxx\n&Topic=xxx\n&Partition=1\n&StartTime=1577808000000\n&SinglePartitionRecordNumber=20\n&<公共请求参数>",
609
+ "output": "{\n \"Response\": {\n \"Result\": [\n {\n \"Topic\": \"abc\",\n \"Partition\": 0,\n \"Offset\": 0,\n \"Key\": \"abc\",\n \"Value\": \"abc\",\n \"Timestamp\": 0,\n \"Headers\": \"abc\"\n }\n ],\n \"RequestId\": \"abc\"\n }\n}",
610
+ "title": "消息查询"
611
+ }
612
+ ],
605
613
  "InquireCkafkaPrice": [
606
614
  {
607
615
  "document": " ",
@@ -356,7 +356,7 @@
356
356
  ],
357
357
  "DeleteTopic": [
358
358
  {
359
- "document": "",
359
+ "document": "删除日志主题",
360
360
  "input": "POST / HTTP/1.1\nHost: cls.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DeleteTopic\n<公共请求参数>\n\n{\n \"TopicId\": \"a5ce0c9c-0690-44a5-bc79-5f2190626bd0\"\n}",
361
361
  "output": "{\n \"Response\": {\n \"RequestId\": \"6ef60bec-0242-43af-bb20-270359fb54a7\"\n }\n}",
362
362
  "title": "删除日志主题"
@@ -589,6 +589,58 @@ def doDescribeUserGroups(args, parsed_globals):
589
589
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
590
590
 
591
591
 
592
+ def doDescribeDomains(args, parsed_globals):
593
+ g_param = parse_global_arg(parsed_globals)
594
+
595
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
596
+ cred = credential.CVMRoleCredential()
597
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
598
+ cred = credential.STSAssumeRoleCredential(
599
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
600
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
601
+ )
602
+ 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):
603
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
604
+ else:
605
+ cred = credential.Credential(
606
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
607
+ )
608
+ http_profile = HttpProfile(
609
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
610
+ reqMethod="POST",
611
+ endpoint=g_param[OptionsDefine.Endpoint],
612
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
613
+ )
614
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
615
+ if g_param[OptionsDefine.Language]:
616
+ profile.language = g_param[OptionsDefine.Language]
617
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
618
+ client = mod.DasbClient(cred, g_param[OptionsDefine.Region], profile)
619
+ client._sdkVersion += ("_CLI_" + __version__)
620
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
621
+ model = models.DescribeDomainsRequest()
622
+ model.from_json_string(json.dumps(args))
623
+ start_time = time.time()
624
+ while True:
625
+ rsp = client.DescribeDomains(model)
626
+ result = rsp.to_json_string()
627
+ try:
628
+ json_obj = json.loads(result)
629
+ except TypeError as e:
630
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
631
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
632
+ break
633
+ cur_time = time.time()
634
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
635
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
636
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
637
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
638
+ else:
639
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
640
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
641
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
642
+
643
+
592
644
  def doDeployResource(args, parsed_globals):
593
645
  g_param = parse_global_arg(parsed_globals)
594
646
 
@@ -3263,6 +3315,7 @@ ACTION_MAP = {
3263
3315
  "DeleteDevices": doDeleteDevices,
3264
3316
  "CreateChangePwdTask": doCreateChangePwdTask,
3265
3317
  "DescribeUserGroups": doDescribeUserGroups,
3318
+ "DescribeDomains": doDescribeDomains,
3266
3319
  "DeployResource": doDeployResource,
3267
3320
  "ModifyDevice": doModifyDevice,
3268
3321
  "BindDeviceResource": doBindDeviceResource,
@@ -245,6 +245,13 @@
245
245
  "output": "DescribeDevicesResponse",
246
246
  "status": "online"
247
247
  },
248
+ "DescribeDomains": {
249
+ "document": "查询网络域",
250
+ "input": "DescribeDomainsRequest",
251
+ "name": "查询网络域",
252
+ "output": "DescribeDomainsResponse",
253
+ "status": "online"
254
+ },
248
255
  "DescribeLoginEvent": {
249
256
  "document": "查询登录日志",
250
257
  "input": "DescribeLoginEventRequest",
@@ -3884,6 +3891,71 @@
3884
3891
  ],
3885
3892
  "type": "object"
3886
3893
  },
3894
+ "DescribeDomainsRequest": {
3895
+ "document": "DescribeDomains请求参数结构体",
3896
+ "members": [
3897
+ {
3898
+ "disabled": false,
3899
+ "document": "每页条目数量,默认20,最大500",
3900
+ "example": "10",
3901
+ "member": "uint64",
3902
+ "name": "Limit",
3903
+ "required": false,
3904
+ "type": "int"
3905
+ },
3906
+ {
3907
+ "disabled": false,
3908
+ "document": "过滤数组",
3909
+ "example": "无",
3910
+ "member": "Filter",
3911
+ "name": "Filters",
3912
+ "required": false,
3913
+ "type": "list"
3914
+ },
3915
+ {
3916
+ "disabled": false,
3917
+ "document": "分页偏移位置,默认值为0",
3918
+ "example": "0",
3919
+ "member": "uint64",
3920
+ "name": "Offset",
3921
+ "required": false,
3922
+ "type": "int"
3923
+ }
3924
+ ],
3925
+ "type": "object"
3926
+ },
3927
+ "DescribeDomainsResponse": {
3928
+ "document": "DescribeDomains返回参数结构体",
3929
+ "members": [
3930
+ {
3931
+ "disabled": false,
3932
+ "document": "网络域总数",
3933
+ "example": "1",
3934
+ "member": "uint64",
3935
+ "name": "TotalCount",
3936
+ "output_required": true,
3937
+ "type": "int",
3938
+ "value_allowed_null": false
3939
+ },
3940
+ {
3941
+ "disabled": false,
3942
+ "document": "网络域列表",
3943
+ "example": "[]",
3944
+ "member": "Domain",
3945
+ "name": "DomainSet",
3946
+ "output_required": true,
3947
+ "type": "list",
3948
+ "value_allowed_null": false
3949
+ },
3950
+ {
3951
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
3952
+ "member": "string",
3953
+ "name": "RequestId",
3954
+ "type": "string"
3955
+ }
3956
+ ],
3957
+ "type": "object"
3958
+ },
3887
3959
  "DescribeLoginEventRequest": {
3888
3960
  "document": "DescribeLoginEvent请求参数结构体",
3889
3961
  "members": [
@@ -4759,6 +4831,102 @@
4759
4831
  ],
4760
4832
  "usage": "out"
4761
4833
  },
4834
+ "Domain": {
4835
+ "document": "网络域",
4836
+ "members": [
4837
+ {
4838
+ "disabled": false,
4839
+ "document": "自增id",
4840
+ "example": "1",
4841
+ "member": "uint64",
4842
+ "name": "Id",
4843
+ "output_required": true,
4844
+ "type": "int",
4845
+ "value_allowed_null": false
4846
+ },
4847
+ {
4848
+ "disabled": false,
4849
+ "document": "网络域id",
4850
+ "example": "net-11111111",
4851
+ "member": "string",
4852
+ "name": "DomainId",
4853
+ "output_required": true,
4854
+ "type": "string",
4855
+ "value_allowed_null": false
4856
+ },
4857
+ {
4858
+ "disabled": false,
4859
+ "document": "网络域名称\n注意:此字段可能返回 null,表示取不到有效值。",
4860
+ "example": "腾讯云网络",
4861
+ "member": "string",
4862
+ "name": "DomainName",
4863
+ "output_required": true,
4864
+ "type": "string",
4865
+ "value_allowed_null": true
4866
+ },
4867
+ {
4868
+ "disabled": false,
4869
+ "document": "堡垒机id\n注意:此字段可能返回 null,表示取不到有效值。",
4870
+ "example": "bh-saas-xxxxxxxx",
4871
+ "member": "string",
4872
+ "name": "ResourceId",
4873
+ "output_required": false,
4874
+ "type": "string",
4875
+ "value_allowed_null": true
4876
+ },
4877
+ {
4878
+ "disabled": false,
4879
+ "document": "ip,网段\n注意:此字段可能返回 null,表示取不到有效值。",
4880
+ "example": "ip 192.168.0.1 网段 192.168.0.0/24",
4881
+ "member": "string",
4882
+ "name": "WhiteIpSet",
4883
+ "output_required": false,
4884
+ "type": "list",
4885
+ "value_allowed_null": true
4886
+ },
4887
+ {
4888
+ "disabled": false,
4889
+ "document": "是否启用 默认 1启用 0禁用\n注意:此字段可能返回 null,表示取不到有效值。",
4890
+ "example": "0",
4891
+ "member": "uint64",
4892
+ "name": "Enabled",
4893
+ "output_required": false,
4894
+ "type": "int",
4895
+ "value_allowed_null": true
4896
+ },
4897
+ {
4898
+ "disabled": false,
4899
+ "document": "状态 0-已断开 1-已连接\n注意:此字段可能返回 null,表示取不到有效值。",
4900
+ "example": "0",
4901
+ "member": "uint64",
4902
+ "name": "Status",
4903
+ "output_required": false,
4904
+ "type": "int",
4905
+ "value_allowed_null": true
4906
+ },
4907
+ {
4908
+ "disabled": false,
4909
+ "document": "网络域创建时间\n注意:此字段可能返回 null,表示取不到有效值。",
4910
+ "example": "2021-02-04T15:23:52+08:00",
4911
+ "member": "datetime_iso",
4912
+ "name": "CreateTime",
4913
+ "output_required": false,
4914
+ "type": "string",
4915
+ "value_allowed_null": true
4916
+ },
4917
+ {
4918
+ "disabled": false,
4919
+ "document": "是否资源默认网络域 1-资源默认网络域 0-用户添加网络域\n注意:此字段可能返回 null,表示取不到有效值。",
4920
+ "example": "0",
4921
+ "member": "uint64",
4922
+ "name": "Default",
4923
+ "output_required": false,
4924
+ "type": "int",
4925
+ "value_allowed_null": true
4926
+ }
4927
+ ],
4928
+ "usage": "out"
4929
+ },
4762
4930
  "ExternalDevice": {
4763
4931
  "document": "主机参数,导入外部主机时使用",
4764
4932
  "members": [
@@ -292,6 +292,14 @@
292
292
  "title": "根据用户查询有访问权限的资产"
293
293
  }
294
294
  ],
295
+ "DescribeDomains": [
296
+ {
297
+ "document": "",
298
+ "input": "POST / HTTP/1.1\nHost: dasb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeDomains\n<公共请求参数>\n\n\n\n\n\n\n\n{\n\n \"Offset\": 0,\n \"Limit\": 10,\n \"Filters\": [{\"Name\": \"Status\",\"Values\": [\"0\"]},{\"Name\": \"Ip\",\"Values\": [\"127.9.9.1\"]}]\n\n}",
299
+ "output": "{\n \"Response\": {\n \"DomainSet\": [\n {\n \"Id\": 7,\n \"DomainId\": \"net-vvr396q5\",\n \"DomainName\": \"test-name1-9990\",\n \"Enabled\": 1,\n \"Status\": 0,\n \"ResourceId\": \"bh-saas-jtvukub4\",\n \"CreateTime\": \"2024-04-19T11:11:55+08:00\",\n \"Default\": 0,\n \"WhiteIpSet\": [\n \"127.9.9.1\",\n \"171.0.0.1\"\n ]\n }\n ],\n \"RequestId\": \"sdfsadf-sdfasd-sdfsad-sdf2222\",\n \"TotalCount\": 1\n }\n}",
300
+ "title": "示例1"
301
+ }
302
+ ],
295
303
  "DescribeLoginEvent": [
296
304
  {
297
305
  "document": "",