tccli 3.0.1004.1__py2.py3-none-any.whl → 3.0.1005.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 (102) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/examples/cvm/v20170312/CreateLaunchTemplate.md +1 -1
  3. tccli/examples/cvm/v20170312/RenewInstances.md +2 -2
  4. tccli/examples/cvm/v20170312/ResetInstancesPassword.md +1 -1
  5. tccli/examples/cvm/v20170312/StopInstances.md +1 -1
  6. tccli/examples/cwp/v20180228/DescribeMachineInfo.md +20 -20
  7. tccli/examples/cynosdb/v20190107/CreateClusterDatabase.md +9 -9
  8. tccli/examples/cynosdb/v20190107/DescribeClusterParams.md +18 -28
  9. tccli/examples/cynosdb/v20190107/DescribeClusters.md +70 -77
  10. tccli/examples/cynosdb/v20190107/DescribeZones.md +27 -29
  11. tccli/examples/cynosdb/v20190107/ModifyAccountHost.md +5 -5
  12. tccli/examples/cynosdb/v20190107/ModifyProxyDesc.md +4 -4
  13. tccli/examples/cynosdb/v20190107/ReloadBalanceProxyNode.md +5 -5
  14. tccli/examples/essbasic/v20210526/OperateChannelTemplate.md +22 -22
  15. tccli/examples/hai/v20230812/DescribeApplications.md +2 -1
  16. tccli/examples/sqlserver/v20180328/BalanceReadOnlyGroup.md +21 -0
  17. tccli/examples/sqlserver/v20180328/DeleteRestoreTask.md +21 -0
  18. tccli/examples/sqlserver/v20180328/DescribeAccountPrivilegeByDB.md +31 -0
  19. tccli/examples/sqlserver/v20180328/DescribeCollationTimeZone.md +24 -0
  20. tccli/examples/sqlserver/v20180328/DescribeCrossRegions.md +27 -0
  21. tccli/examples/sqlserver/v20180328/DescribeDBPrivilegeByAccount.md +46 -0
  22. tccli/examples/sqlserver/v20180328/DescribeDBRestoreTime.md +31 -0
  23. tccli/examples/sqlserver/v20180328/DescribeDatabaseNames.md +27 -0
  24. tccli/examples/sqlserver/v20180328/DescribeInquiryPriceParameter.md +30 -0
  25. tccli/examples/sqlserver/v20180328/DescribeInstanceTasks.md +36 -0
  26. tccli/examples/sqlserver/v20180328/DescribeInstanceTradeParameter.md +37 -0
  27. tccli/examples/sqlserver/v20180328/DescribeProductSpec.md +81 -0
  28. tccli/examples/sqlserver/v20180328/DescribeReadOnlyGroupAutoWeight.md +60 -0
  29. tccli/examples/sqlserver/v20180328/DescribeRestoreTask.md +46 -0
  30. tccli/examples/sqlserver/v20180328/DescribeSpecSellStatus.md +124 -0
  31. tccli/examples/sqlserver/v20180328/DescribeUpgradeInstanceCheck.md +71 -0
  32. tccli/examples/sqlserver/v20180328/ModifyCloseWanIp.md +21 -0
  33. tccli/examples/sqlserver/v20180328/ModifyDBInstanceNote.md +21 -0
  34. tccli/examples/sqlserver/v20180328/ModifyOpenWanIp.md +21 -0
  35. tccli/examples/sqlserver/v20180328/ModifyPublishSubscribe.md +51 -0
  36. tccli/examples/tbaas/v20180416/DescribeFabricBlock.md +37 -0
  37. tccli/examples/tbaas/v20180416/DescribeFabricTransaction.md +33 -0
  38. tccli/examples/tbaas/v20180416/InvokeFabricChaincode.md +28 -0
  39. tccli/examples/tbaas/v20180416/QueryFabricChaincode.md +27 -0
  40. tccli/examples/tcss/v20201101/AddEditImageAutoAuthorizedRule.md +1 -1
  41. tccli/examples/tcss/v20201101/CreateAssetImageScanSetting.md +4 -4
  42. tccli/examples/tcss/v20201101/DescribeAssetImageDetail.md +28 -27
  43. tccli/examples/tcss/v20201101/DescribeImageAutoAuthorizedRule.md +2 -2
  44. tccli/examples/tcss/v20201101/RenewImageAuthorizeState.md +2 -2
  45. tccli/examples/tke/v20180525/DescribeClusterEndpoints.md +1 -0
  46. tccli/examples/tke/v20180525/DescribeClusterExtraArgs.md +31 -0
  47. tccli/examples/tke/v20180525/DescribeExternalNodeSupportConfig.md +81 -0
  48. tccli/examples/tke/v20180525/DescribeIPAMD.md +26 -0
  49. tccli/examples/trocket/v20230308/ImportSourceClusterConsumerGroups.md +23 -0
  50. tccli/examples/trocket/v20230308/ImportSourceClusterTopics.md +25 -0
  51. tccli/examples/wedata/v20210820/DescribeApproveList.md +43 -161
  52. tccli/examples/wedata/v20210820/DescribeApproveTypeList.md +64 -0
  53. tccli/services/__init__.py +1 -5
  54. tccli/services/billing/v20180709/api.json +10 -10
  55. tccli/services/cdb/v20170320/api.json +10 -1
  56. tccli/services/cloudstudio/cloudstudio_client.py +30 -1042
  57. tccli/services/cvm/v20170312/api.json +68 -68
  58. tccli/services/cvm/v20170312/examples.json +4 -4
  59. tccli/services/cwp/v20180228/api.json +20 -0
  60. tccli/services/cwp/v20180228/examples.json +1 -1
  61. tccli/services/cynosdb/v20190107/api.json +10 -11
  62. tccli/services/cynosdb/v20190107/examples.json +14 -14
  63. tccli/services/dsgc/v20190723/api.json +48 -41
  64. tccli/services/ess/v20201111/api.json +9 -9
  65. tccli/services/essbasic/v20210526/api.json +10 -10
  66. tccli/services/essbasic/v20210526/examples.json +6 -6
  67. tccli/services/hai/v20230812/api.json +69 -69
  68. tccli/services/hai/v20230812/examples.json +1 -1
  69. tccli/services/sqlserver/sqlserver_client.py +1418 -358
  70. tccli/services/sqlserver/v20180328/api.json +2426 -172
  71. tccli/services/sqlserver/v20180328/examples.json +166 -0
  72. tccli/services/tbaas/tbaas_client.py +273 -61
  73. tccli/services/tbaas/v20180416/api.json +539 -0
  74. tccli/services/tbaas/v20180416/examples.json +32 -0
  75. tccli/services/tchd/v20230306/api.json +1 -1
  76. tccli/services/tcss/v20201101/api.json +443 -87
  77. tccli/services/tcss/v20201101/examples.json +7 -7
  78. tccli/services/tdmq/v20200217/api.json +9 -9
  79. tccli/services/tke/tke_client.py +159 -0
  80. tccli/services/tke/v20180525/api.json +375 -0
  81. tccli/services/tke/v20180525/examples.json +25 -1
  82. tccli/services/trocket/trocket_client.py +171 -65
  83. tccli/services/trocket/v20230308/api.json +230 -0
  84. tccli/services/trocket/v20230308/examples.json +16 -0
  85. tccli/services/tse/v20201207/api.json +57 -35
  86. tccli/services/vrs/v20200824/api.json +10 -0
  87. tccli/services/waf/v20180125/api.json +201 -54
  88. tccli/services/wedata/v20210820/api.json +144 -14
  89. tccli/services/wedata/v20210820/examples.json +16 -2
  90. tccli/services/wedata/wedata_client.py +53 -0
  91. tccli/services/weilingwith/v20230427/api.json +13 -13
  92. {tccli-3.0.1004.1.dist-info → tccli-3.0.1005.1.dist-info}/METADATA +2 -2
  93. {tccli-3.0.1004.1.dist-info → tccli-3.0.1005.1.dist-info}/RECORD +96 -72
  94. tccli/services/casb/__init__.py +0 -4
  95. tccli/services/casb/casb_client.py +0 -194
  96. tccli/services/casb/v20200507/api.json +0 -110
  97. tccli/services/casb/v20200507/examples.json +0 -19
  98. tccli/services/cloudstudio/v20210524/api.json +0 -2604
  99. tccli/services/cloudstudio/v20210524/examples.json +0 -205
  100. {tccli-3.0.1004.1.dist-info → tccli-3.0.1005.1.dist-info}/WHEEL +0 -0
  101. {tccli-3.0.1004.1.dist-info → tccli-3.0.1005.1.dist-info}/entry_points.txt +0 -0
  102. {tccli-3.0.1004.1.dist-info → tccli-3.0.1005.1.dist-info}/license_files/LICENSE +0 -0
