tccli 3.0.1340.1__py2.py3-none-any.whl → 3.0.1342.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 (68) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/plugins/sso/__init__.py +14 -0
  3. tccli/plugins/sso/login.py +23 -6
  4. tccli/plugins/sso/texts.py +4 -0
  5. tccli/services/__init__.py +3 -0
  6. tccli/services/ams/v20201229/api.json +195 -185
  7. tccli/services/apm/v20210622/api.json +10 -0
  8. tccli/services/bh/bh_client.py +326 -8
  9. tccli/services/bh/v20230418/api.json +537 -0
  10. tccli/services/bh/v20230418/examples.json +48 -0
  11. tccli/services/ccc/v20200210/api.json +1 -1
  12. tccli/services/cdb/v20170320/api.json +159 -159
  13. tccli/services/cdb/v20170320/examples.json +21 -21
  14. tccli/services/cdn/v20180606/examples.json +1 -1
  15. tccli/services/ctem/__init__.py +4 -0
  16. tccli/services/ctem/ctem_client.py +1479 -0
  17. tccli/services/ctem/v20231128/api.json +6138 -0
  18. tccli/services/ctem/v20231128/examples.json +205 -0
  19. tccli/services/cwp/v20180228/api.json +106 -2
  20. tccli/services/cwp/v20180228/examples.json +12 -0
  21. tccli/services/cynosdb/v20190107/api.json +29 -2
  22. tccli/services/cynosdb/v20190107/examples.json +1 -1
  23. tccli/services/dlc/v20210125/api.json +15 -6
  24. tccli/services/dsgc/v20190723/api.json +215 -17
  25. tccli/services/emr/v20190103/api.json +93 -0
  26. tccli/services/ess/v20201111/api.json +14 -3
  27. tccli/services/hunyuan/v20230901/api.json +10 -1
  28. tccli/services/ims/v20200713/api.json +1 -1
  29. tccli/services/ims/v20200713/examples.json +1 -1
  30. tccli/services/ims/v20201229/api.json +30 -30
  31. tccli/services/iotexplorer/v20190423/api.json +2 -2
  32. tccli/services/iotexplorer/v20190423/examples.json +1 -1
  33. tccli/services/iotvideo/v20201215/api.json +2 -2
  34. tccli/services/iotvideo/v20201215/examples.json +1 -1
  35. tccli/services/iotvideo/v20211125/api.json +1 -1
  36. tccli/services/iotvideo/v20211125/examples.json +1 -1
  37. tccli/services/kms/kms_client.py +915 -120
  38. tccli/services/kms/v20190118/api.json +1104 -27
  39. tccli/services/kms/v20190118/examples.json +126 -0
  40. tccli/services/lke/lke_client.py +228 -16
  41. tccli/services/lke/v20231130/api.json +1513 -219
  42. tccli/services/lke/v20231130/examples.json +33 -1
  43. tccli/services/mongodb/v20190725/api.json +10 -0
  44. tccli/services/mps/v20190612/api.json +113 -25
  45. tccli/services/mqtt/mqtt_client.py +53 -0
  46. tccli/services/mqtt/v20240516/api.json +150 -0
  47. tccli/services/mqtt/v20240516/examples.json +8 -0
  48. tccli/services/redis/v20180412/api.json +3 -3
  49. tccli/services/redis/v20180412/examples.json +19 -1
  50. tccli/services/ses/v20201002/api.json +8 -8
  51. tccli/services/tcss/v20201101/api.json +10 -0
  52. tccli/services/thpc/v20230321/api.json +32 -2
  53. tccli/services/tione/v20211111/api.json +11 -0
  54. tccli/services/tke/v20180525/api.json +10 -0
  55. tccli/services/trocket/trocket_client.py +53 -0
  56. tccli/services/trocket/v20230308/api.json +294 -204
  57. tccli/services/trocket/v20230308/examples.json +18 -10
  58. tccli/services/vm/v20210922/api.json +363 -333
  59. tccli/services/vpc/v20170312/api.json +9 -0
  60. tccli/services/waf/v20180125/api.json +59 -21
  61. tccli/services/wedata/v20210820/api.json +560 -10
  62. tccli/services/wedata/v20210820/examples.json +25 -1
  63. tccli/services/wedata/wedata_client.py +167 -8
  64. {tccli-3.0.1340.1.dist-info → tccli-3.0.1342.1.dist-info}/METADATA +2 -2
  65. {tccli-3.0.1340.1.dist-info → tccli-3.0.1342.1.dist-info}/RECORD +68 -64
  66. {tccli-3.0.1340.1.dist-info → tccli-3.0.1342.1.dist-info}/WHEEL +0 -0
  67. {tccli-3.0.1340.1.dist-info → tccli-3.0.1342.1.dist-info}/entry_points.txt +0 -0
  68. {tccli-3.0.1340.1.dist-info → tccli-3.0.1342.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1340.1'
1
+ __version__ = '3.0.1342.1'
@@ -45,6 +45,20 @@ _spec = {
45
45
  "required": False,
46
46
  "document": "duration for credential",
47
47
  },
48
+ {
49
+ "name": "uin",
50
+ "member": "string",
51
+ "type": "string",
52
+ "required": False,
53
+ "document": "Account uin to use",
54
+ },
55
+ {
56
+ "name": "rolename",
57
+ "member": "string",
58
+ "type": "string",
59
+ "required": False,
60
+ "document": "Role to use",
61
+ },
48
62
  ],
