tccli 3.0.1089.1__py2.py3-none-any.whl → 3.0.1091.1__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- tccli/__init__.py +1 -1
- tccli/examples/ccc/v20200210/UploadIvrAudio.md +16 -1
- tccli/examples/csip/v20221121/DescribeAssetViewVulRiskList.md +5 -302
- tccli/examples/gs/v20191118/StartPublishStreamToCSS.md +20 -0
- tccli/examples/mongodb/v20190725/FlashBackDBInstance.md +29 -0
- tccli/examples/organization/v20210331/AddOrganizationNode.md +1 -1
- tccli/examples/organization/v20210331/BindOrganizationMemberAuthAccount.md +3 -3
- tccli/examples/organization/v20210331/CancelOrganizationMemberAuthAccount.md +3 -3
- tccli/examples/organization/v20210331/CheckAccountDelete.md +5 -5
- tccli/examples/organization/v20210331/CreateOrganizationMember.md +2 -2
- tccli/examples/organization/v20210331/CreateOrganizationMemberAuthIdentity.md +1 -1
- tccli/examples/organization/v20210331/CreateOrganizationMemberPolicy.md +5 -5
- tccli/examples/organization/v20210331/CreateOrganizationMembersPolicy.md +2 -2
- tccli/examples/organization/v20210331/DeleteOrganizationMembers.md +1 -1
- tccli/examples/organization/v20210331/DeleteOrganizationNodes.md +1 -1
- tccli/examples/organization/v20210331/DeleteShareUnitResources.md +1 -1
- tccli/examples/organization/v20210331/DescribeOrganizationMemberAuthAccounts.md +2 -2
- tccli/examples/organization/v20210331/DescribeOrganizationMemberPolicies.md +1 -1
- tccli/examples/organization/v20210331/MoveOrganizationNodeMembers.md +2 -2
- tccli/examples/organization/v20210331/QuitOrganization.md +1 -1
- tccli/examples/organization/v20210331/UpdateOrganizationMember.md +2 -2
- tccli/examples/organization/v20210331/UpdateOrganizationMemberEmailBind.md +3 -3
- tccli/examples/organization/v20210331/UpdateOrganizationNode.md +3 -2
- tccli/examples/sqlserver/v20180328/DescribeDBInstancesAttribute.md +7 -1
- tccli/examples/ssl/v20191205/DeployCertificateInstance.md +28 -3
- tccli/examples/tione/v20211111/CreateBatchTask.md +1 -0
- tccli/services/aiart/v20221229/api.json +1 -1
- tccli/services/asr/v20190614/api.json +6 -6
- tccli/services/bri/v20190328/api.json +2 -2
- tccli/services/captcha/v20190722/api.json +75 -31
- tccli/services/ccc/v20200210/api.json +10 -0
- tccli/services/ccc/v20200210/examples.json +1 -1
- tccli/services/cfg/v20210820/api.json +30 -33
- tccli/services/csip/v20221121/api.json +17 -11
- tccli/services/csip/v20221121/examples.json +1 -1
- tccli/services/dts/v20211206/api.json +22 -2
- tccli/services/ess/v20201111/api.json +19 -1
- tccli/services/essbasic/v20210526/api.json +31 -13
- tccli/services/faceid/v20180301/api.json +4 -4
- tccli/services/gs/gs_client.py +53 -0
- tccli/services/gs/v20191118/api.json +43 -0
- tccli/services/gs/v20191118/examples.json +8 -0
- tccli/services/iss/v20230517/api.json +38 -0
- tccli/services/lcic/v20220817/api.json +5 -5
- tccli/services/lighthouse/v20200324/api.json +1 -1
- tccli/services/live/v20180801/api.json +12 -12
- tccli/services/mongodb/mongodb_client.py +67 -14
- tccli/services/mongodb/v20190725/api.json +161 -0
- tccli/services/mongodb/v20190725/examples.json +8 -0
- tccli/services/monitor/monitor_client.py +0 -53
- tccli/services/monitor/v20180724/api.json +0 -52
- tccli/services/monitor/v20180724/examples.json +0 -8
- tccli/services/organization/v20210331/api.json +128 -119
- tccli/services/organization/v20210331/examples.json +24 -24
- tccli/services/soe/v20180724/api.json +13 -13
- tccli/services/sqlserver/v20180328/api.json +46 -0
- tccli/services/sqlserver/v20180328/examples.json +1 -1
- tccli/services/ssl/v20191205/api.json +11 -2
- tccli/services/ssl/v20191205/examples.json +9 -3
- tccli/services/tione/v20211111/api.json +36 -3
- tccli/services/tione/v20211111/examples.json +1 -1
- tccli/services/trtc/v20190722/api.json +36 -9
- {tccli-3.0.1089.1.dist-info → tccli-3.0.1091.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1089.1.dist-info → tccli-3.0.1091.1.dist-info}/RECORD +67 -65
- {tccli-3.0.1089.1.dist-info → tccli-3.0.1091.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1089.1.dist-info → tccli-3.0.1091.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1089.1.dist-info → tccli-3.0.1091.1.dist-info}/license_files/LICENSE +0 -0
@@ -799,7 +799,7 @@ def doDescribeAsyncRequestInfo(args, parsed_globals):
|
|
799
799
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
800
800
|
|
801
801
|
|
802
|
-
def
|
802
|
+
def doCreateAccountUser(args, parsed_globals):
|
803
803
|
g_param = parse_global_arg(parsed_globals)
|
804
804
|
|
805
805
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -828,11 +828,11 @@ def doModifyDBInstanceNetworkAddress(args, parsed_globals):
|
|
828
828
|
client = mod.MongodbClient(cred, g_param[OptionsDefine.Region], profile)
|
829
829
|
client._sdkVersion += ("_CLI_" + __version__)
|
830
830
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
831
|
-
model = models.
|
831
|
+
model = models.CreateAccountUserRequest()
|
832
832
|
model.from_json_string(json.dumps(args))
|
833
833
|
start_time = time.time()
|
834
834
|
while True:
|
835
|
-
rsp = client.
|
835
|
+
rsp = client.CreateAccountUser(model)
|
836
836
|
result = rsp.to_json_string()
|
837
837
|
try:
|
838
838
|
json_obj = json.loads(result)
|
@@ -1111,6 +1111,58 @@ def doUpgradeDBInstanceHour(args, parsed_globals):
|
|
1111
1111
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1112
1112
|
|
1113
1113
|
|
1114
|
+
def doFlashBackDBInstance(args, parsed_globals):
|
1115
|
+
g_param = parse_global_arg(parsed_globals)
|
1116
|
+
|
1117
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
1118
|
+
cred = credential.CVMRoleCredential()
|
1119
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
1120
|
+
cred = credential.STSAssumeRoleCredential(
|
1121
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
1122
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
1123
|
+
)
|
1124
|
+
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):
|
1125
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
1126
|
+
else:
|
1127
|
+
cred = credential.Credential(
|
1128
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
1129
|
+
)
|
1130
|
+
http_profile = HttpProfile(
|
1131
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
1132
|
+
reqMethod="POST",
|
1133
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
1134
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
1135
|
+
)
|
1136
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
1137
|
+
if g_param[OptionsDefine.Language]:
|
1138
|
+
profile.language = g_param[OptionsDefine.Language]
|
1139
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
1140
|
+
client = mod.MongodbClient(cred, g_param[OptionsDefine.Region], profile)
|
1141
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
1142
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1143
|
+
model = models.FlashBackDBInstanceRequest()
|
1144
|
+
model.from_json_string(json.dumps(args))
|
1145
|
+
start_time = time.time()
|
1146
|
+
while True:
|
1147
|
+
rsp = client.FlashBackDBInstance(model)
|
1148
|
+
result = rsp.to_json_string()
|
1149
|
+
try:
|
1150
|
+
json_obj = json.loads(result)
|
1151
|
+
except TypeError as e:
|
1152
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
1153
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
1154
|
+
break
|
1155
|
+
cur_time = time.time()
|
1156
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
1157
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
1158
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
1159
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
1160
|
+
else:
|
1161
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
1162
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
1163
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1164
|
+
|
1165
|
+
|
1114
1166
|
def doDescribeDBInstances(args, parsed_globals):
|
1115
1167
|
g_param = parse_global_arg(parsed_globals)
|
1116
1168
|
|
@@ -1319,7 +1371,7 @@ def doDescribeSlowLogs(args, parsed_globals):
|
|
1319
1371
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1320
1372
|
|
1321
1373
|
|
1322
|
-
def
|
1374
|
+
def doModifyDBInstanceNetworkAddress(args, parsed_globals):
|
1323
1375
|
g_param = parse_global_arg(parsed_globals)
|
1324
1376
|
|
1325
1377
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1348,11 +1400,11 @@ def doCreateDBInstance(args, parsed_globals):
|
|
1348
1400
|
client = mod.MongodbClient(cred, g_param[OptionsDefine.Region], profile)
|
1349
1401
|
client._sdkVersion += ("_CLI_" + __version__)
|
1350
1402
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1351
|
-
model = models.
|
1403
|
+
model = models.ModifyDBInstanceNetworkAddressRequest()
|
1352
1404
|
model.from_json_string(json.dumps(args))
|
1353
1405
|
start_time = time.time()
|
1354
1406
|
while True:
|
1355
|
-
rsp = client.
|
1407
|
+
rsp = client.ModifyDBInstanceNetworkAddress(model)
|
1356
1408
|
result = rsp.to_json_string()
|
1357
1409
|
try:
|
1358
1410
|
json_obj = json.loads(result)
|
@@ -1371,7 +1423,7 @@ def doCreateDBInstance(args, parsed_globals):
|
|
1371
1423
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1372
1424
|
|
1373
1425
|
|
1374
|
-
def
|
1426
|
+
def doCreateDBInstance(args, parsed_globals):
|
1375
1427
|
g_param = parse_global_arg(parsed_globals)
|
1376
1428
|
|
1377
1429
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1400,11 +1452,11 @@ def doModifyDBInstanceSpec(args, parsed_globals):
|
|
1400
1452
|
client = mod.MongodbClient(cred, g_param[OptionsDefine.Region], profile)
|
1401
1453
|
client._sdkVersion += ("_CLI_" + __version__)
|
1402
1454
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1403
|
-
model = models.
|
1455
|
+
model = models.CreateDBInstanceRequest()
|
1404
1456
|
model.from_json_string(json.dumps(args))
|
1405
1457
|
start_time = time.time()
|
1406
1458
|
while True:
|
1407
|
-
rsp = client.
|
1459
|
+
rsp = client.CreateDBInstance(model)
|
1408
1460
|
result = rsp.to_json_string()
|
1409
1461
|
try:
|
1410
1462
|
json_obj = json.loads(result)
|
@@ -1423,7 +1475,7 @@ def doModifyDBInstanceSpec(args, parsed_globals):
|
|
1423
1475
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
1424
1476
|
|
1425
1477
|
|
1426
|
-
def
|
1478
|
+
def doModifyDBInstanceSpec(args, parsed_globals):
|
1427
1479
|
g_param = parse_global_arg(parsed_globals)
|
1428
1480
|
|
1429
1481
|
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
@@ -1452,11 +1504,11 @@ def doCreateAccountUser(args, parsed_globals):
|
|
1452
1504
|
client = mod.MongodbClient(cred, g_param[OptionsDefine.Region], profile)
|
1453
1505
|
client._sdkVersion += ("_CLI_" + __version__)
|
1454
1506
|
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
1455
|
-
model = models.
|
1507
|
+
model = models.ModifyDBInstanceSpecRequest()
|
1456
1508
|
model.from_json_string(json.dumps(args))
|
1457
1509
|
start_time = time.time()
|
1458
1510
|
while True:
|
1459
|
-
rsp = client.
|
1511
|
+
rsp = client.ModifyDBInstanceSpec(model)
|
1460
1512
|
result = rsp.to_json_string()
|
1461
1513
|
try:
|
1462
1514
|
json_obj = json.loads(result)
|
@@ -2283,19 +2335,20 @@ ACTION_MAP = {
|
|
2283
2335
|
"IsolateDBInstance": doIsolateDBInstance,
|
2284
2336
|
"InquirePriceModifyDBInstanceSpec": doInquirePriceModifyDBInstanceSpec,
|
2285
2337
|
"DescribeAsyncRequestInfo": doDescribeAsyncRequestInfo,
|
2286
|
-
"
|
2338
|
+
"CreateAccountUser": doCreateAccountUser,
|
2287
2339
|
"CreateDBInstanceHour": doCreateDBInstanceHour,
|
2288
2340
|
"TerminateDBInstance": doTerminateDBInstance,
|
2289
2341
|
"RenewDBInstances": doRenewDBInstances,
|
2290
2342
|
"CreateBackupDownloadTask": doCreateBackupDownloadTask,
|
2291
2343
|
"UpgradeDBInstanceHour": doUpgradeDBInstanceHour,
|
2344
|
+
"FlashBackDBInstance": doFlashBackDBInstance,
|
2292
2345
|
"DescribeDBInstances": doDescribeDBInstances,
|
2293
2346
|
"OfflineIsolatedDBInstance": doOfflineIsolatedDBInstance,
|
2294
2347
|
"DescribeSlowLogPatterns": doDescribeSlowLogPatterns,
|
2295
2348
|
"DescribeSlowLogs": doDescribeSlowLogs,
|
2349
|
+
"ModifyDBInstanceNetworkAddress": doModifyDBInstanceNetworkAddress,
|
2296
2350
|
"CreateDBInstance": doCreateDBInstance,
|
2297
2351
|
"ModifyDBInstanceSpec": doModifyDBInstanceSpec,
|
2298
|
-
"CreateAccountUser": doCreateAccountUser,
|
2299
2352
|
"DescribeInstanceParams": doDescribeInstanceParams,
|
2300
2353
|
"DescribeSpecInfo": doDescribeSpecInfo,
|
2301
2354
|
"DescribeBackupDownloadTask": doDescribeBackupDownloadTask,
|
@@ -147,6 +147,13 @@
|
|
147
147
|
"output": "DescribeSpecInfoResponse",
|
148
148
|
"status": "online"
|
149
149
|
},
|
150
|
+
"FlashBackDBInstance": {
|
151
|
+
"document": "该接口用于发起按 Key 闪回任务,依据数据的闪回 Key(默认为 id)对数据进行极速回档,快速恢复业务。\n**说明:按 Key 闪回于2023年09月11日正式进行公测,在此期间,该接口仅对公测用户开放。**",
|
152
|
+
"input": "FlashBackDBInstanceRequest",
|
153
|
+
"name": "按 Key 回档",
|
154
|
+
"output": "FlashBackDBInstanceResponse",
|
155
|
+
"status": "online"
|
156
|
+
},
|
150
157
|
"FlushInstanceRouterConfig": {
|
151
158
|
"document": "在所有mongos上执行FlushRouterConfig命令",
|
152
159
|
"input": "FlushInstanceRouterConfigRequest",
|
@@ -2747,6 +2754,160 @@
|
|
2747
2754
|
],
|
2748
2755
|
"type": "object"
|
2749
2756
|
},
|
2757
|
+
"FBKeyValue": {
|
2758
|
+
"document": "按key回档,用于筛选数据的键值对",
|
2759
|
+
"members": [
|
2760
|
+
{
|
2761
|
+
"disabled": false,
|
2762
|
+
"document": "用于按key回档过滤的key",
|
2763
|
+
"example": "无",
|
2764
|
+
"member": "string",
|
2765
|
+
"name": "Key",
|
2766
|
+
"required": false,
|
2767
|
+
"type": "string"
|
2768
|
+
},
|
2769
|
+
{
|
2770
|
+
"disabled": false,
|
2771
|
+
"document": "用于按key回档过滤的value",
|
2772
|
+
"example": "无",
|
2773
|
+
"member": "string",
|
2774
|
+
"name": "Value",
|
2775
|
+
"required": false,
|
2776
|
+
"type": "string"
|
2777
|
+
}
|
2778
|
+
],
|
2779
|
+
"usage": "in"
|
2780
|
+
},
|
2781
|
+
"FlashBackDBInstanceRequest": {
|
2782
|
+
"document": "FlashBackDBInstance请求参数结构体",
|
2783
|
+
"members": [
|
2784
|
+
{
|
2785
|
+
"disabled": false,
|
2786
|
+
"document": "开启按 Key 回档的实例 ID。",
|
2787
|
+
"example": "cmgo-igjysqkr",
|
2788
|
+
"member": "string",
|
2789
|
+
"name": "InstanceId",
|
2790
|
+
"required": true,
|
2791
|
+
"type": "string"
|
2792
|
+
},
|
2793
|
+
{
|
2794
|
+
"disabled": false,
|
2795
|
+
"document": "源数据想恢复到的时间。",
|
2796
|
+
"example": "2023-08-04 14:00:00",
|
2797
|
+
"member": "string",
|
2798
|
+
"name": "TargetFlashbackTime",
|
2799
|
+
"required": true,
|
2800
|
+
"type": "string"
|
2801
|
+
},
|
2802
|
+
{
|
2803
|
+
"disabled": false,
|
2804
|
+
"document": "源数据所在的库表信息。",
|
2805
|
+
"example": "无",
|
2806
|
+
"member": "FlashbackDatabase",
|
2807
|
+
"name": "TargetDatabases",
|
2808
|
+
"required": true,
|
2809
|
+
"type": "list"
|
2810
|
+
},
|
2811
|
+
{
|
2812
|
+
"disabled": false,
|
2813
|
+
"document": "数据最终写入的实例 ID。",
|
2814
|
+
"example": "无",
|
2815
|
+
"member": "string",
|
2816
|
+
"name": "TargetInstanceId",
|
2817
|
+
"required": false,
|
2818
|
+
"type": "string"
|
2819
|
+
}
|
2820
|
+
],
|
2821
|
+
"type": "object"
|
2822
|
+
},
|
2823
|
+
"FlashBackDBInstanceResponse": {
|
2824
|
+
"document": "FlashBackDBInstance返回参数结构体",
|
2825
|
+
"members": [
|
2826
|
+
{
|
2827
|
+
"disabled": false,
|
2828
|
+
"document": "回档数据异步任务 ID。\n注意:此字段可能返回 null,表示取不到有效值。",
|
2829
|
+
"example": "无",
|
2830
|
+
"member": "int64",
|
2831
|
+
"name": "FlowId",
|
2832
|
+
"output_required": false,
|
2833
|
+
"type": "int",
|
2834
|
+
"value_allowed_null": true
|
2835
|
+
},
|
2836
|
+
{
|
2837
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
2838
|
+
"member": "string",
|
2839
|
+
"name": "RequestId",
|
2840
|
+
"type": "string"
|
2841
|
+
}
|
2842
|
+
],
|
2843
|
+
"type": "object"
|
2844
|
+
},
|
2845
|
+
"FlashbackCollection": {
|
2846
|
+
"document": "按key回档,源数据所在的表",
|
2847
|
+
"members": [
|
2848
|
+
{
|
2849
|
+
"disabled": false,
|
2850
|
+
"document": "按key回档指定的集合名",
|
2851
|
+
"example": "无",
|
2852
|
+
"member": "string",
|
2853
|
+
"name": "CollectionName",
|
2854
|
+
"required": true,
|
2855
|
+
"type": "string"
|
2856
|
+
},
|
2857
|
+
{
|
2858
|
+
"disabled": false,
|
2859
|
+
"document": "按key回档到的目标集合名",
|
2860
|
+
"example": "无",
|
2861
|
+
"member": "string",
|
2862
|
+
"name": "TargetResultCollectionName",
|
2863
|
+
"required": true,
|
2864
|
+
"type": "string"
|
2865
|
+
},
|
2866
|
+
{
|
2867
|
+
"disabled": false,
|
2868
|
+
"document": "上传到cos的文件的value所对应的key值",
|
2869
|
+
"example": "无",
|
2870
|
+
"member": "string",
|
2871
|
+
"name": "FilterKey",
|
2872
|
+
"required": true,
|
2873
|
+
"type": "string"
|
2874
|
+
},
|
2875
|
+
{
|
2876
|
+
"disabled": false,
|
2877
|
+
"document": "用于按key回档过滤的键值对",
|
2878
|
+
"example": "无",
|
2879
|
+
"member": "FBKeyValue",
|
2880
|
+
"name": "KeyValues",
|
2881
|
+
"required": false,
|
2882
|
+
"type": "list"
|
2883
|
+
}
|
2884
|
+
],
|
2885
|
+
"usage": "in"
|
2886
|
+
},
|
2887
|
+
"FlashbackDatabase": {
|
2888
|
+
"document": "按key回档,源数据所在的库表",
|
2889
|
+
"members": [
|
2890
|
+
{
|
2891
|
+
"disabled": false,
|
2892
|
+
"document": "按key回档源数据所在库",
|
2893
|
+
"example": "无",
|
2894
|
+
"member": "string",
|
2895
|
+
"name": "DBName",
|
2896
|
+
"required": true,
|
2897
|
+
"type": "string"
|
2898
|
+
},
|
2899
|
+
{
|
2900
|
+
"disabled": false,
|
2901
|
+
"document": "按key回档的集群数组",
|
2902
|
+
"example": "无",
|
2903
|
+
"member": "FlashbackCollection",
|
2904
|
+
"name": "Collections",
|
2905
|
+
"required": true,
|
2906
|
+
"type": "list"
|
2907
|
+
}
|
2908
|
+
],
|
2909
|
+
"usage": "in"
|
2910
|
+
},
|
2750
2911
|
"FlushInstanceRouterConfigRequest": {
|
2751
2912
|
"document": "FlushInstanceRouterConfig请求参数结构体",
|
2752
2913
|
"members": [
|
@@ -168,6 +168,14 @@
|
|
168
168
|
"title": "查询云数据库售卖"
|
169
169
|
}
|
170
170
|
],
|
171
|
+
"FlashBackDBInstance": [
|
172
|
+
{
|
173
|
+
"document": "",
|
174
|
+
"input": "POST / HTTP/1.1\nHost: mongodb.tencentcloudapi.com\nContent-Type: application/json\nX-TC-Action: FlashBackDBInstance\n<公共请求参数>\n\n{\n \"InstanceId\": \"cmgo-igjysqkr\",\n \"TargetFlashbackTime\": \"2023-08-04 14:00:00\",\n \"TargetDatabases\": [\n {\n \"DBName\": \"my_test\",\n \"Collections\": [\n {\n \"CollectionName\": \"my_test1\",\n \"KeyValues\": [\n {\n \"Key\": \"name\",\n \"Value\": \"abc\"\n }\n ],\n \"TargetResultCollectionName\": \"my_test_bak0804143230\",\n \"FilterKey\": \"name\"\n }\n ]\n }\n ],\n \"TargetInstanceId\": \"cmgo-05173fe7\"\n}",
|
175
|
+
"output": "{\n \"Response\": {\n \"FlowId\": 1234567,\n \"RequestId\": \"abc\"\n }\n}",
|
176
|
+
"title": "执行按key回档"
|
177
|
+
}
|
178
|
+
],
|
171
179
|
"FlushInstanceRouterConfig": [
|
172
180
|
{
|
173
181
|
"document": "",
|
@@ -4021,58 +4021,6 @@ def doCreateSSOAccount(args, parsed_globals):
|
|
4021
4021
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4022
4022
|
|
4023
4023
|
|
4024
|
-
def doSendCustomAlarmMsg(args, parsed_globals):
|
4025
|
-
g_param = parse_global_arg(parsed_globals)
|
4026
|
-
|
4027
|
-
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
4028
|
-
cred = credential.CVMRoleCredential()
|
4029
|
-
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
4030
|
-
cred = credential.STSAssumeRoleCredential(
|
4031
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
4032
|
-
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
4033
|
-
)
|
4034
|
-
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):
|
4035
|
-
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
4036
|
-
else:
|
4037
|
-
cred = credential.Credential(
|
4038
|
-
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
4039
|
-
)
|
4040
|
-
http_profile = HttpProfile(
|
4041
|
-
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
4042
|
-
reqMethod="POST",
|
4043
|
-
endpoint=g_param[OptionsDefine.Endpoint],
|
4044
|
-
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
4045
|
-
)
|
4046
|
-
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
4047
|
-
if g_param[OptionsDefine.Language]:
|
4048
|
-
profile.language = g_param[OptionsDefine.Language]
|
4049
|
-
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
4050
|
-
client = mod.MonitorClient(cred, g_param[OptionsDefine.Region], profile)
|
4051
|
-
client._sdkVersion += ("_CLI_" + __version__)
|
4052
|
-
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
4053
|
-
model = models.SendCustomAlarmMsgRequest()
|
4054
|
-
model.from_json_string(json.dumps(args))
|
4055
|
-
start_time = time.time()
|
4056
|
-
while True:
|
4057
|
-
rsp = client.SendCustomAlarmMsg(model)
|
4058
|
-
result = rsp.to_json_string()
|
4059
|
-
try:
|
4060
|
-
json_obj = json.loads(result)
|
4061
|
-
except TypeError as e:
|
4062
|
-
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
4063
|
-
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
4064
|
-
break
|
4065
|
-
cur_time = time.time()
|
4066
|
-
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
4067
|
-
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
4068
|
-
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
4069
|
-
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
4070
|
-
else:
|
4071
|
-
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
4072
|
-
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
4073
|
-
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
4074
|
-
|
4075
|
-
|
4076
4024
|
def doModifyAlarmPolicyNotice(args, parsed_globals):
|
4077
4025
|
g_param = parse_global_arg(parsed_globals)
|
4078
4026
|
|
@@ -8321,7 +8269,6 @@ ACTION_MAP = {
|
|
8321
8269
|
"DeleteGrafanaInstance": doDeleteGrafanaInstance,
|
8322
8270
|
"DeletePrometheusConfig": doDeletePrometheusConfig,
|
8323
8271
|
"CreateSSOAccount": doCreateSSOAccount,
|
8324
|
-
"SendCustomAlarmMsg": doSendCustomAlarmMsg,
|
8325
8272
|
"ModifyAlarmPolicyNotice": doModifyAlarmPolicyNotice,
|
8326
8273
|
"EnableGrafanaInternet": doEnableGrafanaInternet,
|
8327
8274
|
"CreateGrafanaNotificationChannel": doCreateGrafanaNotificationChannel,
|
@@ -917,13 +917,6 @@
|
|
917
917
|
"output": "RunPrometheusInstanceResponse",
|
918
918
|
"status": "online"
|
919
919
|
},
|
920
|
-
"SendCustomAlarmMsg": {
|
921
|
-
"document": "发送自定义消息告警",
|
922
|
-
"input": "SendCustomAlarmMsgRequest",
|
923
|
-
"name": "发送自定义消息告警",
|
924
|
-
"output": "SendCustomAlarmMsgResponse",
|
925
|
-
"status": "online"
|
926
|
-
},
|
927
920
|
"SetDefaultAlarmPolicy": {
|
928
921
|
"document": "设置一个策略为该告警策略类型、该项目的默认告警策略。\n同一项目下相同的告警策略类型,就会被设置为非默认。",
|
929
922
|
"input": "SetDefaultAlarmPolicyRequest",
|
@@ -19124,51 +19117,6 @@
|
|
19124
19117
|
],
|
19125
19118
|
"type": "object"
|
19126
19119
|
},
|
19127
|
-
"SendCustomAlarmMsgRequest": {
|
19128
|
-
"document": "SendCustomAlarmMsg请求参数结构体",
|
19129
|
-
"members": [
|
19130
|
-
{
|
19131
|
-
"disabled": false,
|
19132
|
-
"document": "接口模块名,当前取值monitor",
|
19133
|
-
"example": "monitor",
|
19134
|
-
"member": "string",
|
19135
|
-
"name": "Module",
|
19136
|
-
"required": true,
|
19137
|
-
"type": "string"
|
19138
|
-
},
|
19139
|
-
{
|
19140
|
-
"disabled": false,
|
19141
|
-
"document": "消息策略ID,在自定义消息页面配置",
|
19142
|
-
"example": "cm-04rhwvwg",
|
19143
|
-
"member": "string",
|
19144
|
-
"name": "PolicyId",
|
19145
|
-
"required": true,
|
19146
|
-
"type": "string"
|
19147
|
-
},
|
19148
|
-
{
|
19149
|
-
"disabled": false,
|
19150
|
-
"document": "用户想要发送的自定义消息内容",
|
19151
|
-
"example": "xxx",
|
19152
|
-
"member": "string",
|
19153
|
-
"name": "Msg",
|
19154
|
-
"required": true,
|
19155
|
-
"type": "string"
|
19156
|
-
}
|
19157
|
-
],
|
19158
|
-
"type": "object"
|
19159
|
-
},
|
19160
|
-
"SendCustomAlarmMsgResponse": {
|
19161
|
-
"document": "SendCustomAlarmMsg返回参数结构体",
|
19162
|
-
"members": [
|
19163
|
-
{
|
19164
|
-
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
19165
|
-
"member": "string",
|
19166
|
-
"name": "RequestId",
|
19167
|
-
"type": "string"
|
19168
|
-
}
|
19169
|
-
],
|
19170
|
-
"type": "object"
|
19171
|
-
},
|
19172
19120
|
"ServiceDiscoveryItem": {
|
19173
19121
|
"document": "Prometheus 服务发现信息",
|
19174
19122
|
"members": [
|
@@ -1228,14 +1228,6 @@
|
|
1228
1228
|
"title": "初始化实例"
|
1229
1229
|
}
|
1230
1230
|
],
|
1231
|
-
"SendCustomAlarmMsg": [
|
1232
|
-
{
|
1233
|
-
"document": "发送自定义消息告警",
|
1234
|
-
"input": "https://monitor.tencentcloudapi.com/?Action=SendCustomAlarmMsg\r\n&Module=monitor\r\n&PolicyId=cm-04rhwvwg\r\n&Msg=XXXX\r\n&<公共请求参数>",
|
1235
|
-
"output": "{\n \"Response\": {\n \"RequestId\": \"9q1zxtmzw6xqyqriu8run9jf6fnnkdbn\"\n }\n}",
|
1236
|
-
"title": "发送自定义消息告警"
|
1237
|
-
}
|
1238
|
-
],
|
1239
1231
|
"SetDefaultAlarmPolicy": [
|
1240
1232
|
{
|
1241
1233
|
"document": "",
|