tccli 3.0.1174.1__py2.py3-none-any.whl → 3.0.1176.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 (41) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/batch/v20170312/api.json +1 -1
  3. tccli/services/ccc/v20200210/api.json +9 -9
  4. tccli/services/cdwdoris/cdwdoris_client.py +144 -144
  5. tccli/services/cdwdoris/v20211228/api.json +816 -1196
  6. tccli/services/cdwdoris/v20211228/examples.json +70 -70
  7. tccli/services/clb/v20180317/api.json +1 -1
  8. tccli/services/cvm/v20170312/api.json +1 -1
  9. tccli/services/cynosdb/cynosdb_client.py +114 -8
  10. tccli/services/cynosdb/v20190107/api.json +136 -0
  11. tccli/services/cynosdb/v20190107/examples.json +16 -0
  12. tccli/services/dbbrain/v20210527/api.json +116 -1
  13. tccli/services/dbbrain/v20210527/examples.json +1 -1
  14. tccli/services/eb/v20210416/api.json +1 -0
  15. tccli/services/ecm/v20190719/api.json +8 -6
  16. tccli/services/emr/v20190103/api.json +9 -0
  17. tccli/services/ess/v20201111/api.json +10 -0
  18. tccli/services/faceid/v20180301/api.json +20 -2
  19. tccli/services/faceid/v20180301/examples.json +7 -1
  20. tccli/services/hunyuan/v20230901/api.json +2 -2
  21. tccli/services/ims/v20201229/api.json +2 -2
  22. tccli/services/lke/v20231130/api.json +9 -0
  23. tccli/services/mps/v20190612/api.json +49 -29
  24. tccli/services/sqlserver/sqlserver_client.py +53 -0
  25. tccli/services/sqlserver/v20180328/api.json +108 -9
  26. tccli/services/sqlserver/v20180328/examples.json +8 -0
  27. tccli/services/tiia/tiia_client.py +4 -57
  28. tccli/services/tiia/v20190529/api.json +0 -296
  29. tccli/services/tiia/v20190529/examples.json +0 -8
  30. tccli/services/trtc/trtc_client.py +53 -0
  31. tccli/services/trtc/v20190722/api.json +62 -0
  32. tccli/services/trtc/v20190722/examples.json +8 -0
  33. tccli/services/vod/v20180717/api.json +403 -5
  34. tccli/services/vod/v20180717/examples.json +31 -1
  35. tccli/services/vod/vod_client.py +171 -12
  36. tccli/services/vpc/v20170312/api.json +10 -1
  37. {tccli-3.0.1174.1.dist-info → tccli-3.0.1176.1.dist-info}/METADATA +2 -2
  38. {tccli-3.0.1174.1.dist-info → tccli-3.0.1176.1.dist-info}/RECORD +41 -41
  39. {tccli-3.0.1174.1.dist-info → tccli-3.0.1176.1.dist-info}/WHEEL +0 -0
  40. {tccli-3.0.1174.1.dist-info → tccli-3.0.1176.1.dist-info}/entry_points.txt +0 -0
  41. {tccli-3.0.1174.1.dist-info → tccli-3.0.1176.1.dist-info}/license_files/LICENSE +0 -0
@@ -3033,6 +3033,58 @@ def doDescribeInstanceParams(args, parsed_globals):
3033
3033
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3034
3034
 
3035
3035
 
3036
+ def doModifyDatabasePrivilege(args, parsed_globals):
3037
+ g_param = parse_global_arg(parsed_globals)
3038
+
3039
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3040
+ cred = credential.CVMRoleCredential()
3041
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3042
+ cred = credential.STSAssumeRoleCredential(
3043
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3044
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3045
+ )
3046
+ 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):
3047
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3048
+ else:
3049
+ cred = credential.Credential(
3050
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3051
+ )
3052
+ http_profile = HttpProfile(
3053
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3054
+ reqMethod="POST",
3055
+ endpoint=g_param[OptionsDefine.Endpoint],
3056
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3057
+ )
3058
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3059
+ if g_param[OptionsDefine.Language]:
3060
+ profile.language = g_param[OptionsDefine.Language]
3061
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3062
+ client = mod.SqlserverClient(cred, g_param[OptionsDefine.Region], profile)
3063
+ client._sdkVersion += ("_CLI_" + __version__)
3064
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3065
+ model = models.ModifyDatabasePrivilegeRequest()
3066
+ model.from_json_string(json.dumps(args))
3067
+ start_time = time.time()
3068
+ while True:
3069
+ rsp = client.ModifyDatabasePrivilege(model)
3070
+ result = rsp.to_json_string()
3071
+ try:
3072
+ json_obj = json.loads(result)
3073
+ except TypeError as e:
3074
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3075
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3076
+ break
3077
+ cur_time = time.time()
3078
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3079
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3080
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3081
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3082
+ else:
3083
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3084
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3085
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3086
+
3087
+
3036
3088
  def doCompleteExpansion(args, parsed_globals):
