tccli 3.0.1355.1__py2.py3-none-any.whl → 3.0.1356.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.
- tccli/__init__.py +1 -1
- tccli/services/bi/v20220105/api.json +1 -1
- tccli/services/billing/v20180709/api.json +11 -11
- tccli/services/cdb/cdb_client.py +53 -0
- tccli/services/cdb/v20170320/api.json +57 -5
- tccli/services/cdb/v20170320/examples.json +8 -0
- tccli/services/cdwch/v20200915/api.json +1 -1
- tccli/services/clb/v20180317/api.json +1 -1
- tccli/services/cynosdb/cynosdb_client.py +53 -0
- tccli/services/cynosdb/v20190107/api.json +107 -0
- tccli/services/cynosdb/v20190107/examples.json +8 -0
- tccli/services/faceid/v20180301/api.json +26 -26
- tccli/services/gme/v20180711/api.json +1 -1
- tccli/services/gs/v20191118/api.json +9 -0
- tccli/services/live/v20180801/api.json +1 -1
- tccli/services/monitor/v20180724/api.json +1 -1
- tccli/services/mps/v20190612/api.json +11 -0
- tccli/services/ocr/v20181119/api.json +9 -0
- tccli/services/teo/teo_client.py +114 -8
- tccli/services/teo/v20220901/api.json +154 -0
- tccli/services/teo/v20220901/examples.json +16 -0
- tccli/services/vpc/v20170312/api.json +5 -5
- {tccli-3.0.1355.1.dist-info → tccli-3.0.1356.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1355.1.dist-info → tccli-3.0.1356.1.dist-info}/RECORD +27 -27
- {tccli-3.0.1355.1.dist-info → tccli-3.0.1356.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1355.1.dist-info → tccli-3.0.1356.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1355.1.dist-info → tccli-3.0.1356.1.dist-info}/license_files/LICENSE +0 -0
tccli/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = '3.0.
|
1
|
+
__version__ = '3.0.1356.1'
|
@@ -6823,7 +6823,7 @@
|
|
6823
6823
|
{
|
6824
6824
|
"disabled": false,
|
6825
6825
|
"document": "产品名称代码",
|
6826
|
-
"example": "
|
6826
|
+
"example": "p_clb",
|
6827
6827
|
"member": "string",
|
6828
6828
|
"name": "BusinessCodes",
|
6829
6829
|
"required": false,
|
@@ -6832,7 +6832,7 @@
|
|
6832
6832
|
{
|
6833
6833
|
"disabled": false,
|
6834
6834
|
"document": "子产品名称代码",
|
6835
|
-
"example": "
|
6835
|
+
"example": "sp_clb",
|
6836
6836
|
"member": "string",
|
6837
6837
|
"name": "ProductCodes",
|
6838
6838
|
"required": false,
|
@@ -6841,7 +6841,7 @@
|
|
6841
6841
|
{
|
6842
6842
|
"disabled": false,
|
6843
6843
|
"document": "地域ID",
|
6844
|
-
"example": "
|
6844
|
+
"example": "1",
|
6845
6845
|
"member": "int64",
|
6846
6846
|
"name": "RegionIds",
|
6847
6847
|
"required": false,
|
@@ -6850,7 +6850,7 @@
|
|
6850
6850
|
{
|
6851
6851
|
"disabled": false,
|
6852
6852
|
"document": "项目ID",
|
6853
|
-
"example": "
|
6853
|
+
"example": "0",
|
6854
6854
|
"member": "int64",
|
6855
6855
|
"name": "ProjectIds",
|
6856
6856
|
"required": false,
|
@@ -6859,7 +6859,7 @@
|
|
6859
6859
|
{
|
6860
6860
|
"disabled": false,
|
6861
6861
|
"document": "付费模式,可选prePay和postPay",
|
6862
|
-
"example": "
|
6862
|
+
"example": "postPay",
|
6863
6863
|
"member": "string",
|
6864
6864
|
"name": "PayModes",
|
6865
6865
|
"required": false,
|
@@ -6868,7 +6868,7 @@
|
|
6868
6868
|
{
|
6869
6869
|
"disabled": false,
|
6870
6870
|
"document": "交易类型",
|
6871
|
-
"example": "
|
6871
|
+
"example": "postpay_deduct_h",
|
6872
6872
|
"member": "string",
|
6873
6873
|
"name": "ActionTypes",
|
6874
6874
|
"required": false,
|
@@ -6904,7 +6904,7 @@
|
|
6904
6904
|
{
|
6905
6905
|
"disabled": false,
|
6906
6906
|
"document": "组件编码",
|
6907
|
-
"example": "
|
6907
|
+
"example": "v_clb_ins",
|
6908
6908
|
"member": "string",
|
6909
6909
|
"name": "ComponentCodes",
|
6910
6910
|
"required": false,
|
@@ -6922,7 +6922,7 @@
|
|
6922
6922
|
{
|
6923
6923
|
"disabled": false,
|
6924
6924
|
"document": "文件类型",
|
6925
|
-
"example": "
|
6925
|
+
"example": "CustomizedDosage",
|
6926
6926
|
"member": "string",
|
6927
6927
|
"name": "FileTypes",
|
6928
6928
|
"required": false,
|
@@ -6931,7 +6931,7 @@
|
|
6931
6931
|
{
|
6932
6932
|
"disabled": false,
|
6933
6933
|
"document": "状态",
|
6934
|
-
"example": "
|
6934
|
+
"example": "1",
|
6935
6935
|
"member": "uint64",
|
6936
6936
|
"name": "Status",
|
6937
6937
|
"required": false,
|
@@ -12291,8 +12291,8 @@
|
|
12291
12291
|
},
|
12292
12292
|
{
|
12293
12293
|
"disabled": false,
|
12294
|
-
"document": "
|
12295
|
-
"example": "
|
12294
|
+
"document": "查询指定产品信息",
|
12295
|
+
"example": "sp_cls",
|
12296
12296
|
"member": "string",
|
12297
12297
|
"name": "ProductCode",
|
12298
12298
|
"required": false,
|
tccli/services/cdb/cdb_client.py
CHANGED
@@ -485,6 +485,58 @@ def doIsolateDBInstance(args, parsed_globals):
|
|
485
485
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
486
486
|
|
487
487
|
|
488
|
+
def doModifyRoGroupVipVport(args, parsed_globals):
|
489
|
+
g_param = parse_global_arg(parsed_globals)
|
490
|
+
|
491
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
492
|
+
cred = credential.CVMRoleCredential()
|
493
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
494
|
+
cred = credential.STSAssumeRoleCredential(
|
495
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
496
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
497
|
+
)
|
498
|
+
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):
|
499
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
500
|
+
else:
|
501
|
+
cred = credential.Credential(
|
502
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
503
|
+
)
|
504
|
+
http_profile = HttpProfile(
|
505
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
506
|
+
reqMethod="POST",
|
507
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
508
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
509
|
+
)
|
510
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
511
|
+
if g_param[OptionsDefine.Language]:
|
512
|
+
profile.language = g_param[OptionsDefine.Language]
|
513
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
514
|
+
client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
|
515
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
516
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
517
|
+
model = models.ModifyRoGroupVipVportRequest()
|
518
|
+
model.from_json_string(json.dumps(args))
|
519
|
+
start_time = time.time()
|
520
|
+
while True:
|
521
|
+
rsp = client.ModifyRoGroupVipVport(model)
|
522
|
+
result = rsp.to_json_string()
|
523
|
+
try:
|
524
|
+
json_obj = json.loads(result)
|
525
|
+
except TypeError as e:
|
526
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
527
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
528
|
+
break
|
529
|
+
cur_time = time.time()
|
530
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
531
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
532
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
533
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
534
|
+
else:
|
535
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
536
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
537
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
538
|
+
|
539
|
+
|
488
540
|
def doDescribeRoGroups(args, parsed_globals):
|
489
541
|
g_param = parse_global_arg(parsed_globals)
|
490
542
|
|
@@ -9033,6 +9085,7 @@ ACTION_MAP = {
|
|
9033
9085
|
"CreateAuditRuleTemplate": doCreateAuditRuleTemplate,
|
9034
9086
|
"BalanceRoGroupLoad": doBalanceRoGroupLoad,
|
9035
9087
|
"IsolateDBInstance": doIsolateDBInstance,
|
9088
|
+
"ModifyRoGroupVipVport": doModifyRoGroupVipVport,
|
9036
9089
|
"DescribeRoGroups": doDescribeRoGroups,
|
9037
9090
|
"DescribeAccounts": doDescribeAccounts,
|
9038
9091
|
"ModifyInstanceTag": doModifyInstanceTag,
|
@@ -1008,6 +1008,13 @@
|
|
1008
1008
|
"output": "ModifyRoGroupInfoResponse",
|
1009
1009
|
"status": "online"
|
1010
1010
|
},
|
1011
|
+
"ModifyRoGroupVipVport": {
|
1012
|
+
"document": "该接口(ModifyRoGroupVipVport)用于修改Ro组的vip和vport。",
|
1013
|
+
"input": "ModifyRoGroupVipVportRequest",
|
1014
|
+
"name": "修改Ro组的vip和vport",
|
1015
|
+
"output": "ModifyRoGroupVipVportResponse",
|
1016
|
+
"status": "online"
|
1017
|
+
},
|
1011
1018
|
"ModifyTimeWindow": {
|
1012
1019
|
"document": "本接口(ModifyTimeWindow)用于更新云数据库实例的维护时间窗口。",
|
1013
1020
|
"input": "ModifyTimeWindowRequest",
|
@@ -17108,8 +17115,8 @@
|
|
17108
17115
|
"members": [
|
17109
17116
|
{
|
17110
17117
|
"disabled": false,
|
17111
|
-
"document": "
|
17112
|
-
"example": "[\"cdb-atjl8gns
|
17118
|
+
"document": "实例 ID 列表。可通过 [DescribeDBInstances](https://cloud.tencent.com/document/product/236/15872) 接口获取。",
|
17119
|
+
"example": "[\"cdb-atjl8gns\"]",
|
17113
17120
|
"member": "string",
|
17114
17121
|
"name": "InstanceIds",
|
17115
17122
|
"required": true,
|
@@ -17126,7 +17133,7 @@
|
|
17126
17133
|
},
|
17127
17134
|
{
|
17128
17135
|
"disabled": false,
|
17129
|
-
"document": "模板
|
17136
|
+
"document": "模板 ID,ParamList 和 TemplateId 必须至少传其中之一。可通过 [DescribeParamTemplateInfo](https://cloud.tencent.com/document/product/236/32660) 接口获取。",
|
17130
17137
|
"example": "99",
|
17131
17138
|
"member": "int64",
|
17132
17139
|
"name": "TemplateId",
|
@@ -17190,7 +17197,7 @@
|
|
17190
17197
|
"members": [
|
17191
17198
|
{
|
17192
17199
|
"disabled": false,
|
17193
|
-
"document": "要修改密码复杂度的实例 ID
|
17200
|
+
"document": "要修改密码复杂度的实例 ID。可通过 [DescribeDBInstances](https://cloud.tencent.com/document/product/236/15872) 接口获取。\n说明:支持输入多个实例 ID 进行修改。",
|
17194
17201
|
"example": "[\"cdb-93hvfe1d\"]",
|
17195
17202
|
"member": "string",
|
17196
17203
|
"name": "InstanceIds",
|
@@ -17199,7 +17206,7 @@
|
|
17199
17206
|
},
|
17200
17207
|
{
|
17201
17208
|
"disabled": false,
|
17202
|
-
"document": "要修改的密码复杂度的选项。每一个选项是以组合形式写入的,一个组合包括 Name 和 CurrentValue,其中 Name 表示对应选项的参数名,CurrentValue 表示参数值。例如:[{\"Name\": \"validate_password.length\", \"CurrentValue\": \"10\"}],表示将密码的最小字符数修改为10。\n说明:不同数据库版本的实例,支持修改的密码复杂度的选项如下。\n1. MySQL 8.0:\n选项 validate_password.policy,表示密码复杂度的开关,值为 LOW 时表示关闭;值为 MEDIUM
|
17209
|
+
"document": "要修改的密码复杂度的选项。每一个选项是以组合形式写入的,一个组合包括 Name 和 CurrentValue,其中 Name 表示对应选项的参数名,CurrentValue 表示参数值。例如:[{\"Name\": \"validate_password.length\", \"CurrentValue\": \"10\"}],表示将密码的最小字符数修改为10。\n说明:不同数据库版本的实例,支持修改的密码复杂度的选项如下。\n1. MySQL 8.0:\n选项 validate_password.policy,表示密码复杂度的开关,值为 LOW 时表示关闭;值为 MEDIUM 时表示开启。\n选项 validate_password.length,表示密码总长度的最小字符数。\n选项 validate_password.mixed_case_count,表示小写和大写字母的最小字符数。\n选项 validate_password.number_count,表示数字的最小字符数。\n选项 validate_password.special_char_count,表示特殊字符的最小字符数。\n2. MySQL 5.6、MySQL 5.7:\n选项 validate_password_policy,表示密码复杂度的开关,值为 LOW 时表示关闭;值为 MEDIUM 时表示开启。\n选项 validate_password_length,表示密码总长度的最小字符数。\n选项 validate_password_mixed_case_count,表示小写和大写字母的最小字符数。\n选项 validate_password_number_count,表示数字的最小字符数。\n选项 validate_password_special_char_count,表示特殊字符的最小字符数。",
|
17203
17210
|
"example": "[{\"Name\": \"validate_password.length\",\"CurrentValue\": \"10\"}]",
|
17204
17211
|
"member": "Parameter",
|
17205
17212
|
"name": "ParamList",
|
@@ -17592,6 +17599,51 @@
|
|
17592
17599
|
],
|
17593
17600
|
"type": "object"
|
17594
17601
|
},
|
17602
|
+
"ModifyRoGroupVipVportRequest": {
|
17603
|
+
"document": "ModifyRoGroupVipVport请求参数结构体",
|
17604
|
+
"members": [
|
17605
|
+
{
|
17606
|
+
"disabled": false,
|
17607
|
+
"document": "RO组的ID。",
|
17608
|
+
"example": "cdbrg-***",
|
17609
|
+
"member": "string",
|
17610
|
+
"name": "UGroupId",
|
17611
|
+
"required": true,
|
17612
|
+
"type": "string"
|
17613
|
+
},
|
17614
|
+
{
|
17615
|
+
"disabled": false,
|
17616
|
+
"document": "目标IP。",
|
17617
|
+
"example": "1.2.3.4",
|
17618
|
+
"member": "string",
|
17619
|
+
"name": "DstIp",
|
17620
|
+
"required": false,
|
17621
|
+
"type": "string"
|
17622
|
+
},
|
17623
|
+
{
|
17624
|
+
"disabled": false,
|
17625
|
+
"document": "目标Port。",
|
17626
|
+
"example": "3307",
|
17627
|
+
"member": "int64",
|
17628
|
+
"name": "DstPort",
|
17629
|
+
"required": false,
|
17630
|
+
"type": "int"
|
17631
|
+
}
|
17632
|
+
],
|
17633
|
+
"type": "object"
|
17634
|
+
},
|
17635
|
+
"ModifyRoGroupVipVportResponse": {
|
17636
|
+
"document": "ModifyRoGroupVipVport返回参数结构体",
|
17637
|
+
"members": [
|
17638
|
+
{
|
17639
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
17640
|
+
"member": "string",
|
17641
|
+
"name": "RequestId",
|
17642
|
+
"type": "string"
|
17643
|
+
}
|
17644
|
+
],
|
17645
|
+
"type": "object"
|
17646
|
+
},
|
17595
17647
|
"ModifyTimeWindowRequest": {
|
17596
17648
|
"document": "ModifyTimeWindow请求参数结构体",
|
17597
17649
|
"members": [
|
@@ -1212,6 +1212,14 @@
|
|
1212
1212
|
"title": "重新均衡RO组内实例的权重"
|
1213
1213
|
}
|
1214
1214
|
],
|
1215
|
+
"ModifyRoGroupVipVport": [
|
1216
|
+
{
|
1217
|
+
"document": "修改Ro组的vip和vport",
|
1218
|
+
"input": "POST / HTTP/1.1\nHost: cdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: ModifyRoGroupVipVport\n<公共请求参数>\n\n{\n \"UGroupId\": \"cdbrg-***\",\n \"DstIp\": \"1.2.3.4\",\n \"DstPort\": \"3307\"\n}",
|
1219
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"6EF60BEC-0242-43AF-BB20-270359FB54A7\"\n }\n}",
|
1220
|
+
"title": "修改Ro组的vip和vport"
|
1221
|
+
}
|
1222
|
+
],
|
1215
1223
|
"ModifyTimeWindow": [
|
1216
1224
|
{
|
1217
1225
|
"document": "",
|
@@ -1777,7 +1777,7 @@
|
|
1777
1777
|
},
|
1778
1778
|
{
|
1779
1779
|
"disabled": false,
|
1780
|
-
"document": "
|
1780
|
+
"document": "集群名称,当ApiType取值为GET_SYSTEM_USERS,GET_PRIVILEGE_USERS,GET_CLUSTER_DATABASES,GET_CLUSTER_TABLES 时,此参数必填",
|
1781
1781
|
"example": "default",
|
1782
1782
|
"member": "string",
|
1783
1783
|
"name": "Cluster",
|
@@ -3299,7 +3299,7 @@
|
|
3299
3299
|
},
|
3300
3300
|
{
|
3301
3301
|
"disabled": false,
|
3302
|
-
"document": "Target是否放通来自CLB的流量。开启放通(true):只验证CLB上的安全组;不开启放通(false):需同时验证CLB和后端实例上的安全组。",
|
3302
|
+
"document": "Target是否放通来自CLB的流量。开启放通(true):只验证CLB上的安全组;不开启放通(false):需同时验证CLB和后端实例上的安全组。IPv6 CLB安全组默认放通,不需要传此参数。",
|
3303
3303
|
"example": "true",
|
3304
3304
|
"member": "bool",
|
3305
3305
|
"name": "LoadBalancerPassToTarget",
|
@@ -121,6 +121,58 @@ def doDescribeBackupConfig(args, parsed_globals):
|
|
121
121
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
122
122
|
|
123
123
|
|
124
|
+
def doReplayInstanceAuditLog(args, parsed_globals):
|
125
|
+
g_param = parse_global_arg(parsed_globals)
|
126
|
+
|
127
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
128
|
+
cred = credential.CVMRoleCredential()
|
129
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
130
|
+
cred = credential.STSAssumeRoleCredential(
|
131
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
132
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
133
|
+
)
|
134
|
+
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):
|
135
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
136
|
+
else:
|
137
|
+
cred = credential.Credential(
|
138
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
139
|
+
)
|
140
|
+
http_profile = HttpProfile(
|
141
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
142
|
+
reqMethod="POST",
|
143
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
144
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
145
|
+
)
|
146
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
147
|
+
if g_param[OptionsDefine.Language]:
|
148
|
+
profile.language = g_param[OptionsDefine.Language]
|
149
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
150
|
+
client = mod.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
151
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
152
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
153
|
+
model = models.ReplayInstanceAuditLogRequest()
|
154
|
+
model.from_json_string(json.dumps(args))
|
155
|
+
start_time = time.time()
|
156
|
+
while True:
|
157
|
+
rsp = client.ReplayInstanceAuditLog(model)
|
158
|
+
result = rsp.to_json_string()
|
159
|
+
try:
|
160
|
+
json_obj = json.loads(result)
|
161
|
+
except TypeError as e:
|
162
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
163
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
164
|
+
break
|
165
|
+
cur_time = time.time()
|
166
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
167
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
168
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
169
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
170
|
+
else:
|
171
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
172
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
173
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
174
|
+
|
175
|
+
|
124
176
|
def doModifyBinlogConfig(args, parsed_globals):
|
125
177
|
g_param = parse_global_arg(parsed_globals)
|
126
178
|
|
@@ -8610,6 +8662,7 @@ MODELS_MAP = {
|
|
8610
8662
|
ACTION_MAP = {
|
8611
8663
|
"ResumeServerless": doResumeServerless,
|
8612
8664
|
"DescribeBackupConfig": doDescribeBackupConfig,
|
8665
|
+
"ReplayInstanceAuditLog": doReplayInstanceAuditLog,
|
8613
8666
|
"ModifyBinlogConfig": doModifyBinlogConfig,
|
8614
8667
|
"CreateProxyEndPoint": doCreateProxyEndPoint,
|
8615
8668
|
"ModifyResourcePackageClusters": doModifyResourcePackageClusters,
|
@@ -1022,6 +1022,13 @@
|
|
1022
1022
|
"output": "RenewClustersResponse",
|
1023
1023
|
"status": "online"
|
1024
1024
|
},
|
1025
|
+
"ReplayInstanceAuditLog": {
|
1026
|
+
"document": "回放实例审计日志",
|
1027
|
+
"input": "ReplayInstanceAuditLogRequest",
|
1028
|
+
"name": "回放实例审计日志",
|
1029
|
+
"output": "ReplayInstanceAuditLogResponse",
|
1030
|
+
"status": "online"
|
1031
|
+
},
|
1025
1032
|
"ResetAccountPassword": {
|
1026
1033
|
"document": "本接口(ResetAccountPassword)用于修改数据库账号密码。",
|
1027
1034
|
"input": "ResetAccountPasswordRequest",
|
@@ -20156,6 +20163,106 @@
|
|
20156
20163
|
],
|
20157
20164
|
"type": "object"
|
20158
20165
|
},
|
20166
|
+
"ReplayInstanceAuditLogRequest": {
|
20167
|
+
"document": "ReplayInstanceAuditLog请求参数结构体",
|
20168
|
+
"members": [
|
20169
|
+
{
|
20170
|
+
"disabled": false,
|
20171
|
+
"document": "源集群id",
|
20172
|
+
"example": "cynosdbmysql-8j1jtwkv",
|
20173
|
+
"member": "string",
|
20174
|
+
"name": "SourceClusterId",
|
20175
|
+
"required": true,
|
20176
|
+
"type": "string"
|
20177
|
+
},
|
20178
|
+
{
|
20179
|
+
"disabled": false,
|
20180
|
+
"document": "源实例id",
|
20181
|
+
"example": "cynosdbmysql-ins-2fbftt98",
|
20182
|
+
"member": "string",
|
20183
|
+
"name": "SourceInstanceId",
|
20184
|
+
"required": true,
|
20185
|
+
"type": "string"
|
20186
|
+
},
|
20187
|
+
{
|
20188
|
+
"disabled": false,
|
20189
|
+
"document": "目标集群id\n目标集群必须为原始集群三天内克隆出的集群。",
|
20190
|
+
"example": "cynosdbmysql-kwoft68f",
|
20191
|
+
"member": "string",
|
20192
|
+
"name": "TargetClusterId",
|
20193
|
+
"required": true,
|
20194
|
+
"type": "string"
|
20195
|
+
},
|
20196
|
+
{
|
20197
|
+
"disabled": false,
|
20198
|
+
"document": "目标实例id",
|
20199
|
+
"example": "cynosdbmysql-ins-431w3zh0",
|
20200
|
+
"member": "string",
|
20201
|
+
"name": "TargetInstanceId",
|
20202
|
+
"required": true,
|
20203
|
+
"type": "string"
|
20204
|
+
},
|
20205
|
+
{
|
20206
|
+
"disabled": false,
|
20207
|
+
"document": "用户名.需要host为%的用户名",
|
20208
|
+
"example": "root",
|
20209
|
+
"member": "string",
|
20210
|
+
"name": "TargetUserName",
|
20211
|
+
"required": true,
|
20212
|
+
"type": "string"
|
20213
|
+
},
|
20214
|
+
{
|
20215
|
+
"disabled": false,
|
20216
|
+
"document": "密码",
|
20217
|
+
"example": "aws@123",
|
20218
|
+
"member": "string",
|
20219
|
+
"name": "TargetPassword",
|
20220
|
+
"required": true,
|
20221
|
+
"type": "string"
|
20222
|
+
},
|
20223
|
+
{
|
20224
|
+
"disabled": false,
|
20225
|
+
"document": "开始时间。时间格式为:yyyy-DD-mm hh:mm:ss",
|
20226
|
+
"example": "2025-06-26 14:00:00",
|
20227
|
+
"member": "string",
|
20228
|
+
"name": "StartTime",
|
20229
|
+
"required": true,
|
20230
|
+
"type": "string"
|
20231
|
+
},
|
20232
|
+
{
|
20233
|
+
"disabled": false,
|
20234
|
+
"document": "结束时间。时间格式为:yyyy-DD-mm hh:mm:ss",
|
20235
|
+
"example": "2025-06-26 14:20:00",
|
20236
|
+
"member": "string",
|
20237
|
+
"name": "EndTime",
|
20238
|
+
"required": true,
|
20239
|
+
"type": "string"
|
20240
|
+
}
|
20241
|
+
],
|
20242
|
+
"type": "object"
|
20243
|
+
},
|
20244
|
+
"ReplayInstanceAuditLogResponse": {
|
20245
|
+
"document": "ReplayInstanceAuditLog返回参数结构体",
|
20246
|
+
"members": [
|
20247
|
+
{
|
20248
|
+
"disabled": false,
|
20249
|
+
"document": "任务id",
|
20250
|
+
"example": "678",
|
20251
|
+
"member": "int64",
|
20252
|
+
"name": "TaskId",
|
20253
|
+
"output_required": true,
|
20254
|
+
"type": "int",
|
20255
|
+
"value_allowed_null": false
|
20256
|
+
},
|
20257
|
+
{
|
20258
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
20259
|
+
"member": "string",
|
20260
|
+
"name": "RequestId",
|
20261
|
+
"type": "string"
|
20262
|
+
}
|
20263
|
+
],
|
20264
|
+
"type": "object"
|
20265
|
+
},
|
20159
20266
|
"ResetAccountPasswordRequest": {
|
20160
20267
|
"document": "ResetAccountPassword请求参数结构体",
|
20161
20268
|
"members": [
|
@@ -1198,6 +1198,14 @@
|
|
1198
1198
|
"title": "续费集群"
|
1199
1199
|
}
|
1200
1200
|
],
|
1201
|
+
"ReplayInstanceAuditLog": [
|
1202
|
+
{
|
1203
|
+
"document": "回放实例审计日志",
|
1204
|
+
"input": "POST / HTTP/1.1\nHost: cynosdb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: DescribeTasks\n<公共请求参数>\n\n{\n \"StartTime\": \"2025-06-26 14:00:00\",\n \"EndTime\": \"2025-06-26 16:00:00\",\n \"SourceClusterId\": \"cynosdbmysql-8j1jtwkv\",\n \"SourceInstanceId\": \"cynosdbmysql-ins-2fbftt98\",\n \"TargetClusterId\": \"cynosdbmysql-kwoft68f\",\n \"TargetInstanceId\": \"cynosdbmysql-ins-431w3zh0\",\n \"TargetUserName\": \"root\",\n \"TargetPassword\": \"Calebzhao123.\"\n}",
|
1205
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"y7rtl807j00d80oid44s34c100ros3iy\",\n \"TaskId\": 678\n }\n}",
|
1206
|
+
"title": "回放实例审计日志"
|
1207
|
+
}
|
1208
|
+
],
|
1201
1209
|
"ResetAccountPassword": [
|
1202
1210
|
{
|
1203
1211
|
"document": "修改数据库账号密码",
|