@@ -1,194 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- import os
3
- import sys
4
- import six
5
- import json
6
- import tccli.options_define as OptionsDefine
7
- import tccli.format_output as FormatOutput
8
- from tccli import __version__
9
- from tccli.utils import Utils
10
- from tccli.exceptions import ConfigurationError, ClientError, ParamError
11
- from tencentcloud.common import credential
12
- from tencentcloud.common.profile.http_profile import HttpProfile
13
- from tencentcloud.common.profile.client_profile import ClientProfile
14
- from tencentcloud.casb.v20200507 import casb_client as casb_client_v20200507
15
- from tencentcloud.casb.v20200507 import models as models_v20200507
16
-
17
- from jmespath import search
18
- import time
19
-
20
- def doCopyCryptoColumnPolicy(args, parsed_globals):
21
- g_param = parse_global_arg(parsed_globals)
22
-
23
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
24
- cred = credential.CVMRoleCredential()
25
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
26
- cred = credential.STSAssumeRoleCredential(
27
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
28
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')]
29
- )
30
- 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):
31
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
32
- else:
33
- cred = credential.Credential(
34
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
35
- )
36
- http_profile = HttpProfile(
37
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
38
- reqMethod="POST",
39
- endpoint=g_param[OptionsDefine.Endpoint],
40
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
41
- )
42
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
43
- if g_param[OptionsDefine.Language]:
44
- profile.language = g_param[OptionsDefine.Language]
45
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
46
- client = mod.CasbClient(cred, g_param[OptionsDefine.Region], profile)
47
- client._sdkVersion += ("_CLI_" + __version__)
48
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
49
- model = models.CopyCryptoColumnPolicyRequest()
50
- model.from_json_string(json.dumps(args))
51
- start_time = time.time()
52
- while True:
53
- rsp = client.CopyCryptoColumnPolicy(model)
54
- result = rsp.to_json_string()
55
- try:
56
- json_obj = json.loads(result)
57
- except TypeError as e:
58
- json_obj = json.loads(result.decode('utf-8')) # python3.3
59
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
60
- break
61
- cur_time = time.time()
62
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
63
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
64
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
65
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
66
- else:
67
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
68
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
69
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
70
-
71
-
72
- CLIENT_MAP = {
73
- "v20200507": casb_client_v20200507,
74
-
75
- }
76
-
77
- MODELS_MAP = {
78
- "v20200507": models_v20200507,
79
-
80
- }
81
-
82
- ACTION_MAP = {
83
- "CopyCryptoColumnPolicy": doCopyCryptoColumnPolicy,
84
-
85
- }
86
-
87
- AVAILABLE_VERSION_LIST = [
88
- "v20200507",
89
-
90
- ]
91
-
92
-
93
- def action_caller():
94
- return ACTION_MAP
95
-
96
-
97
- def parse_global_arg(parsed_globals):
98
- g_param = parsed_globals
99
-
100
- is_exist_profile = True
101
- if not parsed_globals["profile"]:
102
- is_exist_profile = False
103
- g_param["profile"] = os.environ.get("TCCLI_PROFILE", "default")
104
-
105
- configure_path = os.path.join(os.path.expanduser("~"), ".tccli")
106
- is_conf_exist, conf_path = Utils.file_existed(configure_path, g_param["profile"] + ".configure")
107
- is_cred_exist, cred_path = Utils.file_existed(configure_path, g_param["profile"] + ".credential")
108
-
109
- conf = {}
110
- cred = {}
111
-
112
- if is_conf_exist:
113
- conf = Utils.load_json_msg(conf_path)
114
- if is_cred_exist:
115
- cred = Utils.load_json_msg(cred_path)
116
-
117
- if not (isinstance(conf, dict) and isinstance(cred, dict)):
118
- raise ConfigurationError(
119
- "file: %s or %s is not json format"
120
- % (g_param["profile"] + ".configure", g_param["profile"] + ".credential"))
121
-
122
- if OptionsDefine.Token not in cred:
123
- cred[OptionsDefine.Token] = None
124
-
125
- if not is_exist_profile:
126
- if os.environ.get(OptionsDefine.ENV_SECRET_ID) and os.environ.get(OptionsDefine.ENV_SECRET_KEY):
127
- cred[OptionsDefine.SecretId] = os.environ.get(OptionsDefine.ENV_SECRET_ID)
128
- cred[OptionsDefine.SecretKey] = os.environ.get(OptionsDefine.ENV_SECRET_KEY)
129
- cred[OptionsDefine.Token] = os.environ.get(OptionsDefine.ENV_TOKEN)
130
-
131
- if os.environ.get(OptionsDefine.ENV_REGION):
132
- conf[OptionsDefine.SysParam][OptionsDefine.Region] = os.environ.get(OptionsDefine.ENV_REGION)
133
-
134
- if os.environ.get(OptionsDefine.ENV_ROLE_ARN) and os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME):
135
- cred[OptionsDefine.RoleArn] = os.environ.get(OptionsDefine.ENV_ROLE_ARN)
136
- cred[OptionsDefine.RoleSessionName] = os.environ.get(OptionsDefine.ENV_ROLE_SESSION_NAME)
137
-
138
- for param in g_param.keys():
139
- if g_param[param] is None:
140
- if param in [OptionsDefine.SecretKey, OptionsDefine.SecretId, OptionsDefine.Token]:
141
- if param in cred:
142
- g_param[param] = cred[param]
143
- elif not (g_param[OptionsDefine.UseCVMRole.replace('-', '_')]
144
- or os.getenv(OptionsDefine.ENV_TKE_ROLE_ARN)):
145
- raise ConfigurationError("%s is invalid" % param)
146
- elif param in [OptionsDefine.Region, OptionsDefine.Output, OptionsDefine.Language]:
147
- if param in conf[OptionsDefine.SysParam]:
148
- g_param[param] = conf[OptionsDefine.SysParam][param]
149
- elif param != OptionsDefine.Language:
150
- raise ConfigurationError("%s is invalid" % param)
151
- elif param.replace('_', '-') in [OptionsDefine.RoleArn, OptionsDefine.RoleSessionName]:
152
- if param.replace('_', '-') in cred:
153
- g_param[param] = cred[param.replace('_', '-')]
154
-
155
- try:
156
- if g_param[OptionsDefine.ServiceVersion]:
157
- g_param[OptionsDefine.Version] = "v" + g_param[OptionsDefine.ServiceVersion].replace('-', '')
158
- else:
159
- version = conf["casb"][OptionsDefine.Version]
160
- g_param[OptionsDefine.Version] = "v" + version.replace('-', '')
161
-
162
- if g_param[OptionsDefine.Endpoint] is None:
163
- g_param[OptionsDefine.Endpoint] = conf["casb"][OptionsDefine.Endpoint]
164
- except Exception as err:
165
- raise ConfigurationError("config file:%s error, %s" % (conf_path, str(err)))
166
-
167
- if g_param[OptionsDefine.Version] not in AVAILABLE_VERSION_LIST:
168
- raise Exception("available versions: %s" % " ".join(AVAILABLE_VERSION_LIST))
169
-
170
- if g_param[OptionsDefine.Waiter]:
171
- param = eval(g_param[OptionsDefine.Waiter])
172
- if 'expr' not in param:
173
- raise Exception('`expr` in `--waiter` must be defined')
174
- if 'to' not in param:
175
- raise Exception('`to` in `--waiter` must be defined')
176
- if 'timeout' not in param:
177
- if 'waiter' in conf and 'timeout' in conf['waiter']:
178
- param['timeout'] = conf['waiter']['timeout']
179
- else:
180
- param['timeout'] = 180
181
- if 'interval' not in param:
182
- if 'waiter' in conf and 'interval' in conf['waiter']:
183
- param['interval'] = conf['waiter']['interval']
184
- else:
185
- param['interval'] = 5
186
- param['interval'] = min(param['interval'], param['timeout'])
187
- g_param['OptionsDefine.WaiterInfo'] = param
188
-
189
- if six.PY2:
190
- for key, value in g_param.items():
191
- if isinstance(value, six.text_type):
192
- g_param[key] = value.encode('utf-8')
193
- return g_param
194
-
@@ -1,110 +0,0 @@
1
- {
2
- "actions": {
3
- "CopyCryptoColumnPolicy": {
4
- "document": "同region下 根据用户输入的CasbId,MetaDataId 复制策略到DstCasbId,MetaDataId中。\n场景1:\n相同CasbId,不同MetadataId 下策略复制\n场景2:\n不同Casbid,不同MetaDataId 下策略复制\n场景3:\n相同CasbId,相同MetaDataId 且 DatabaseName不同 策略复制\n",
5
- "input": "CopyCryptoColumnPolicyRequest",
6
- "name": "复制字段策略",
7
- "output": "CopyCryptoColumnPolicyResponse",
8
- "status": "online"
9
- }
10
- },
11
- "metadata": {
12
- "apiVersion": "2020-05-07",
13
- "api_brief": "",
14
- "serviceNameCN": "云访问安全代理",
15
- "serviceShortName": "casb"
16
- },
17
- "objects": {
18
- "CopyCryptoColumnPolicyRequest": {
19
- "document": "CopyCryptoColumnPolicy请求参数结构体",
20
- "members": [
21
- {
22
- "document": "实例Id",
23
- "example": "casb-00000000",
24
- "member": "string",
25
- "name": "CasbId",
26
- "required": true,
27
- "type": "string"
28
- },
29
- {
30
- "document": "元数据id",
31
- "example": "meta-00000000",
32
- "member": "string",
33
- "name": "MetaDataId",
34
- "required": true,
35
- "type": "string"
36
- },
37
- {
38
- "document": "目标实例Id 如果和实例Id相同则为同CasbId下的策略复制",
39
- "example": "casb-11111111",
40
- "member": "string",
41
- "name": "DstCasbId",
42
- "required": true,
43
- "type": "string"
44
- },
45
- {
46
- "document": "目标实例Id 如果和[元数据id]相同则为同元数据下的策略复制",
47
- "example": "meta-00000000",
48
- "member": "string",
49
- "name": "DstMetaDataId",
50
- "required": true,
51
- "type": "string"
52
- },
53
- {
54
- "document": "筛选来源数据库的表",
55
- "example": "无",
56
- "member": "CryptoCopyColumnPolicyTableFilter",
57
- "name": "SrcTableFilter",
58
- "required": false,
59
- "type": "list"
60
- },
61
- {
62
- "document": "复制同元数据下的策略,需要填写目标数据库名",
63
- "example": "db-01",
64
- "member": "string",
65
- "name": "DstDatabaseName",
66
- "required": false,
67
- "type": "string"
68
- }
69
- ],
70
- "type": "object"
71
- },
72
- "CopyCryptoColumnPolicyResponse": {
73
- "document": "CopyCryptoColumnPolicy返回参数结构体",
74
- "members": [
75
- {
76
- "document": "唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。",
77
- "member": "string",
78
- "name": "RequestId",
79
- "type": "string"
80
- }
81
- ],
82
- "type": "object"
83
- },
84
- "CryptoCopyColumnPolicyTableFilter": {
85
- "document": "策略迁移表信息筛选",
86
- "members": [
87
- {
88
- "document": "数据库名称",
89
- "example": "db01",
90
- "member": "string",
91
- "name": "DatabaseName",
92
- "required": true,
93
- "type": "string",
94
- "value_allowed_null": false
95
- },
96
- {
97
- "document": "表名称",
98
- "example": "无",
99
- "member": "string",
100
- "name": "TableNameSet",
101
- "required": false,
102
- "type": "list",
103
- "value_allowed_null": false
104
- }
105
- ],
106
- "usage": "in"
107
- }
108
- },
109
- "version": "1.0"
110
- }
@@ -1,19 +0,0 @@
1
- {
2
- "actions": {
3
- "CopyCryptoColumnPolicy": [
4
- {
5
- "document": "",
6
- "input": "POST / HTTP/1.1\nHost: casb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CopyCryptoColumnPolicy\n<公共请求参数>\n\n{\n \"CasbId\": \"casb-1\",\n \"MetaDataId\": \"meta-1\",\n \"DstCasbId\": \"casb-1\",\n \"DstMetaDataId\": \"meta-2\"\n}",
7
- "output": "{\n \"Response\": {\n \"RequestId\": \"1f7310c2-5459-460f-a56d-2e7d501c8313\"\n }\n}",
8
- "title": "CopyCryptoColumnPolicy"
9
- },
10
- {
11
- "document": "",
12
- "input": "POST / HTTP/1.1\nHost: casb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: CopyCryptoColumnPolicy\n<公共请求参数>\n\n{\n \"DstDatabaseName\": \"casbtest0\",\n \"CasbId\": \"casb-mln08msg\",\n \"DstMetaDataId\": \"metadata-ea1lr450\",\n \"MetaDataId\": \"metadata-ea1lr450\",\n \"SrcTableFilter\": [\n {\n \"TableNameSet\": [\n \"beian_subject\"\n ],\n \"DatabaseName\": \"casb\"\n }\n ],\n \"DstCasbId\": \"casb-mln08msg\"\n}",
13
- "output": "{\n \"Response\": {\n \"RequestId\": \"b6474d57-6002-4c7a-a0a3-16fc83b6a309\"\n }\n}",
14
- "title": "复制同一数据库实例不同DB的表策略"
15
- }
16
- ]
17
- },
18
- "version": "1.0"
19
- }