49
63
  },
50
64
  "loginResponse": {"members": []},
@@ -65,9 +65,17 @@ def login(args, profile, language):
65
65
  print_message(_("no_account"))
66
66
  return
67
67
 
68
- idx = terminal.select_from_items(
69
- _("account_select_prompt"), ["%s:%s" % (x["Name"], x["Uin"]) for x in accounts], 10)
70
- account = accounts[idx]
68
+ specified_uin = args.get("uin", "")
69
+ if specified_uin:
70
+ account = next((x for x in accounts if str(x["Uin"]) == specified_uin), None)
71
+ if not account:
72
+ print_message(_("specified_uin_not_found") % (specified_uin, ",".join(str(x["Uin"]) for x in accounts)))
73
+ return
74
+ else:
75
+ idx = terminal.select_from_items(
76
+ _("account_select_prompt"), ["%s:%s" % (x["Name"], x["Uin"]) for x in accounts], 10)
77
+ account = accounts[idx]
78
+
71
79
  print_message("uin: %s" % account["Uin"])
72
80
  print_message("username: %s" % account["Name"])
73
81
 
@@ -76,9 +84,18 @@ def login(args, profile, language):
76
84
  print_message(_("no_role"))
77
85
  return
78
86
 
79
- idx = terminal.select_from_items(
80
- _("role_select_prompt"), [x["RoleConfigurationName"] for x in roles], 10)
81
- role = roles[idx]
87
+ specified_role = args.get("rolename", "")
88
+ if specified_role:
89
+ role = next((x for x in roles if x["RoleConfigurationName"] == specified_role), None)
90
+ if not role:
91
+ print_message(
92
+ _("specified_role_not_found") % (specified_role, ",".join(x["RoleConfigurationName"] for x in roles)))
93
+ return
94
+ else:
95
+ idx = terminal.select_from_items(
96
+ _("role_select_prompt"), [x["RoleConfigurationName"] for x in roles], 10)
97
+ role = roles[idx]
98
+
82
99
  print_message("role: %s" % role["RoleConfigurationName"])
83
100
 
84
101
  saml_resp = sso.gen_saml_response(
@@ -15,6 +15,8 @@ texts = {
15
15
  "logout_success": "登出成功, 密钥凭证已被删除: %s",
16
16
  "no_account": "未找到成员账号, 请确认是否同步过 CAM 角色",
17
17
  "no_role": "当前成员账号不存在授权角色",
18
+ "specified_uin_not_found": "未找到指定的 uin,uin=%s,all=[%s]",
19
+ "specified_role_not_found": "未找到指定的 role, role=%s, all=[%s]",
18
20
  },
19
21
  "en-US": {
20
22
  "invalid_auth_url": "The entered url is invalid: %s",
@@ -27,6 +29,8 @@ texts = {
27
29
  "logout_success": "Logout succeed, credential has been removed: %s",
28
30
  "no_account": "no account found, please confirm the account is synchronized",
29
31
  "no_role": "no role found in current account",
32
+ "specified_uin_not_found": "Specified uin not found, uin=%s, all=[%s]",
33
+ "specified_role_not_found": "Specified role not found, role=%s, all=[%s]",
30
34
  }
31
35
  }
32
36
 
@@ -245,6 +245,9 @@ SERVICE_VERSIONS = {
245
245
  "csxg": [
246
246
  "2023-03-03"
247
247
  ],
248
+ "ctem": [
249
+ "2023-11-28"
250
+ ],
248
251
  "cvm": [
249
252
  "2017-03-12"
250
253
  ],