tccli 3.0.1398.1__py2.py3-none-any.whl → 3.0.1399.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 (38) hide show
  1. tccli/__init__.py +1 -1
  2. tccli/services/ccc/v20200210/api.json +33 -0
  3. tccli/services/cdb/cdb_client.py +53 -0
  4. tccli/services/cdb/v20170320/api.json +76 -14
  5. tccli/services/cdb/v20170320/examples.json +8 -0
  6. tccli/services/cdwpg/v20201230/api.json +11 -1
  7. tccli/services/cdwpg/v20201230/examples.json +1 -1
  8. tccli/services/cls/v20201016/api.json +3 -3
  9. tccli/services/dbbrain/dbbrain_client.py +114 -61
  10. tccli/services/dbbrain/v20191016/api.json +63 -61
  11. tccli/services/dbbrain/v20210527/api.json +324 -163
  12. tccli/services/dbbrain/v20210527/examples.json +11 -3
  13. tccli/services/dts/v20180330/api.json +4 -4
  14. tccli/services/dts/v20211206/api.json +54 -54
  15. tccli/services/dts/v20211206/examples.json +2 -2
  16. tccli/services/ess/v20201111/api.json +118 -3
  17. tccli/services/essbasic/v20210526/api.json +117 -2
  18. tccli/services/ioa/v20220601/api.json +11 -0
  19. tccli/services/lke/v20231130/api.json +162 -36
  20. tccli/services/lke/v20231130/examples.json +20 -20
  21. tccli/services/mongodb/v20190725/api.json +322 -313
  22. tccli/services/mongodb/v20190725/examples.json +17 -17
  23. tccli/services/monitor/v20180724/api.json +5 -4
  24. tccli/services/monitor/v20180724/examples.json +8 -2
  25. tccli/services/redis/v20180412/api.json +13 -13
  26. tccli/services/rum/v20210622/api.json +4 -4
  27. tccli/services/rum/v20210622/examples.json +2 -2
  28. tccli/services/teo/teo_client.py +166 -7
  29. tccli/services/teo/v20220901/api.json +341 -0
  30. tccli/services/teo/v20220901/examples.json +27 -3
  31. tccli/services/tke/v20180525/api.json +6 -6
  32. tccli/services/tke/v20180525/examples.json +1 -1
  33. tccli/services/waf/v20180125/api.json +19 -0
  34. {tccli-3.0.1398.1.dist-info → tccli-3.0.1399.1.dist-info}/METADATA +2 -2
  35. {tccli-3.0.1398.1.dist-info → tccli-3.0.1399.1.dist-info}/RECORD +38 -38
  36. {tccli-3.0.1398.1.dist-info → tccli-3.0.1399.1.dist-info}/WHEEL +0 -0
  37. {tccli-3.0.1398.1.dist-info → tccli-3.0.1399.1.dist-info}/entry_points.txt +0 -0
  38. {tccli-3.0.1398.1.dist-info → tccli-3.0.1399.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '3.0.1398.1'
1
+ __version__ = '3.0.1399.1'
@@ -9579,6 +9579,39 @@
9579
9579
  "required": false,
9580
9580
  "type": "string",
9581
9581
  "value_allowed_null": false
9582
+ },
9583
+ {
9584
+ "disabled": false,
9585
+ "document": "小休原因",
9586
+ "example": "会议",
9587
+ "member": "string",
9588
+ "name": "Reason",
9589
+ "output_required": false,
9590
+ "required": false,
9591
+ "type": "string",
9592
+ "value_allowed_null": false
9593
+ },
9594
+ {
9595
+ "disabled": false,
9596
+ "document": "座席邮箱",
9597
+ "example": "101@qq.com",
9598
+ "member": "string",
9599
+ "name": "StaffEmail",
9600
+ "output_required": false,
9601
+ "required": false,
9602
+ "type": "string",
9603
+ "value_allowed_null": false
9604
+ },
9605
+ {
9606
+ "disabled": false,
9607
+ "document": "座席工号",
9608
+ "example": "10001",
9609
+ "member": "string",
9610
+ "name": "StaffNo",
9611
+ "output_required": false,
9612
+ "required": false,
9613
+ "type": "string",
9614
+ "value_allowed_null": false
9582
9615
  }
9583
9616
  ],
9584
9617
  "usage": "both"
@@ -5217,6 +5217,58 @@ def doDeleteBackup(args, parsed_globals):
5217
5217
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5218
5218
 
5219
5219
 
