tccli 3.0.1235.1__py2.py3-none-any.whl → 3.0.1237.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/services/apm/v20210622/api.json +15 -15
- tccli/services/apm/v20210622/examples.json +16 -22
- tccli/services/ba/v20200720/api.json +3 -2
- tccli/services/billing/v20180709/api.json +2 -2
- tccli/services/cam/v20190116/api.json +84 -69
- tccli/services/cam/v20190116/examples.json +7 -7
- tccli/services/ccc/v20200210/api.json +9 -0
- tccli/services/cdb/cdb_client.py +53 -0
- tccli/services/cdb/v20170320/api.json +43 -0
- tccli/services/cdb/v20170320/examples.json +8 -0
- tccli/services/cfg/v20210820/api.json +21 -0
- tccli/services/cloudapp/v20220530/api.json +10 -0
- tccli/services/cloudaudit/v20190319/api.json +43 -36
- tccli/services/cloudaudit/v20190319/examples.json +2 -2
- tccli/services/cvm/v20170312/api.json +5 -5
- tccli/services/cynosdb/cynosdb_client.py +53 -0
- tccli/services/cynosdb/v20190107/api.json +110 -0
- tccli/services/cynosdb/v20190107/examples.json +8 -0
- tccli/services/domain/v20180808/api.json +18 -17
- tccli/services/domain/v20180808/examples.json +22 -22
- tccli/services/ess/ess_client.py +57 -4
- tccli/services/ess/v20201111/api.json +53 -0
- tccli/services/ess/v20201111/examples.json +8 -0
- tccli/services/essbasic/v20210526/api.json +11 -1
- tccli/services/gwlb/v20240906/api.json +16 -16
- tccli/services/gwlb/v20240906/examples.json +2 -2
- tccli/services/hunyuan/v20230901/api.json +6 -6
- tccli/services/iotexplorer/iotexplorer_client.py +53 -0
- tccli/services/iotexplorer/v20190423/api.json +129 -4
- tccli/services/iotexplorer/v20190423/examples.json +14 -0
- tccli/services/lcic/v20220817/api.json +3 -3
- tccli/services/lcic/v20220817/examples.json +2 -2
- tccli/services/lighthouse/v20200324/examples.json +2 -2
- tccli/services/live/v20180801/api.json +5 -5
- tccli/services/mongodb/v20180408/api.json +52 -40
- tccli/services/mongodb/v20180408/examples.json +4 -4
- tccli/services/mongodb/v20190725/api.json +119 -109
- tccli/services/mongodb/v20190725/examples.json +5 -5
- tccli/services/monitor/v20180724/examples.json +1 -1
- tccli/services/mqtt/v20240516/api.json +1 -1
- tccli/services/mqtt/v20240516/examples.json +1 -1
- tccli/services/pts/v20210728/api.json +8 -0
- tccli/services/sms/v20210111/api.json +1 -1
- tccli/services/ssl/v20191205/examples.json +1 -1
- tccli/services/sts/v20180813/examples.json +1 -1
- tccli/services/tdid/v20210519/api.json +30 -38
- tccli/services/tdid/v20210519/examples.json +5 -5
- tccli/services/trocket/v20230308/api.json +3 -3
- tccli/services/vpc/v20170312/api.json +22 -3
- tccli/services/vpc/v20170312/examples.json +1 -1
- tccli/services/vrs/v20200824/api.json +71 -8
- tccli/services/vrs/v20200824/examples.json +8 -0
- tccli/services/vrs/vrs_client.py +53 -0
- tccli/services/wedata/v20210820/api.json +550 -40
- tccli/services/wedata/v20210820/examples.json +10 -4
- {tccli-3.0.1235.1.dist-info → tccli-3.0.1237.1.dist-info}/METADATA +2 -2
- {tccli-3.0.1235.1.dist-info → tccli-3.0.1237.1.dist-info}/RECORD +61 -61
- {tccli-3.0.1235.1.dist-info → tccli-3.0.1237.1.dist-info}/WHEEL +0 -0
- {tccli-3.0.1235.1.dist-info → tccli-3.0.1237.1.dist-info}/entry_points.txt +0 -0
- {tccli-3.0.1235.1.dist-info → tccli-3.0.1237.1.dist-info}/license_files/LICENSE +0 -0
tccli/services/cdb/cdb_client.py
CHANGED
@@ -5529,6 +5529,58 @@ def doCloseCDBProxy(args, parsed_globals):
|
|
5529
5529
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5530
5530
|
|
5531
5531
|
|
5532
|
+
def doModifyProtectMode(args, parsed_globals):
|
5533
|
+
g_param = parse_global_arg(parsed_globals)
|
5534
|
+
|
5535
|
+
if g_param[OptionsDefine.UseCVMRole.replace('-', '_')]:
|
5536
|
+
cred = credential.CVMRoleCredential()
|
5537
|
+
elif g_param[OptionsDefine.RoleArn.replace('-', '_')] and g_param[OptionsDefine.RoleSessionName.replace('-', '_')]:
|
5538
|
+
cred = credential.STSAssumeRoleCredential(
|
5539
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.RoleArn.replace('-', '_')],
|
5540
|
+
g_param[OptionsDefine.RoleSessionName.replace('-', '_')], endpoint=g_param["sts_cred_endpoint"]
|
5541
|
+
)
|
5542
|
+
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):
|
5543
|
+
cred = credential.DefaultTkeOIDCRoleArnProvider().get_credentials()
|
5544
|
+
else:
|
5545
|
+
cred = credential.Credential(
|
5546
|
+
g_param[OptionsDefine.SecretId], g_param[OptionsDefine.SecretKey], g_param[OptionsDefine.Token]
|
5547
|
+
)
|
5548
|
+
http_profile = HttpProfile(
|
5549
|
+
reqTimeout=60 if g_param[OptionsDefine.Timeout] is None else int(g_param[OptionsDefine.Timeout]),
|
5550
|
+
reqMethod="POST",
|
5551
|
+
endpoint=g_param[OptionsDefine.Endpoint],
|
5552
|
+
proxy=g_param[OptionsDefine.HttpsProxy.replace('-', '_')]
|
5553
|
+
)
|
5554
|
+
profile = ClientProfile(httpProfile=http_profile, signMethod="HmacSHA256")
|
5555
|
+
if g_param[OptionsDefine.Language]:
|
5556
|
+
profile.language = g_param[OptionsDefine.Language]
|
5557
|
+
mod = CLIENT_MAP[g_param[OptionsDefine.Version]]
|
5558
|
+
client = mod.CdbClient(cred, g_param[OptionsDefine.Region], profile)
|
5559
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
5560
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
5561
|
+
model = models.ModifyProtectModeRequest()
|
5562
|
+
model.from_json_string(json.dumps(args))
|
5563
|
+
start_time = time.time()
|
5564
|
+
while True:
|
5565
|
+
rsp = client.ModifyProtectMode(model)
|
5566
|
+
result = rsp.to_json_string()
|
5567
|
+
try:
|
5568
|
+
json_obj = json.loads(result)
|
5569
|
+
except TypeError as e:
|
5570
|
+
json_obj = json.loads(result.decode('utf-8')) # python3.3
|
5571
|
+
if not g_param[OptionsDefine.Waiter] or search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj) == g_param['OptionsDefine.WaiterInfo']['to']:
|
5572
|
+
break
|
5573
|
+
cur_time = time.time()
|
5574
|
+
if cur_time - start_time >= g_param['OptionsDefine.WaiterInfo']['timeout']:
|
5575
|
+
raise ClientError('Request timeout, wait `%s` to `%s` timeout, last request is %s' %
|
5576
|
+
(g_param['OptionsDefine.WaiterInfo']['expr'], g_param['OptionsDefine.WaiterInfo']['to'],
|
5577
|
+
search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj)))
|
5578
|
+
else:
|
5579
|
+
print('Inquiry result is %s.' % search(g_param['OptionsDefine.WaiterInfo']['expr'], json_obj))
|
5580
|
+
time.sleep(g_param['OptionsDefine.WaiterInfo']['interval'])
|
5581
|
+
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
5582
|
+
|
5583
|
+
|
5532
5584
|
def doDescribeAsyncRequestInfo(args, parsed_globals):
|
5533
5585
|
g_param = parse_global_arg(parsed_globals)
|
5534
5586
|
|
@@ -8974,6 +9026,7 @@ ACTION_MAP = {
|
|
8974
9026
|
"ResetPassword": doResetPassword,
|
8975
9027
|
"ModifyLocalBinlogConfig": doModifyLocalBinlogConfig,
|
8976
9028
|
"CloseCDBProxy": doCloseCDBProxy,
|
9029
|
+
"ModifyProtectMode": doModifyProtectMode,
|
8977
9030
|
"DescribeAsyncRequestInfo": doDescribeAsyncRequestInfo,
|
8978
9031
|
"DescribeAuditLogs": doDescribeAuditLogs,
|
8979
9032
|
"DescribeDBInstanceRebootTime": doDescribeDBInstanceRebootTime,
|
@@ -973,6 +973,13 @@
|
|
973
973
|
"output": "ModifyParamTemplateResponse",
|
974
974
|
"status": "online"
|
975
975
|
},
|
976
|
+
"ModifyProtectMode": {
|
977
|
+
"document": "该接口(ModifyProtectMode)用于修改实例的同步方式。",
|
978
|
+
"input": "ModifyProtectModeRequest",
|
979
|
+
"name": "修改实例的同步方式",
|
980
|
+
"output": "ModifyProtectModeResponse",
|
981
|
+
"status": "online"
|
982
|
+
},
|
976
983
|
"ModifyRemoteBackupConfig": {
|
977
984
|
"document": "本接口(ModifyRemoteBackupConfig)用于修改数据库异地备份配置信息。",
|
978
985
|
"input": "ModifyRemoteBackupConfigRequest",
|
@@ -16823,6 +16830,42 @@
|
|
16823
16830
|
],
|
16824
16831
|
"type": "object"
|
16825
16832
|
},
|
16833
|
+
"ModifyProtectModeRequest": {
|
16834
|
+
"document": "ModifyProtectMode请求参数结构体",
|
16835
|
+
"members": [
|
16836
|
+
{
|
16837
|
+
"disabled": false,
|
16838
|
+
"document": "无",
|
16839
|
+
"example": "1",
|
16840
|
+
"member": "int64",
|
16841
|
+
"name": "ProtectMode",
|
16842
|
+
"required": true,
|
16843
|
+
"type": "int"
|
16844
|
+
},
|
16845
|
+
{
|
16846
|
+
"disabled": false,
|
16847
|
+
"document": "实例ID。",
|
16848
|
+
"example": "cdb-ezq1vzem",
|
16849
|
+
"member": "string",
|
16850
|
+
"name": "InstanceId",
|
16851
|
+
"required": true,
|
16852
|
+
"type": "string"
|
16853
|
+
}
|
16854
|
+
],
|
16855
|
+
"type": "object"
|
16856
|
+
},
|
16857
|
+
"ModifyProtectModeResponse": {
|
16858
|
+
"document": "ModifyProtectMode返回参数结构体",
|
16859
|
+
"members": [
|
16860
|
+
{
|
16861
|
+
"document": "唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。",
|
16862
|
+
"member": "string",
|
16863
|
+
"name": "RequestId",
|
16864
|
+
"type": "string"
|
16865
|
+
}
|
16866
|
+
],
|
16867
|
+
"type": "object"
|
16868
|
+
},
|
16826
16869
|
"ModifyRemoteBackupConfigRequest": {
|
16827
16870
|
"document": "ModifyRemoteBackupConfig请求参数结构体",
|
16828
16871
|
"members": [
|
@@ -1154,6 +1154,14 @@
|
|
1154
1154
|
"title": "修改参数模板"
|
1155
1155
|
}
|
1156
1156
|
],
|
1157
|
+
"ModifyProtectMode": [
|
1158
|
+
{
|
1159
|
+
"document": "",
|
1160
|
+
"input": "https://cdb.tencentcloudapi.com/?Action=ModifyProtectMode\n&ProtectMode=1\n&InstanceId=cdb-ezq1vzem\n&<公共请求参数>",
|
1161
|
+
"output": "{\n \"Response\": {\n \"RequestId\": \"6EF60BEC-0242-43AF-BB20-270359FB54A7\"\n }\n}",
|
1162
|
+
"title": "修改实例同步方式"
|
1163
|
+
}
|
1164
|
+
],
|
1157
1165
|
"ModifyRemoteBackupConfig": [
|
1158
1166
|
{
|
1159
1167
|
"document": "无",
|
@@ -1750,6 +1750,16 @@
|
|
1750
1750
|
"output_required": false,
|
1751
1751
|
"type": "int",
|
1752
1752
|
"value_allowed_null": true
|
1753
|
+
},
|
1754
|
+
{
|
1755
|
+
"disabled": false,
|
1756
|
+
"document": "1.接入层 2.逻辑层 3. 数据层",
|
1757
|
+
"example": "1",
|
1758
|
+
"member": "int64",
|
1759
|
+
"name": "ArchLayer",
|
1760
|
+
"output_required": false,
|
1761
|
+
"type": "int",
|
1762
|
+
"value_allowed_null": false
|
1753
1763
|
}
|
1754
1764
|
],
|
1755
1765
|
"usage": "out"
|
@@ -3953,6 +3963,17 @@
|
|
3953
3963
|
"required": false,
|
3954
3964
|
"type": "string",
|
3955
3965
|
"value_allowed_null": true
|
3966
|
+
},
|
3967
|
+
{
|
3968
|
+
"disabled": false,
|
3969
|
+
"document": "故障表现",
|
3970
|
+
"example": "故障表现xxxx",
|
3971
|
+
"member": "string",
|
3972
|
+
"name": "FailurePerformance",
|
3973
|
+
"output_required": false,
|
3974
|
+
"required": false,
|
3975
|
+
"type": "string",
|
3976
|
+
"value_allowed_null": false
|
3956
3977
|
}
|
3957
3978
|
],
|
3958
3979
|
"usage": "both"
|
@@ -177,6 +177,16 @@
|
|
177
177
|
"output_required": false,
|
178
178
|
"type": "string",
|
179
179
|
"value_allowed_null": false
|
180
|
+
},
|
181
|
+
{
|
182
|
+
"disabled": false,
|
183
|
+
"document": "授权的类型:Standard正式版/Development开发版/Trial体验版",
|
184
|
+
"example": "Standard",
|
185
|
+
"member": "string",
|
186
|
+
"name": "LicenseType",
|
187
|
+
"output_required": true,
|
188
|
+
"type": "string",
|
189
|
+
"value_allowed_null": false
|
180
190
|
}
|
181
191
|
],
|
182
192
|
"usage": "out"
|
@@ -146,56 +146,61 @@
|
|
146
146
|
"members": [
|
147
147
|
{
|
148
148
|
"disabled": false,
|
149
|
-
"document": "
|
150
|
-
"example": "
|
149
|
+
"document": "输入框类型\n注意:此字段可能返回 null,表示取不到有效值。",
|
150
|
+
"example": "type",
|
151
151
|
"member": "string",
|
152
152
|
"name": "LabelType",
|
153
|
+
"output_required": false,
|
153
154
|
"required": true,
|
154
155
|
"type": "string",
|
155
|
-
"value_allowed_null":
|
156
|
+
"value_allowed_null": true
|
156
157
|
},
|
157
158
|
{
|
158
159
|
"disabled": false,
|
159
|
-
"document": "
|
160
|
-
"example": "
|
160
|
+
"document": "初始化展示\n注意:此字段可能返回 null,表示取不到有效值。",
|
161
|
+
"example": "12",
|
161
162
|
"member": "string",
|
162
163
|
"name": "Starter",
|
164
|
+
"output_required": false,
|
163
165
|
"required": true,
|
164
166
|
"type": "string",
|
165
|
-
"value_allowed_null":
|
167
|
+
"value_allowed_null": true
|
166
168
|
},
|
167
169
|
{
|
168
170
|
"disabled": false,
|
169
|
-
"document": "
|
170
|
-
"example": "
|
171
|
+
"document": "展示排序\n注意:此字段可能返回 null,表示取不到有效值。",
|
172
|
+
"example": "desc",
|
171
173
|
"member": "int64",
|
172
174
|
"name": "Order",
|
175
|
+
"output_required": false,
|
173
176
|
"required": true,
|
174
177
|
"type": "int",
|
175
|
-
"value_allowed_null":
|
178
|
+
"value_allowed_null": true
|
176
179
|
},
|
177
180
|
{
|
178
181
|
"disabled": false,
|
179
|
-
"document": "AttributeKey
|
180
|
-
"example": "
|
182
|
+
"document": "AttributeKey值\n注意:此字段可能返回 null,表示取不到有效值。",
|
183
|
+
"example": "tag1",
|
181
184
|
"member": "string",
|
182
185
|
"name": "Value",
|
186
|
+
"output_required": false,
|
183
187
|
"required": true,
|
184
188
|
"type": "string",
|
185
|
-
"value_allowed_null":
|
189
|
+
"value_allowed_null": true
|
186
190
|
},
|
187
191
|
{
|
188
192
|
"disabled": false,
|
189
|
-
"document": "
|
190
|
-
"example": "
|
193
|
+
"document": "中文标签\n注意:此字段可能返回 null,表示取不到有效值。",
|
194
|
+
"example": "事件",
|
191
195
|
"member": "string",
|
192
196
|
"name": "Label",
|
197
|
+
"output_required": false,
|
193
198
|
"required": true,
|
194
199
|
"type": "string",
|
195
|
-
"value_allowed_null":
|
200
|
+
"value_allowed_null": true
|
196
201
|
}
|
197
202
|
],
|
198
|
-
"usage": "
|
203
|
+
"usage": "both"
|
199
204
|
},
|
200
205
|
"AuditSummary": {
|
201
206
|
"document": "跟踪集概览",
|
@@ -1131,7 +1136,7 @@
|
|
1131
1136
|
{
|
1132
1137
|
"disabled": false,
|
1133
1138
|
"document": "网站类型,取值范围是zh和en。如果不传值默认zh",
|
1134
|
-
"example": "
|
1139
|
+
"example": "ap-guangzhou",
|
1135
1140
|
"member": "string",
|
1136
1141
|
"name": "WebsiteType",
|
1137
1142
|
"required": false,
|
@@ -1146,10 +1151,10 @@
|
|
1146
1151
|
{
|
1147
1152
|
"disabled": false,
|
1148
1153
|
"document": "AttributeKey的有效取值范围",
|
1149
|
-
"example": "
|
1154
|
+
"example": " [ { \"Label\": \"只读\", \"Value\": \"ReadOnly\", \"Starter\": \"选择只读值\", \"LabelType\": \"select\", \"Order\": 1 } ]",
|
1150
1155
|
"member": "AttributeKeyDetail",
|
1151
1156
|
"name": "AttributeKeyDetails",
|
1152
|
-
"
|
1157
|
+
"output_required": true,
|
1153
1158
|
"type": "list",
|
1154
1159
|
"value_allowed_null": false
|
1155
1160
|
},
|
@@ -1194,26 +1199,28 @@
|
|
1194
1199
|
"members": [
|
1195
1200
|
{
|
1196
1201
|
"disabled": false,
|
1197
|
-
"document": "
|
1198
|
-
"example": "
|
1202
|
+
"document": "作为密钥更容易辨识,更容易被人看懂的别名\n注意:此字段可能返回 null,表示取不到有效值。",
|
1203
|
+
"example": "audit_name",
|
1199
1204
|
"member": "string",
|
1200
1205
|
"name": "Alias",
|
1206
|
+
"output_required": false,
|
1201
1207
|
"required": false,
|
1202
1208
|
"type": "string",
|
1203
|
-
"value_allowed_null":
|
1209
|
+
"value_allowed_null": true
|
1204
1210
|
},
|
1205
1211
|
{
|
1206
1212
|
"disabled": false,
|
1207
|
-
"document": "CMK
|
1208
|
-
"example": "
|
1213
|
+
"document": "CMK的全局唯一标识\n注意:此字段可能返回 null,表示取不到有效值。",
|
1214
|
+
"example": "key_34244",
|
1209
1215
|
"member": "string",
|
1210
1216
|
"name": "KeyId",
|
1217
|
+
"output_required": false,
|
1211
1218
|
"required": false,
|
1212
1219
|
"type": "string",
|
1213
|
-
"value_allowed_null":
|
1220
|
+
"value_allowed_null": true
|
1214
1221
|
}
|
1215
1222
|
],
|
1216
|
-
"usage": "
|
1223
|
+
"usage": "both"
|
1217
1224
|
},
|
1218
1225
|
"ListAuditsRequest": {
|
1219
1226
|
"document": "ListAudits请求参数结构体",
|
@@ -1248,7 +1255,7 @@
|
|
1248
1255
|
{
|
1249
1256
|
"disabled": false,
|
1250
1257
|
"document": "站点类型。zh表示中国区,en表示国际区。默认中国区。",
|
1251
|
-
"example": "
|
1258
|
+
"example": "zh",
|
1252
1259
|
"member": "string",
|
1253
1260
|
"name": "WebsiteType",
|
1254
1261
|
"required": false,
|
@@ -1263,7 +1270,7 @@
|
|
1263
1270
|
{
|
1264
1271
|
"disabled": false,
|
1265
1272
|
"document": "操作审计支持的cmq的可用区",
|
1266
|
-
"example": "
|
1273
|
+
"example": " [ { \"CmqRegion\": \"sh\", \"CmqRegionName\": \"上海\" }, { \"CmqRegion\": \"hk\", \"CmqRegionName\": \"香港\" } ]",
|
1267
1274
|
"member": "CmqRegionInfo",
|
1268
1275
|
"name": "EnableRegions",
|
1269
1276
|
"output_required": true,
|
@@ -1322,7 +1329,7 @@
|
|
1322
1329
|
{
|
1323
1330
|
"disabled": false,
|
1324
1331
|
"document": "Kms地域",
|
1325
|
-
"example": "
|
1332
|
+
"example": "ap-guangzhou",
|
1326
1333
|
"member": "string",
|
1327
1334
|
"name": "KmsRegion",
|
1328
1335
|
"required": true,
|
@@ -1358,7 +1365,7 @@
|
|
1358
1365
|
"example": "1",
|
1359
1366
|
"member": "int64",
|
1360
1367
|
"name": "TotalCount",
|
1361
|
-
"
|
1368
|
+
"output_required": true,
|
1362
1369
|
"type": "int",
|
1363
1370
|
"value_allowed_null": false
|
1364
1371
|
},
|
@@ -1368,7 +1375,7 @@
|
|
1368
1375
|
"example": "[xx,xx]",
|
1369
1376
|
"member": "KeyMetadata",
|
1370
1377
|
"name": "KeyMetadatas",
|
1371
|
-
"
|
1378
|
+
"output_required": true,
|
1372
1379
|
"type": "list",
|
1373
1380
|
"value_allowed_null": false
|
1374
1381
|
},
|
@@ -1414,7 +1421,7 @@
|
|
1414
1421
|
{
|
1415
1422
|
"disabled": false,
|
1416
1423
|
"document": "查看更多日志的凭证",
|
1417
|
-
"example": "
|
1424
|
+
"example": "79ba1f24-c21c-4858-a8e6-a9266b0599ff",
|
1418
1425
|
"member": "string",
|
1419
1426
|
"name": "NextToken",
|
1420
1427
|
"required": false,
|
@@ -1447,7 +1454,7 @@
|
|
1447
1454
|
{
|
1448
1455
|
"disabled": false,
|
1449
1456
|
"document": "查看更多日志的凭证\n注意:此字段可能返回 null,表示取不到有效值。",
|
1450
|
-
"example": "
|
1457
|
+
"example": "79ba1f24-c21c-4858-a8e6-a9266b0599ff",
|
1451
1458
|
"member": "string",
|
1452
1459
|
"name": "NextToken",
|
1453
1460
|
"output_required": true,
|
@@ -1457,7 +1464,7 @@
|
|
1457
1464
|
{
|
1458
1465
|
"disabled": false,
|
1459
1466
|
"document": "日志集合\n注意:此字段可能返回 null,表示取不到有效值。",
|
1460
|
-
"example": "
|
1467
|
+
"example": "[ { \"CloudAuditEvent\": \"*\", \"EventId\": \"e92a92fc259c4a9333d2a7ce64d1ef201\", \"EventName\": \"LookupEvents\", \"EventTime\": \"2019-03-20 12:36:27\", \"SecretId\": \"XXX\", \"ErrorCode\": 0, \"RequestID\": \"15936031437374_1553056587.6815_v2\", \"AccountID\": 1150691759, \"SourceIPAddress\": \"*\", \"EventSource\": \"cloudaudit.api.tencentyun.com/v2/index.php\", \"EventRegion\": \"ap-guangzhou\", \"Resources\": { \"ResourceName\": \"\", \"ResourceType\": \"cloudaudit\" }, \"Username\": \"root\", \"ResourceTypeCn\": \"操作审计\", \"EventNameCn\": \"检索日志\" } ]",
|
1461
1468
|
"member": "Event",
|
1462
1469
|
"name": "Events",
|
1463
1470
|
"output_required": true,
|
@@ -1754,7 +1761,7 @@
|
|
1754
1761
|
{
|
1755
1762
|
"disabled": false,
|
1756
1763
|
"document": "跟踪集名称",
|
1757
|
-
"example": "
|
1764
|
+
"example": "audit_log",
|
1758
1765
|
"member": "string",
|
1759
1766
|
"name": "AuditName",
|
1760
1767
|
"required": true,
|
@@ -1772,7 +1779,7 @@
|
|
1772
1779
|
"example": "1",
|
1773
1780
|
"member": "int64",
|
1774
1781
|
"name": "IsSuccess",
|
1775
|
-
"
|
1782
|
+
"output_required": true,
|
1776
1783
|
"type": "int",
|
1777
1784
|
"value_allowed_null": false
|
1778
1785
|
},
|
@@ -107,7 +107,7 @@
|
|
107
107
|
"LookUpEvents": [
|
108
108
|
{
|
109
109
|
"document": "用于对操作日志进行检索,便于用户进行查询相关的操作信息。",
|
110
|
-
"input": "https://cloudaudit.tencentcloudapi.com/?Action=LookUpEvents\n&EndTime=1553056687\n&LookupAttributes.0.AttributeKey=AccessKeyId\n&LookupAttributes.0.AttributeValue=
|
110
|
+
"input": "https://cloudaudit.tencentcloudapi.com/?Action=LookUpEvents\n&EndTime=1553056687\n&LookupAttributes.0.AttributeKey=AccessKeyId\n&LookupAttributes.0.AttributeValue=a9266b0599ff\n&StartTime=1553056487\n&<公共请求参数>",
|
111
111
|
"output": "{\n \"Response\": {\n \"Events\": [\n {\n \"CloudAuditEvent\": \"{\\\"actionType\\\":\\\"Read\\\",\\\"apiErrorCode\\\":\\\"\\\",\\\"apiErrorMessage\\\":\\\"\\\",\\\"apiVersion\\\":\\\"2.0\\\",\\\"errorCode\\\":0,\\\"errorMessage\\\":\\\"permission verify\\\",\\\"eventID\\\":\\\"e92a92fc259c4a9333d2a7ce64d1ef201\\\",\\\"eventName\\\":\\\"LookupEvents\\\",\\\"eventRegion\\\":\\\"ap-guangzhou\\\",\\\"eventSource\\\":\\\"cloudaudit.api.tencentyun.com/v2/index.php\\\",\\\"eventTime\\\":\\\"2019-03-20 12:36:27\\\",\\\"eventType\\\":\\\"ConsoleCall\\\",\\\"eventVersion\\\":2,\\\"httpMethod\\\":\\\"POST\\\",\\\"region\\\":\\\"\\\",\\\"requestID\\\":\\\"15936031437374_1553056587.6815_v2\\\",\\\"requestParameters\\\":\\\"{\\\"Action\\\":\\\"LookupEvents\\\",\\\"EndTime\\\":\\\"1553097599\\\",\\\"MaxResults\\\":\\\"10\\\",\\\"Nonce\\\":\\\"36881\\\",\\\"Region\\\":\\\"gz\\\",\\\"RequestClient\\\":\\\"SDK_NODEJS_0.2.1\\\",\\\"RequestOperator\\\":\\\"1150691759\\\",\\\"RequestSource\\\":\\\"MC\\\",\\\"SecretId\\\":\\\"XXX\\\",\\\"StartTime\\\":\\\"1552406400\\\",\\\"Timestamp\\\":\\\"1553056583\\\",\\\"Token\\\":\\\"147d2c5b0319541a13d9fe6ceb5af2aae9b67f6610001\\\",\\\"seqId\\\":\\\"cdb9c38c-7031-bb13-6a9c-cd7641734c8f\\\"}\\\",\\\"resourceName\\\":\\\"\\\",\\\"resourceType\\\":\\\"cloudaudit\\\",\\\"resources\\\":\\\"\\\",\\\"sourceIPAddress\\\":\\\"59.37.125.124\\\",\\\"userAgent\\\":\\\"\\\",\\\"userIdentity\\\":{\\\"userName\\\":\\\"root\\\",\\\"type\\\":\\\"Root\\\",\\\"secretId\\\":\\\"XXX\\\",\\\"accountId\\\":1150691759,\\\"principalId\\\":1150691759,\\\"sessionContext\\\":{\\\"expireTime\\\":\\\"2019-03-20 13:04:46\\\",\\\"hasPolicyFilter\\\":0,\\\"extraInfo\\\":\\\"\\\",\\\"interfaceName\\\":\\\"\\\",\\\"ownerUin\\\":1150691759,\\\"ua\\\":\\\"27513f02ea3ab649f0cacb6476df54eb\\\",\\\"mfa\\\":0,\\\"userIp\\\":\\\"59.37.125.124\\\",\\\"mfaExpireTime\\\":\\\"2019-03-20 12:34:46\\\",\\\"uin\\\":1150691759,\\\"token\\\":\\\"147d2c5b0319541a13d9fe6ceb5af2aae9b67f6610001\\\",\\\"appId\\\":1251840716,\\\"policyFilter\\\":\\\"\\\"}}}\",\n \"EventId\": \"e92a92fc259c4a9333d2a7ce64d1ef201\",\n \"EventName\": \"LookupEvents\",\n \"EventTime\": \"2019-03-20 12:36:27\",\n \"SecretId\": \"XXX\",\n \"ErrorCode\": 0,\n \"RequestID\": \"15936031437374_1553056587.6815_v2\",\n \"AccountID\": 1150691759,\n \"SourceIPAddress\": \"59.37.125.124\",\n \"EventSource\": \"cloudaudit.api.tencentyun.com/v2/index.php\",\n \"EventRegion\": \"ap-guangzhou\",\n \"Resources\": {\n \"ResourceName\": \"\",\n \"ResourceType\": \"cloudaudit\"\n },\n \"Username\": \"root\",\n \"ResourceTypeCn\": \"操作审计\",\n \"EventNameCn\": \"检索日志\"\n }\n ],\n \"NextToken\": \"DnF1ZXJ5VGhlbkZldGNoDwAAAAAAACBuFjNoRHJ5YTd4U1B5YWY4c1ZmMmxBQWcAAAAAAAAgnBZZZkZoYy04LVJJeVpJNnZJS2hIVTdRAAAAAAAAI1QWYk5mQmZXTzhTWXFNZjFMVlhHY1RjdwAAAAAAAB9sFmhZbV8xbm1FUXE2NGVDQndWSlNoMncAAAAAAAAd9BZOelN1aGMycFNydUVEQ0dQbzdCcEZBAAAAAAAALroWMTh4c00xalhRbk9wR0NsYWZvV20tQQAAAAAAACCdFllmRmhjLTgtUkl5Wkk2dklLaEhVN1EAAAAAAAAuuRYxOHhzTTFqWFFuT3BHQ2xhZm9XbS1BAAAAAAAAIJ4WWWZGaGMtOC1SSXlaSTZ2SUtoSFU3UQAAAAAAAB81FnN5aTBfTWJKU25HdXZuMWxsRkdJZ3cAAAAAAAApMhZ1UjdybjlCY1NRYUZVYWRub2x4YW9RAAAAAAAAHzQWc3lpMF9NYkpTbkd1dm4xbGxGR0lndwAAAAAAAB31Fk56U3VoYzJwU3J1RURDR1BvN0JwRkEAAAAAAAAfbRZoWW1fMW5tRVFxNjRlQ0J3VkpTaDJ3AAAAAAAAH24WaFltXzFubUVRcTY0ZUNCd1ZKU2gydw==\",\n \"ListOver\": true,\n \"TotalCount\": 1,\n \"RequestId\": \"91e2998d-edc0-4ba0-a76d-cebbbfd99391\"\n }\n}",
|
112
112
|
"title": "日志检索"
|
113
113
|
}
|
@@ -131,7 +131,7 @@
|
|
131
131
|
"StartLogging": [
|
132
132
|
{
|
133
133
|
"document": "开启跟踪集",
|
134
|
-
"input": "https://cloudaudit.tencentcloudapi.com/?Action=StartLogging\n&AuditName=
|
134
|
+
"input": "https://cloudaudit.tencentcloudapi.com/?Action=StartLogging\n&AuditName=audit_log\n&<公共请求参数>",
|
135
135
|
"output": "{\n \"Response\": {\n \"IsSuccess\": 1,\n \"RequestId\": \"94ced030-d9df-4fb3-9894-7accd0c29d23\"\n }\n}",
|
136
136
|
"title": "开启跟踪集"
|
137
137
|
}
|
@@ -9250,7 +9250,7 @@
|
|
9250
9250
|
},
|
9251
9251
|
{
|
9252
9252
|
"disabled": false,
|
9253
|
-
"document": "私有网络相关信息配置,通过该参数指定私有网络的ID,子网ID,私有网络ip等信息。<br><li>当指定私有网络ID和子网ID
|
9253
|
+
"document": "私有网络相关信息配置,通过该参数指定私有网络的ID,子网ID,私有网络ip等信息。<br><li>当指定私有网络ID和子网ID(子网必须在实例所在的可用区)与指定实例所在私有网络不一致时,会将实例迁移至指定的私有网络的子网下。</li><li>可通过`PrivateIpAddresses`指定私有网络子网IP,若需指定则所有已指定的实例均需要指定子网IP,此时`InstanceIds`与`PrivateIpAddresses`一一对应。</li><li>不指定`PrivateIpAddresses`时随机分配私有网络子网IP。</li>",
|
9254
9254
|
"example": "无",
|
9255
9255
|
"member": "VirtualPrivateCloud",
|
9256
9256
|
"name": "VirtualPrivateCloud",
|
@@ -9259,8 +9259,8 @@
|
|
9259
9259
|
},
|
9260
9260
|
{
|
9261
9261
|
"disabled": false,
|
9262
|
-
"document": "是否对运行中的实例选择强制关机。默认为
|
9263
|
-
"example": "
|
9262
|
+
"document": "是否对运行中的实例选择强制关机。默认为true。",
|
9263
|
+
"example": "false",
|
9264
9264
|
"member": "bool",
|
9265
9265
|
"name": "ForceStop",
|
9266
9266
|
"required": false,
|
@@ -9268,8 +9268,8 @@
|
|
9268
9268
|
},
|
9269
9269
|
{
|
9270
9270
|
"disabled": false,
|
9271
|
-
"document": "是否保留主机名。默认为
|
9272
|
-
"example": "
|
9271
|
+
"document": "是否保留主机名。默认为false。",
|
9272
|
+
"example": "false",
|
9273
9273
|
"member": "bool",
|
9274
9274
|
"name": "ReserveHostName",
|
9275
9275
|
"required": false,
|
@@ -3033,6 +3033,58 @@ def doModifyClusterDatabase(args, parsed_globals):
|
|
3033
3033
|
FormatOutput.output("action", json_obj, g_param[OptionsDefine.Output], g_param[OptionsDefine.Filter])
|
3034
3034
|
|
3035
3035
|
|
3036
|
+
def doDescribeClusterDatabaseTables(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.CynosdbClient(cred, g_param[OptionsDefine.Region], profile)
|
3063
|
+
client._sdkVersion += ("_CLI_" + __version__)
|
3064
|
+
models = MODELS_MAP[g_param[OptionsDefine.Version]]
|
3065
|
+
model = models.DescribeClusterDatabaseTablesRequest()
|
3066
|
+
model.from_json_string(json.dumps(args))
|
3067
|
+
start_time = time.time()
|
3068
|
+
while True:
|
3069
|
+
rsp = client.DescribeClusterDatabaseTables(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 doModifyParamTemplate(args, parsed_globals):
|
3037
3089
|
g_param = parse_global_arg(parsed_globals)
|
3038
3090
|
|
@@ -8094,6 +8146,7 @@ ACTION_MAP = {
|
|
8094
8146
|
"CloseWan": doCloseWan,
|
8095
8147
|
"DescribeProjectSecurityGroups": doDescribeProjectSecurityGroups,
|
8096
8148
|
"ModifyClusterDatabase": doModifyClusterDatabase,
|
8149
|
+
"DescribeClusterDatabaseTables": doDescribeClusterDatabaseTables,
|
8097
8150
|
"ModifyParamTemplate": doModifyParamTemplate,
|
8098
8151
|
"ModifyResourcePackagesDeductionPriority": doModifyResourcePackagesDeductionPriority,
|
8099
8152
|
"DescribeInstanceParams": doDescribeInstanceParams,
|