3037
3089
  g_param = parse_global_arg(parsed_globals)
3038
3090
 
@@ -7730,6 +7782,7 @@ ACTION_MAP = {
7730
7782
  "DescribeRegions": doDescribeRegions,
7731
7783
  "DescribeRestoreTask": doDescribeRestoreTask,
7732
7784
  "DescribeInstanceParams": doDescribeInstanceParams,
7785
+ "ModifyDatabasePrivilege": doModifyDatabasePrivilege,
7733
7786
  "CompleteExpansion": doCompleteExpansion,
7734
7787
  "DescribeBackupStatistical": doDescribeBackupStatistical,
7735
7788
  "CreateDB": doCreateDB,
@@ -819,6 +819,13 @@
819
819
  "output": "ModifyDatabaseMdfResponse",
820
820
  "status": "online"
821
821
  },
822
+ "ModifyDatabasePrivilege": {
823
+ "document": "本接口(ModifyDatabasePrivilege)用于修改实例数据库权限。",
824
+ "input": "ModifyDatabasePrivilegeRequest",
825
+ "name": "修改实例数据库权限",
826
+ "output": "ModifyDatabasePrivilegeResponse",
827
+ "status": "online"
828
+ },
822
829
  "ModifyDatabaseShrinkMDF": {
823
830
  "document": "本接口(ModifyDatabaseShrinkDMF)用于收缩数据库mdf(Shrink mdf)。",
824
831
  "input": "ModifyDatabaseShrinkMDFRequest",
@@ -1323,18 +1330,16 @@
1323
1330
  "member": "string",
1324
1331
  "name": "UserName",
1325
1332
  "required": true,
1326
- "type": "string",
1327
- "value_allowed_null": false
1333
+ "type": "string"
1328
1334
  },
1329
1335
  {
1330
1336
  "disabled": false,
1331
- "document": "账号权限变更信息",
1337
+ "document": "账号权限变更信息。参数DBPrivileges和AccAllDB只能二选一",
1332
1338
  "example": "无",
1333
1339
  "member": "DBPrivilegeModifyInfo",
1334
1340
  "name": "DBPrivileges",
1335
1341
  "required": true,
1336
- "type": "list",
1337
- "value_allowed_null": false
1342
+ "type": "list"
1338
1343
  },
1339
1344
  {
1340
1345
  "disabled": false,
@@ -1343,8 +1348,7 @@
1343
1348
  "member": "bool",
1344
1349
  "name": "IsAdmin",
1345
1350
  "required": false,
1346
- "type": "bool",
1347
- "value_allowed_null": false
1351
+ "type": "bool"
1348
1352
  },
1349
1353
  {
1350
1354
  "disabled": false,
@@ -1353,8 +1357,16 @@
1353
1357
  "member": "string",
1354
1358
  "name": "AccountType",
1355
1359
  "required": false,
1356
- "type": "string",
1357
- "value_allowed_null": false
1360
+ "type": "string"
1361
+ },
1362
+ {
1363
+ "disabled": false,
1364
+ "document": "全量修改指定账号下的所有DB权限,只支持特殊权限账号和普通权限账号。参数DBPrivileges和AccAllDB只能二选一",
1365
+ "example": "无",
1366
+ "member": "SelectAllDB",
1367
+ "name": "AccAllDB",
1368
+ "required": false,
1369
+ "type": "object"
1358
1370
  }
1359
1371
  ],
1360
1372
  "usage": "in"
@@ -5026,6 +5038,32 @@
5026
5038
  ],
5027
5039
  "usage": "in"