5220
+ def doModifyDBInstanceModes(args, parsed_globals):
5221
+ g_param = parse_global_arg(parsed_globals)
5222
+
5223
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
5224
+ cred = credential.CVMRoleCredential()
5225
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
5226
+ cred = credential.STSAssumeRoleCredential(
5227
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
5228
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
5229
+ )
5230
+ 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):
5231
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
5232
+ else:
5233
+ cred = credential.Credential(
5234
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
5235
+ )
5236
+ http_profile = HttpProfile(
5237
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
5238
+ reqMethod="POST",
5239
+ endpoint=g_param[OptionsDefine.Endpoint],
5240
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
5241
+ )
5242
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
5243
+ if g_param[OptionsDefine.Language]:
5244
+ profile.language = g_param[OptionsDefine.Language]
5245
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
5246
+ client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
5247
+ client._sdkVersion += ("_CLI_" + __version__)
5248
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
5249
+ model = models.ModifyDBInstanceModesRequest()
5250
+ model.from_json_string(json.dumps(args))
5251
+ start_time = time.time()
5252
+ while True:
5253
+ rsp = client.ModifyDBInstanceModes(model)
5254
+ result = rsp.to_json_string()
5255
+ try:
5256
+ json_obj = json.loads(result)
5257
+ except TypeError as e:
5258
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
5259
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
5260
+ break
5261
+ cur_time = time.time()
5262
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
5263
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
5264
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
5265
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
5266
+ else:
5267
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
5268
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
5269
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
5270
+
5271
+
5220
5272
  def doDescribeRoMinScale(args, parsed_globals):
5221
5273
  g_param = parse_global_arg(parsed_globals)
5222
5274
 
@@ -9176,6 +9228,7 @@ ACTION_MAP = {
9176
9228
  "DescribeRollbackRangeTime": doDescribeRollbackRangeTime,
9177
9229
  "DescribeParamTemplates": doDescribeParamTemplates,
9178
9230
  "DeleteBackup": doDeleteBackup,
9231
+ "ModifyDBInstanceModes": doModifyDBInstanceModes,
9179
9232
  "DescribeRoMinScale": doDescribeRoMinScale,
9180
9233
  "ModifyCdbProxyAddressDesc": doModifyCdbProxyAddressDesc,
9181
9234
  "ModifyAccountHost": doModifyAccountHost,
@@ -910,6 +910,13 @@
910
910
  "output": "ModifyDBInstanceLogToCLSResponse",
911
911
  "status": "online"
912
912
  },
913
+ "ModifyDBInstanceModes": {
914
+ "document": "该接口(ModifyDBInstanceModes)用于更改云数据库的模式。",
915
+ "input": "ModifyDBInstanceModesRequest",
916
+ "name": "更改云数据库的模式",
917
+ "output": "ModifyDBInstanceModesResponse",
918
+ "status": "online"
919
+ },
913
920
  "ModifyDBInstanceName": {
914
921
  "document": "本接口(ModifyDBInstanceName)用于修改云数据库实例的名称。",
915
922
  "input": "ModifyDBInstanceNameRequest",
@@ -4638,7 +4645,7 @@
4638
4645
  "usage": "both"
4639
4646
  },