5028
5040
  },
5041
+ "DataBasePrivilegeModifyInfo": {
5042
+ "document": "数据库账号权限变更信息",
5043
+ "members": [
5044
+ {
5045
+ "disabled": false,
5046
+ "document": "数据库名称",
5047
+ "example": "",
5048
+ "member": "string",
5049
+ "name": "DataBaseName",
5050
+ "required": true,
5051
+ "type": "string",
5052
+ "value_allowed_null": false
5053
+ },
5054
+ {
5055
+ "disabled": false,
5056
+ "document": "数据库权限变更信息",
5057
+ "example": "",
5058
+ "member": "AccountPrivilege",
5059
+ "name": "AccountPrivileges",
5060
+ "required": true,
5061
+ "type": "list",
5062
+ "value_allowed_null": false
5063
+ }
5064
+ ],
5065
+ "usage": "in"
5066
+ },
5029
5067
  "DatabaseTuple": {
5030
5068
  "document": "该数据结构表示具有发布订阅关系的两个数据库。",
5031
5069
  "members": [
@@ -14134,6 +14172,52 @@
14134
14172
  ],
14135
14173
  "type": "object"
14136
14174
  },
14175
+ "ModifyDatabasePrivilegeRequest": {
14176
+ "document": "ModifyDatabasePrivilege请求参数结构体",
14177
+ "members": [
14178
+ {
14179
+ "disabled": false,
14180
+ "document": "数据库实例ID,形如mssql-njj2mtpl",
14181
+ "example": "mssql-njj2mtpl",
14182
+ "member": "string",
14183
+ "name": "InstanceId",
14184
+ "required": true,
14185
+ "type": "string"
14186
+ },
14187
+ {
14188
+ "disabled": false,
14189
+ "document": "数据库权限变更信息",
14190
+ "example": "无",
14191
+ "member": "DataBasePrivilegeModifyInfo",
14192
+ "name": "DataBaseSet",
14193
+ "required": true,
14194
+ "type": "list"
14195
+ }
14196
+ ],
14197
+ "type": "object"
14198
+ },
14199
+ "ModifyDatabasePrivilegeResponse": {
14200
+ "document": "ModifyDatabasePrivilege返回参数结构体",
14201
+ "members": [
14202
+ {
14203
+ "disabled": false,
14204
+ "document": "异步任务流程ID",
14205
+ "example": "30321",
14206
+ "member": "uint64",
14207
+ "name": "FlowId",
14208
+ "required": true,
14209
+ "type": "int",
14210
+ "value_allowed_null": false
14211
+ },
14212
+ {
14213
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
14214
+ "member": "string",
14215
+ "name": "RequestId",
14216
+ "type": "string"
14217
+ }
14218
+ ],
14219
+ "type": "object"
14220
+ },
14137
14221
  "ModifyDatabaseShrinkMDFRequest": {
14138
14222
  "document": "ModifyDatabaseShrinkMDF请求参数结构体",
14139
14223
  "members": [
@@ -16588,6 +16672,21 @@
16588
16672
  ],
16589
16673
  "usage": "out"
16590
16674
  },
16675
+ "SelectAllDB": {
16676
+ "document": "DB权限修改类型",
16677
+ "members": [
16678
+ {
16679
+ "disabled": false,
16680
+ "document": "权限变更信息。ReadWrite表示可读写,ReadOnly表示只读,Delete表示删除账号对该DB的权限,DBOwner所有者",
16681
+ "example": "ReadWrite",
16682
+ "member": "string",
16683
+ "name": "Privilege",
16684
+ "required": true,
16685
+ "type": "string"
16686
+ }
16687
+ ],
16688
+ "usage": "in"
16689
+ },
16591
16690
  "SlaveZones": {
16592
16691
  "document": "备可用区信息",
16593
16692
  "members": [
@@ -966,6 +966,14 @@
966
966
  "title": "收缩数据库mdf"
967
967
  }
968
968
  ],