4640
4647
  "ClusterTopology": {
4641
- "document": "集群版的节点拓扑配置。",
4648
+ "document": "云盘版的节点拓扑配置。",
4642
4649
  "members": [
4643
4650
  {
4644
4651
  "disabled": false,
@@ -8960,7 +8967,7 @@
8960
8967
  "members": [
8961
8968
  {
8962
8969
  "disabled": false,
8963
- "document": "需要查询备份概览的云数据库产品类型。可取值为:mysql 指双节点/三节点的高可用实例,mysql-basic 指单节点云盘版实例,mysql-cluster 指云盘版(原集群版)实例。",
8970
+ "document": "需要查询备份概览的云数据库产品类型。可取值为:mysql 指双节点/三节点的高可用实例,mysql-basic 指单节点(云盘)实例,mysql-cluster 指云盘版实例。",
8964
8971
  "example": "mysql",
8965
8972
  "member": "string",
8966
8973
  "name": "Product",
@@ -9057,7 +9064,7 @@
9057
9064
  "members": [
9058
9065
  {
9059
9066
  "disabled": false,
9060
- "document": "需要查询备份实时统计的云数据库产品类型。可取值为:mysql 指双节点/三节点的高可用实例,mysql-basic 指单节点云盘版实例,mysql-cluster 指云盘版(原集群版)实例。",
9067
+ "document": "需要查询备份实时统计的云数据库产品类型。可取值为:mysql 指双节点/三节点的高可用实例,mysql-basic 指单节点(云盘)实例,mysql-cluster 指云盘版实例。",
9061
9068
  "example": "mysql",
9062
9069
  "member": "string",
9063
9070
  "name": "Product",
@@ -9109,7 +9116,7 @@
9109
9116
  {
9110
9117
  "disabled": false,
9111
9118
  "document": "实例备份统计条目。",
9112
- "example": "[{\"AutoBackupCount\": 5,\"AutoBackupVolume\": 10000,\"BackupVolume\": 50000,\"BinlogBackupCount\": 2,\"BinlogBackupVolume\": 20000,\"DataBackupCount\": 15,\"DataBackupVolume\": 30000,\"InstanceId\": \"cdb-01wa5l0v\",\"ManualBackupCount\": 10,\"ManualBackupVolume\": 20000}],",
9119
+ "example": "",
9113
9120
  "member": "BackupSummaryItem",
9114
9121
  "name": "Items",
9115
9122
  "output_required": true,
@@ -9205,7 +9212,7 @@
9205
9212
  "members": [
9206
9213
  {
9207
9214
  "disabled": false,
9208
- "document": "需要查询日志备份概览的云数据库产品类型。可取值为:mysql 指双节点/三节点的高可用实例,mysql-basic 指单节点云盘版实例,mysql-cluster 指云盘版(原集群版)实例。",
9215
+ "document": "需要查询日志备份概览的云数据库产品类型。可取值为:mysql 指双节点/三节点的高可用实例,mysql-basic 指单节点(云盘)实例,mysql-cluster 指云盘版实例。",
9209
9216
  "example": "mysql",
9210
9217
  "member": "string",
9211
9218
  "name": "Product",
@@ -11024,7 +11031,7 @@
11024
11031
  "members": [
11025
11032
  {
11026
11033
  "disabled": false,
11027
- "document": "需要查询数据备份概览的云数据库产品类型。可取值为:mysql 指双节点/三节点的高可用实例,mysql-basic 指单节点云盘版实例,mysql-cluster 指云盘版(原集群版)实例。",
11034
+ "document": "需要查询数据备份概览的云数据库产品类型。可取值为:mysql 指双节点/三节点的高可用实例,mysql-basic 指单节点(云盘)实例,mysql-cluster 指云盘版实例。",
11028
11035
  "example": "mysql",
11029
11036
  "member": "string",
11030
11037
  "name": "Product",
@@ -16887,6 +16894,61 @@
16887
16894
  ],
16888
16895
  "type": "object"
16889
16896
  },
16897
+ "ModifyDBInstanceModesRequest": {
16898
+ "document": "ModifyDBInstanceModes请求参数结构体",
16899
+ "members": [
16900
+ {
16901
+ "disabled": false,
16902
+ "document": "实例ID,格式如:cdb-c1nl9rpv,与云数据库控制台页面中显示的实例ID相同。",
16903
+ "example": "cdb-eb2w7dto",
16904
+ "member": "string",
16905
+ "name": "InstanceId",
16906
+ "required": true,
16907
+ "type": "string"
16908
+ },
16909
+ {
16910
+ "disabled": false,
16911
+ "document": "云数据库的模式,目前仅支持传入 \"protectMode\" 表示修改主从同步方式。",
16912
+ "example": "protectMode",
16913
+ "member": "string",
16914
+ "name": "Mode",
16915
+ "required": true,
16916
+ "type": "string"
16917
+ },
16918
+ {
16919
+ "disabled": false,
16920
+ "document": "数据同步方式,可选值:0-异步复制,1-半同步复制,2-强同步复制。",
16921
+ "example": "1",
16922
+ "member": "int64",
16923
+ "name": "ProtectMode",
16924
+ "required": false,
16925
+ "type": "int"
16926
+ }
16927
+ ],
16928
+ "type": "object"
16929
+ },
16930
+ "ModifyDBInstanceModesResponse": {
16931
+ "document": "ModifyDBInstanceModes返回参数结构体",
16932
+ "members": [
16933
+ {
16934
+ "disabled": false,
16935
+ "document": "异步任务的请求ID,可使用此ID查询异步任务的执行结果。",
16936
+ "example": "9ad9c2d5-88007b27-7d2c8b8c-f2598f12",
16937
+ "member": "string",
16938
+ "name": "AsyncRequestId",
16939
+ "output_required": true,
16940
+ "type": "string",
16941
+ "value_allowed_null": false
16942
+ },
16943
+ {
16944
+ "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
16945
+ "member": "string",
16946
+ "name": "RequestId",
16947
+ "type": "string"
16948
+ }
16949
+ ],
16950
+ "type": "object"
16951
+ },
16890
16952
  "ModifyDBInstanceNameRequest": {
16891
16953
  "document": "ModifyDBInstanceName请求参数结构体",
16892
16954
  "members": [
@@ -17019,7 +17081,7 @@
17019
17081
  {
17020
17082
  "disabled": false,
17021
17083
  "document": "当传入只读实例 ID 时,默认操作的是对应只读组的安全组。如果需要操作只读实例 ID 的安全组, 需要将该入参置为 True。默认为 False。",
17022
- "example": "False",
17084
+ "example": "false",
17023
17085
  "member": "bool",
17024
17086
  "name": "ForReadonlyInstance",
17025
17087
  "required": false,
@@ -17027,7 +17089,7 @@
17027
17089
  },
17028
17090
  {
17029
17091
  "disabled": false,
17030
- "document": "变更集群版实例只读组时,InstanceId 传实例 ID,需要额外指定该参数表示操作只读组。 如果操作读写节点则不需指定该参数。",
17092
+ "document": "变更云盘版实例只读组时,InstanceId 传实例 ID,需要额外指定该参数表示操作只读组。 如果操作读写节点则不需指定该参数。",
17031
17093
  "example": "cdb-xxx|readonly",
17032
17094
  "member": "string",
17033
17095
  "name": "OpResourceId",
@@ -19046,7 +19108,7 @@
19046
19108
  "usage": "in"
19047
19109
  },
19048
19110
  "ReadWriteNode": {
19049
- "document": "集群版 RW 节点的配置。",
19111
+ "document": "云盘版 RW 节点的配置。",
19050
19112
  "members": [
19051
19113
  {
19052
19114
  "disabled": false,
@@ -19059,7 +19121,7 @@
19059
19121
  },
19060
19122
  {
19061
19123
  "disabled": false,
19062
- "document": "升级集群版实例时,如果要调整只读节点可用区,需要指定节点id。",
19124
+ "document": "升级云盘版实例时,如果要调整只读节点可用区,需要指定节点 ID。",
19063
19125
  "example": "dbn-73ktfl1j",
19064
19126
  "member": "string",
19065
19127
  "name": "NodeId",
@@ -19070,7 +19132,7 @@
19070
19132
  "usage": "in"
19071
19133
  },
19072
19134
  "ReadonlyNode": {
19073
- "document": "集群版的 RO 节点配置。",
19135
+ "document": "云盘版的 RO 节点配置。",
19074
19136
  "members": [
19075
19137
  {
19076
19138
  "disabled": false,
@@ -19092,7 +19154,7 @@
19092
19154
  },
19093
19155
  {
19094
19156
  "disabled": false,
19095
- "document": "升级集群版实例时,如果要调整只读节点可用区,需要指定节点id。",
19157
+ "document": "升级云盘版实例时,如果要调整只读节点可用区,需要指定节点 ID。",
19096
19158
  "example": "dbn-h7erp111",
19097
19159
  "member": "string",
19098
19160
  "name": "NodeId",
@@ -22184,8 +22246,8 @@
22184
22246
  },
22185
22247
  {
22186
22248
  "disabled": false,
22187
- "document": "集群版节点拓扑配置。",
22188
- "example": "{\"ReadWriteNode\":{\"Zone\":\"ap-beijing-6\"},\"ReadOnlyNodes\":[{\"Zone\":\"ap-beijing-6\"}]}",
22249
+ "document": "云盘版节点拓扑配置。",
22250
+ "example": "",
22189
22251
  "member": "ClusterTopology",
22190
22252
  "name": "ClusterTopology",
22191
22253
  "required": false,
@@ -1094,6 +1094,14 @@
1094
1094
  "title": "开启或关闭CDB日志投递CLS"
1095
1095
  }
1096
1096
  ],
1097
+ "ModifyDBInstanceModes": [
1098
+ {
1099
+ "document": "",
1100
+ "input": "https://cdb.tencentcloudapi.com/?Action=ModifyDBInstanceModes\n&InstanceId=cdb-xxxx\n&Mode=protectMode\n&ProtectMode=1\n&<公共请求参数>",
1101
+ "output": "{\n \"Response\": {\n \"RequestId\": \"6EF60BEC-0242-43AF-BB20-270359FB54A7\",\n \"AsyncRequestId\": \"9ad9c2d5-88007b27-7d2c8b8c-f2598f12\"\n }\n}",
1102
+ "title": "更改云数据库的模式"
1103
+ }
1104
+ ],
1097
1105
  "ModifyDBInstanceName": [
1098
1106
  {
1099
1107
  "document": "",
@@ -749,13 +749,23 @@
749
749
  {
750
750
  "disabled": false,
751
751
  "document": "账号数组",
752
- "example": "[{\"InstanceId\":\"cdwpg-rzshdeh1\",\"Perms\":[\"Create role\",\"Create DB\"],\"Username\":\"dbadmin\"}]",
752
+ "example": "",
753
753
  "member": "AccountInfo",
754
754
  "name": "Accounts",
755
755
  "output_required": true,
756
756
  "type": "list",
757
757
  "value_allowed_null": false
758
758
  },
759
+ {
760
+ "disabled": false,
761
+ "document": "error:...",
762
+ "example": "1",
763
+ "member": "string",
764
+ "name": "ErrorMsg",
765
+ "output_required": false,
766
+ "type": "string",
767
+ "value_allowed_null": false
768
+ },
759
769
  {
760
770
  "document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
761
771
  "member": "string",
@@ -12,7 +12,7 @@
12
12
  {
13
13
  "document": "",
14
14
  "input": "POST / HTTP/1.1\nHost: cdwpg.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeAccounts\n<公共请求参数>\n\n{\n \"Offset\": 0,\n \"Limit\": 10,\n \"InstanceId\": \"cdwpg_rzshdeh1\"\n}",
15
- "output": "{\n \"Response\": {\n \"Accounts\": [\n {\n \"InstanceId\": \"cdwpg-rzshdeh1\",\n \"Perms\": [\n \"Create role\",\n \"Create DB\"\n ],\n \"UserName\": \"dbadmin\"\n }\n ],\n \"RequestId\": \"88aeb3ac-19d8-4c89-b4e2-905cbf74100d\",\n \"TotalCount\": 1\n }\n}",
15
+ "output": "{\n \"Response\": {\n \"Accounts\": [\n {\n \"InstanceId\": \"cdwpg-rzshdeh1\",\n \"Perms\": [\n \"Create role\",\n \"Create DB\"\n ],\n \"UserName\": \"dbadmin\"\n }\n ],\n \"RequestId\": \"88aeb3ac-19d8-4c89-b4e2-905cbf74100d\",\n \"ErrorMsg\": \"\",\n \"TotalCount\": 1\n }\n}",
16
16
  "title": "账号管理"
17
17
  }
18
18
  ],
@@ -4078,7 +4078,7 @@
4078
4078
  },
4079
4079
  {
4080
4080
  "disabled": false,
4081
- "document": "云产品地域。 不同日志类型(LogType)地域入参格式存在差异, 请参考如下示例:\n- CDS所有日志类型:ap-guangzhou\n- CDB-AUDIT: gz\n- TDSQL-C-AUDIT: gz\n- MongoDB-AUDIT: gz\n- MongoDB-SlowLog:ap-guangzhou\n- MongoDB-ErrorLog:ap-guangzhou\n- TDMYSQL-SLOW:gz\n- DCDB所有日志类型:gz\n- MariaDB所有日志类型:gz\n- PostgreSQL所有日志类型:gz\n- BH所有日志类型:overseas-polaris(国内站海外)/fsi-polaris(国内站金融)/general-polaris(国内站普通)/intl-sg-prod(国际站)\n- APIS所有日志类型:gz",
4081
+ "document": "云产品地域。 不同日志类型(LogType)地域入参格式存在差异, 请参考如下示例:\n- CDS所有日志类型:ap-guangzhou\n- CDB-AUDIT: gz\n- TDSQL-C-AUDIT: gz\n- MongoDB-AUDIT: gz\n- MongoDB-SlowLog:ap-guangzhou\n- MongoDB-ErrorLog:ap-guangzhou\n- TDMYSQL-SLOW:gz\n- DCDB所有日志类型:gz\n- MariaDB所有日志类型:gz\n- PostgreSQL所有日志类型:gz\n- BH所有日志类型:overseas-polaris(中国香港地区和其他)/fsi-polaris(金融区)/general-polaris(普通区)/intl-sg-prod(国际站)\n- APIS所有日志类型:gz",
4082
4082
  "example": "ap-guangzhou",
4083
4083
  "member": "string",
4084
4084
  "name": "CloudProductRegion",
@@ -6817,7 +6817,7 @@
6817
6817
  },
6818
6818
  {
6819
6819
  "disabled": false,
6820
- "document": "云产品地域。 不同日志类型(LogType)地域入参格式存在差异, 请参考如下示例:\n- CDS所有日志类型:ap-guangzhou\n- CDB-AUDIT: gz\n- TDSQL-C-AUDIT: gz\n- MongoDB-AUDIT: gz\n- MongoDB-SlowLog:ap-guangzhou\n- MongoDB-ErrorLog:ap-guangzhou\n- TDMYSQL-SLOW:gz\n- DCDB所有日志类型:gz\n- MariaDB所有日志类型:gz\n- PostgreSQL所有日志类型:gz\n- BH所有日志类型:overseas-polaris(国内站海外)/fsi-polaris(国内站金融)/general-polaris(国内站普通)/intl-sg-prod(国际站)\n- APIS所有日志类型:gz",
6820
+ "document": "云产品地域。 不同日志类型(LogType)地域入参格式存在差异, 请参考如下示例:\n- CDS所有日志类型:ap-guangzhou\n- CDB-AUDIT: gz\n- TDSQL-C-AUDIT: gz\n- MongoDB-AUDIT: gz\n- MongoDB-SlowLog:ap-guangzhou\n- MongoDB-ErrorLog:ap-guangzhou\n- TDMYSQL-SLOW:gz\n- DCDB所有日志类型:gz\n- MariaDB所有日志类型:gz\n- PostgreSQL所有日志类型:gz\n- BH所有日志类型:overseas-polaris(中国香港地区和其他)/fsi-polaris(金融区)/general-polaris(普通区)/intl-sg-prod(国际站)\n- APIS所有日志类型:gz",
6821
6821
  "example": "ap-guangzhou",
6822
6822
  "member": "string",
6823
6823
  "name": "CloudProductRegion",
@@ -12456,7 +12456,7 @@
12456
12456
  },
12457
12457
  {
12458
12458
  "disabled": false,
12459
- "document": "云产品地域。 不同日志类型(LogType)地域入參格式存在差异, 请参考如下示例:\n- CDS所有日志类型:ap-guangzhou\n- CDB-AUDIT: gz\n- TDSQL-C-AUDIT: gz\n- MongoDB-AUDIT: gz\n- MongoDB-SlowLog:ap-guangzhou\n- MongoDB-ErrorLog:ap-guangzhou\n- TDMYSQL-SLOW:gz\n- DCDB所有日志类型:gz\n- MariaDB所有日志类型:gz\n- PostgreSQL所有日志类型:gz\n- BH所有日志类型:overseas-polaris(国内站海外)/fsi-polaris(国内站金融)/general-polaris(国内站普通)/intl-sg-prod(国际站)\n- APIS所有日志类型:gz",
12459
+ "document": "云产品地域。 不同日志类型(LogType)地域入參格式存在差异, 请参考如下示例:\n- CDS所有日志类型:ap-guangzhou\n- CDB-AUDIT: gz\n- TDSQL-C-AUDIT: gz\n- MongoDB-AUDIT: gz\n- MongoDB-SlowLog:ap-guangzhou\n- MongoDB-ErrorLog:ap-guangzhou\n- TDMYSQL-SLOW:gz\n- DCDB所有日志类型:gz\n- MariaDB所有日志类型:gz\n- PostgreSQL所有日志类型:gz\n- BH所有日志类型:overseas-polaris(中国香港地区和其他)/fsi-polaris(金融区)/general-polaris(普通区)/intl-sg-prod(国际站)\n- APIS所有日志类型:gz",
12460
12460
  "example": "ap-guangzhou",
12461
12461
  "member": "string",
12462
12462
  "name": "CloudProductRegion",
@@ -383,58 +383,6 @@ def doDescribeSqlTemplate(args, parsed_globals):
383
383
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
384
384
 
385
385
 
386
- def doDescribeNoPrimaryKeyTables(args, parsed_globals):
387
- g_param = parse_global_arg(parsed_globals)
388
-
389
- if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
390
- cred = credential.CVMRoleCredential()
391
- elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
392
- cred = credential.STSAssumeRoleCredential(
393
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
394
- g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
395
- )
396
- 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):
397
- cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
398
- else:
399
- cred = credential.Credential(
400
- g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
401
- )
402
- http_profile = HttpProfile(
403
- reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
404
- reqMethod="POST",
405
- endpoint=g_param[OptionsDefine.Endpoint],
406
- proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
407
- )
408
- profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
409
- if g_param[OptionsDefine.Language]:
410
- profile.language = g_param[OptionsDefine.Language]
411
- mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
412
- client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
413
- client._sdkVersion += ("_CLI_" + __version__)
414
- models = MODELS_MAP[g_param[OptionsDefine.Version]]
415
- model = models.DescribeNoPrimaryKeyTablesRequest()
416
- model.from_json_string(json.dumps(args))
417
- start_time = time.time()
418
- while True:
419
- rsp = client.DescribeNoPrimaryKeyTables(model)
420
- result = rsp.to_json_string()
421
- try:
422
- json_obj = json.loads(result)
423
- except TypeError as e:
424
- json_obj = json.loads(result.decode('utf-8')) # python3.3
425
- if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
426
- break
427
- cur_time = time.time()
428
- if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
429
- raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
430
- (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
431
- search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
432
- else:
433
- print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
434
- time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
435
- FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
436
-
437
-
438
386
  def doDescribeDBPerfTimeSeries(args, parsed_globals):
439
387
  g_param = parse_global_arg(parsed_globals)
440
388
 
@@ -1527,6 +1475,58 @@ def doDescribeDBSpaceStatus(args, parsed_globals):
1527
1475
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1528
1476
 
1529
1477
 
1478
+ def doKillMySqlThreads(args, parsed_globals):
1479
+ g_param = parse_global_arg(parsed_globals)
1480
+
1481
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
1482
+ cred = credential.CVMRoleCredential()
1483
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
1484
+ cred = credential.STSAssumeRoleCredential(
1485
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
1486
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
1487
+ )
1488
+ 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):
1489
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
1490
+ else:
1491
+ cred = credential.Credential(
1492
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
1493
+ )
1494
+ http_profile = HttpProfile(
1495
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
1496
+ reqMethod="POST",
1497
+ endpoint=g_param[OptionsDefine.Endpoint],
1498
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
1499
+ )
1500
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
1501
+ if g_param[OptionsDefine.Language]:
1502
+ profile.language = g_param[OptionsDefine.Language]
1503
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
1504
+ client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
1505
+ client._sdkVersion += ("_CLI_" + __version__)
1506
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
1507
+ model = models.KillMySqlThreadsRequest()
1508
+ model.from_json_string(json.dumps(args))
1509
+ start_time = time.time()
1510
+ while True:
1511
+ rsp = client.KillMySqlThreads(model)
1512
+ result = rsp.to_json_string()
1513
+ try:
1514
+ json_obj = json.loads(result)
1515
+ except TypeError as e:
1516
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
1517
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
1518
+ break
1519
+ cur_time = time.time()
1520
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
1521
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
1522
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
1523
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
1524
+ else:
1525
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
1526
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
1527
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
1528
+
1529
+
1530
1530
  def doCreateProxySessionKillTask(args, parsed_globals):
1531
1531
  g_param = parse_global_arg(parsed_globals)
1532
1532
 
@@ -3503,7 +3503,7 @@ def doUpdateAgentSwitch(args, parsed_globals):
3503
3503
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3504
3504
 
3505
3505
 
3506
- def doUpdateMonitorSwitch(args, parsed_globals):
3506
+ def doDescribeNoPrimaryKeyTables(args, parsed_globals):
3507
3507
  g_param = parse_global_arg(parsed_globals)
3508
3508
 
3509
3509
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3532,11 +3532,63 @@ def doUpdateMonitorSwitch(args, parsed_globals):
3532
3532
  client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
3533
3533
  client._sdkVersion += ("_CLI_" + __version__)
3534
3534
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3535
- model = models.UpdateMonitorSwitchRequest()
3535
+ model = models.DescribeNoPrimaryKeyTablesRequest()
3536
3536
  model.from_json_string(json.dumps(args))
3537
3537
  start_time = time.time()
3538
3538
  while True:
3539
- rsp = client.UpdateMonitorSwitch(model)
3539
+ rsp = client.DescribeNoPrimaryKeyTables(model)
3540
+ result = rsp.to_json_string()
3541
+ try:
3542
+ json_obj = json.loads(result)
3543
+ except TypeError as e:
3544
+ json_obj = json.loads(result.decode('utf-8')) # python3.3
3545
+ if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
3546
+ break
3547
+ cur_time = time.time()
3548
+ if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
3549
+ raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
3550
+ (g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
3551
+ search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
3552
+ else:
3553
+ print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
3554
+ time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
3555
+ FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3556
+
3557
+
3558
+ def doDescribeMetricTopProxies(args, parsed_globals):
3559
+ g_param = parse_global_arg(parsed_globals)
3560
+
3561
+ if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
3562
+ cred = credential.CVMRoleCredential()
3563
+ elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
3564
+ cred = credential.STSAssumeRoleCredential(
3565
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
3566
+ g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
3567
+ )
3568
+ 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):
3569
+ cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
3570
+ else:
3571
+ cred = credential.Credential(
3572
+ g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
3573
+ )
3574
+ http_profile = HttpProfile(
3575
+ reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
3576
+ reqMethod="POST",
3577
+ endpoint=g_param[OptionsDefine.Endpoint],
3578
+ proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
3579
+ )
3580
+ profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
3581
+ if g_param[OptionsDefine.Language]:
3582
+ profile.language = g_param[OptionsDefine.Language]
3583
+ mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
3584
+ client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
3585
+ client._sdkVersion += ("_CLI_" + __version__)
3586
+ models = MODELS_MAP[g_param[OptionsDefine.Version]]
3587
+ model = models.DescribeMetricTopProxiesRequest()
3588
+ model.from_json_string(json.dumps(args))
3589
+ start_time = time.time()
3590
+ while True:
3591
+ rsp = client.DescribeMetricTopProxies(model)
3540
3592
  result = rsp.to_json_string()
3541
3593
  try:
3542
3594
  json_obj = json.loads(result)
@@ -3763,7 +3815,7 @@ def doModifyDiagDBInstanceConf(args, parsed_globals):
3763
3815
  FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
3764
3816
 
3765
3817
 
3766
- def doKillMySqlThreads(args, parsed_globals):
3818
+ def doUpdateMonitorSwitch(args, parsed_globals):
3767
3819
  g_param = parse_global_arg(parsed_globals)
3768
3820
 
3769
3821
  if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
@@ -3792,11 +3844,11 @@ def doKillMySqlThreads(args, parsed_globals):
3792
3844
  client = mod.DbbrainClient(cred, g_param[OptionsDefine.Region], profile)
3793
3845
  client._sdkVersion += ("_CLI_" + __version__)
3794
3846
  models = MODELS_MAP[g_param[OptionsDefine.Version]]
3795
- model = models.KillMySqlThreadsRequest()
3847
+ model = models.UpdateMonitorSwitchRequest()
3796
3848
  model.from_json_string(json.dumps(args))
3797
3849
  start_time = time.time()
3798
3850
  while True:
3799
- rsp = client.KillMySqlThreads(model)
3851
+ rsp = client.UpdateMonitorSwitch(model)
3800
3852
  result = rsp.to_json_string()
3801
3853
  try:
3802
3854
  json_obj = json.loads(result)
@@ -4303,7 +4355,6 @@ ACTION_MAP = {
4303
4355
  "DescribeMailProfile": doDescribeMailProfile,
4304
4356
  "CreateSchedulerMailProfile": doCreateSchedulerMailProfile,
4305
4357
  "DescribeSqlTemplate": doDescribeSqlTemplate,
4306
- "DescribeNoPrimaryKeyTables": doDescribeNoPrimaryKeyTables,
4307
4358
  "DescribeDBPerfTimeSeries": doDescribeDBPerfTimeSeries,
4308
4359
  "DescribeTopSpaceSchemas": doDescribeTopSpaceSchemas,
4309
4360
  "DescribeMySqlProcessList": doDescribeMySqlProcessList,
@@ -4325,6 +4376,7 @@ ACTION_MAP = {
4325
4376
  "DescribeRedisCmdPerfTimeSeries": doDescribeRedisCmdPerfTimeSeries,
4326
4377
  "DescribeDBAutonomyAction": doDescribeDBAutonomyAction,
4327
4378
  "DescribeDBSpaceStatus": doDescribeDBSpaceStatus,
4379
+ "KillMySqlThreads": doKillMySqlThreads,
4328
4380
  "CreateProxySessionKillTask": doCreateProxySessionKillTask,
4329
4381
  "DescribeHealthScore": doDescribeHealthScore,
4330
4382
  "DescribeRedisTopHotKeys": doDescribeRedisTopHotKeys,
@@ -4363,12 +4415,13 @@ ACTION_MAP = {
4363
4415
  "DescribeRedisSlowLogTopSqls": doDescribeRedisSlowLogTopSqls,
4364
4416
  "CreateKillTask": doCreateKillTask,
4365
4417
  "UpdateAgentSwitch": doUpdateAgentSwitch,
4366
- "UpdateMonitorSwitch": doUpdateMonitorSwitch,
4418
+ "DescribeNoPrimaryKeyTables": doDescribeNoPrimaryKeyTables,
4419
+ "DescribeMetricTopProxies": doDescribeMetricTopProxies,
4367
4420
  "DescribeUserSqlAdvice": doDescribeUserSqlAdvice,
4368
4421
  "DescribeSqlFilters": doDescribeSqlFilters,
4369
4422
  "DescribeTopSpaceTables": doDescribeTopSpaceTables,
4370
4423
  "ModifyDiagDBInstanceConf": doModifyDiagDBInstanceConf,
4371
- "KillMySqlThreads": doKillMySqlThreads,
4424
+ "UpdateMonitorSwitch": doUpdateMonitorSwitch,
4372
4425
  "DescribeSlowLogTopSqls": doDescribeSlowLogTopSqls,
4373
4426
  "DescribeDBDiagReportContent": doDescribeDBDiagReportContent,
4374
4427
  "CreateSqlFilter": doCreateSqlFilter,