969
+ "ModifyDatabasePrivilege": [
970
+ {
971
+ "document": "以数据库维度修改权限",
972
+ "input": "https://sqlserver.tencentcloudapi.com/?Action=ModifyDatabasePrivilege\n&InstanceId=mssql-njj2mtpl\n&DataBaseSet.0.DataBaseName=testuser\n&DataBaseSet.0.AccountPrivileges.0.UserName=testdb\n&DataBaseSet.0.AccountPrivileges.0.Privilege=ReadOnly\n&<公共请求参数>",
973
+ "output": "{\n \"Response\": {\n \"RequestId\": \"8a61e500-aa33-454c-9ec2-da2a368c39ab\",\n \"FlowId\": \"30321\"\n }\n}",
974
+ "title": "修改数据库的权限"
975
+ }
976
+ ],
969
977
  "ModifyDatabaseShrinkMDF": [
970
978
  {
971
979
  "document": "",
@@ -121,7 +121,7 @@ def doDescribeImages(args, parsed_globals):
121
121
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
122
122
 
123
123
 
124
- def doDetectProductBeta(args, parsed_globals):
124
+ def doDetectPet(args, parsed_globals):
125
125
  g_param = parse_global_arg(parsed_globals)
126
126
 
127
127
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -150,11 +150,11 @@ def doDetectProductBeta(args, parsed_globals):
150
150
  client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
151
151
  client._sdkVersion += ("_CLI_" + __version__)
152
152
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
153
- model = models.DetectProductBetaRequest()
153
+ model = models.DetectPetRequest()
154
154
  model.from_json_string(json.dumps(args))
155
155
  start_time = time.time()
156
156
  while True:
157
- rsp = client.DetectProductBeta(model)
157
+ rsp = client.DetectPet(model)
158
158
  result = rsp.to_json_string()
159
159
  try:
160
160
  json_obj = json.loads(result)
@@ -1161,58 +1161,6 @@ def doUpdateImage(args, parsed_globals):
1161
1161
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1162
1162
 
1163
1163
 
1164
- def doDetectPet(args, parsed_globals):
1165
- g_param = parse_global_arg(parsed_globals)
1166
-
1167
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1168
- cred = credential.CVMRoleCredential()
1169
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1170
- cred = credential.STSAssumeRoleCredential(
1171
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1172
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1173
- )
1174
- 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):
1175
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1176
- else:
1177
- cred = credential.Credential(
1178
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1179
- )
1180
- http_profile = HttpProfile(
1181
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1182
- reqMethod="POST",
1183
- endpoint=g_param[OptionsDefine.Endpoint],
1184
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1185
- )
1186
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1187
- if g_param[OptionsDefine.Language]:
1188
- profile.language = g_param[OptionsDefine.Language]
1189
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1190
- client = mod.TiiaClient(cred, g_param[OptionsDefine.Region], profile)
1191
- client._sdkVersion += ("_CLI_" + __version__)
1192
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
1193
- model = models.DetectPetRequest()
1194
- model.from_json_string(json.dumps(args))
1195
- start_time = time.time()
1196
- while True:
1197
- rsp = client.DetectPet(model)
1198
- result = rsp.to_json_string()
1199
- try:
1200
- json_obj = json.loads(result)
1201
- except TypeError as e:
1202
- json_obj = json.loads(result.decode('utf-8')) # python3.3
1203
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1204
- break
1205
- cur_time = time.time()
1206
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1207
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1208
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1209
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1210
- else:
1211
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1212
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1213
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1214
-
1215
-
1216
1164
  CLIENT_MAP = {
1217
1165
  "v20190529": tiia_client_v20190529,
1218
1166
 
@@ -1226,7 +1174,7 @@ MODELS_MAP = {
1226
1174
  ACTION_MAP = {
1227
1175
  "DetectEnvelope": doDetectEnvelope,
1228
1176
  "DescribeImages": doDescribeImages,
1229
- "DetectProductBeta": doDetectProductBeta,
1177
+ "DetectPet": doDetectPet,
1230
1178
  "CreateGroup": doCreateGroup,
1231
1179
  "DetectLabel": doDetectLabel,
1232
1180
  "DetectChefDress": doDetectChefDress,
@@ -1246,7 +1194,6 @@ ACTION_MAP = {
1246
1194
  "DetectLabelBeta": doDetectLabelBeta,
1247
1195
  "SearchImage": doSearchImage,
1248
1196
  "UpdateImage": doUpdateImage,
1249
- "DetectPet": doDetectPet,
1250
1197
 
1251
1198
  }
1252
1199