tencentcloud-sdk-cdb 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2882 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ require 'json'
18
+
19
+ module TencentCloud
20
+ module Cdb
21
+ module V20170320
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2017-03-20'
26
+ api_endpoint = 'cdb.tencentcloudapi.com'
27
+ sdk_version = 'CDB_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 本接口(AddTimeWindow)用于添加云数据库实例的维护时间窗口,以指定实例在哪些时间段可以自动执行切换访问操作。
33
+
34
+ # @param request: Request instance for AddTimeWindow.
35
+ # @type request: :class:`Tencentcloud::cdb::V20170320::AddTimeWindowRequest`
36
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::AddTimeWindowResponse`
37
+ def AddTimeWindow(request)
38
+ body = send_request('AddTimeWindow', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = AddTimeWindowResponse.new
42
+ model.deserialize(response['Response'])
43
+ model
44
+ else
45
+ code = response['Response']['Error']['Code']
46
+ message = response['Response']['Error']['Message']
47
+ reqid = response['Response']['RequestId']
48
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
49
+ end
50
+ rescue TencentCloud::Common::TencentCloudSDKException => e
51
+ raise e
52
+ rescue StandardError => e
53
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
54
+ end
55
+
56
+ # 本接口(AssociateSecurityGroups)用于安全组批量绑定实例。
57
+
58
+ # @param request: Request instance for AssociateSecurityGroups.
59
+ # @type request: :class:`Tencentcloud::cdb::V20170320::AssociateSecurityGroupsRequest`
60
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::AssociateSecurityGroupsResponse`
61
+ def AssociateSecurityGroups(request)
62
+ body = send_request('AssociateSecurityGroups', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = AssociateSecurityGroupsResponse.new
66
+ model.deserialize(response['Response'])
67
+ model
68
+ else
69
+ code = response['Response']['Error']['Code']
70
+ message = response['Response']['Error']['Message']
71
+ reqid = response['Response']['RequestId']
72
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
73
+ end
74
+ rescue TencentCloud::Common::TencentCloudSDKException => e
75
+ raise e
76
+ rescue StandardError => e
77
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
78
+ end
79
+
80
+ # 本接口(BalanceRoGroupLoad)用于重新均衡 RO 组内实例的负载。注意,RO 组内 RO 实例会有一次数据库连接瞬断,请确保应用程序能重连数据库,谨慎操作。
81
+
82
+ # @param request: Request instance for BalanceRoGroupLoad.
83
+ # @type request: :class:`Tencentcloud::cdb::V20170320::BalanceRoGroupLoadRequest`
84
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::BalanceRoGroupLoadResponse`
85
+ def BalanceRoGroupLoad(request)
86
+ body = send_request('BalanceRoGroupLoad', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = BalanceRoGroupLoadResponse.new
90
+ model.deserialize(response['Response'])
91
+ model
92
+ else
93
+ code = response['Response']['Error']['Code']
94
+ message = response['Response']['Error']['Message']
95
+ reqid = response['Response']['RequestId']
96
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
97
+ end
98
+ rescue TencentCloud::Common::TencentCloudSDKException => e
99
+ raise e
100
+ rescue StandardError => e
101
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
102
+ end
103
+
104
+ # 本接口(CloseWanService)用于关闭云数据库实例的外网访问。关闭外网访问后,外网地址将不可访问。
105
+
106
+ # @param request: Request instance for CloseWanService.
107
+ # @type request: :class:`Tencentcloud::cdb::V20170320::CloseWanServiceRequest`
108
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::CloseWanServiceResponse`
109
+ def CloseWanService(request)
110
+ body = send_request('CloseWanService', request.serialize)
111
+ response = JSON.parse(body)
112
+ if response['Response'].key?('Error') == false
113
+ model = CloseWanServiceResponse.new
114
+ model.deserialize(response['Response'])
115
+ model
116
+ else
117
+ code = response['Response']['Error']['Code']
118
+ message = response['Response']['Error']['Message']
119
+ reqid = response['Response']['RequestId']
120
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
121
+ end
122
+ rescue TencentCloud::Common::TencentCloudSDKException => e
123
+ raise e
124
+ rescue StandardError => e
125
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
126
+ end
127
+
128
+ # 本接口(CreateAccounts)用于创建云数据库的账户,需要指定新的账户名和域名,以及所对应的密码,同时可以设置账号的备注信息以及最大可用连接数。
129
+
130
+ # @param request: Request instance for CreateAccounts.
131
+ # @type request: :class:`Tencentcloud::cdb::V20170320::CreateAccountsRequest`
132
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::CreateAccountsResponse`
133
+ def CreateAccounts(request)
134
+ body = send_request('CreateAccounts', request.serialize)
135
+ response = JSON.parse(body)
136
+ if response['Response'].key?('Error') == false
137
+ model = CreateAccountsResponse.new
138
+ model.deserialize(response['Response'])
139
+ model
140
+ else
141
+ code = response['Response']['Error']['Code']
142
+ message = response['Response']['Error']['Message']
143
+ reqid = response['Response']['RequestId']
144
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
145
+ end
146
+ rescue TencentCloud::Common::TencentCloudSDKException => e
147
+ raise e
148
+ rescue StandardError => e
149
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
150
+ end
151
+
152
+ # 本接口(CreateAuditLogFile)用于创建云数据库实例的审计日志文件。
153
+
154
+ # @param request: Request instance for CreateAuditLogFile.
155
+ # @type request: :class:`Tencentcloud::cdb::V20170320::CreateAuditLogFileRequest`
156
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::CreateAuditLogFileResponse`
157
+ def CreateAuditLogFile(request)
158
+ body = send_request('CreateAuditLogFile', request.serialize)
159
+ response = JSON.parse(body)
160
+ if response['Response'].key?('Error') == false
161
+ model = CreateAuditLogFileResponse.new
162
+ model.deserialize(response['Response'])
163
+ model
164
+ else
165
+ code = response['Response']['Error']['Code']
166
+ message = response['Response']['Error']['Message']
167
+ reqid = response['Response']['RequestId']
168
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
169
+ end
170
+ rescue TencentCloud::Common::TencentCloudSDKException => e
171
+ raise e
172
+ rescue StandardError => e
173
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
174
+ end
175
+
176
+ # 本接口(CreateAuditPolicy)用于创建云数据库实例的审计策略,即将审计规则绑定到具体的云数据库实例上。
177
+
178
+ # @param request: Request instance for CreateAuditPolicy.
179
+ # @type request: :class:`Tencentcloud::cdb::V20170320::CreateAuditPolicyRequest`
180
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::CreateAuditPolicyResponse`
181
+ def CreateAuditPolicy(request)
182
+ body = send_request('CreateAuditPolicy', request.serialize)
183
+ response = JSON.parse(body)
184
+ if response['Response'].key?('Error') == false
185
+ model = CreateAuditPolicyResponse.new
186
+ model.deserialize(response['Response'])
187
+ model
188
+ else
189
+ code = response['Response']['Error']['Code']
190
+ message = response['Response']['Error']['Message']
191
+ reqid = response['Response']['RequestId']
192
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
193
+ end
194
+ rescue TencentCloud::Common::TencentCloudSDKException => e
195
+ raise e
196
+ rescue StandardError => e
197
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
198
+ end
199
+
200
+ # 本接口(CreateAuditRule)用于创建用户在当前地域的审计规则。
201
+
202
+ # @param request: Request instance for CreateAuditRule.
203
+ # @type request: :class:`Tencentcloud::cdb::V20170320::CreateAuditRuleRequest`
204
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::CreateAuditRuleResponse`
205
+ def CreateAuditRule(request)
206
+ body = send_request('CreateAuditRule', request.serialize)
207
+ response = JSON.parse(body)
208
+ if response['Response'].key?('Error') == false
209
+ model = CreateAuditRuleResponse.new
210
+ model.deserialize(response['Response'])
211
+ model
212
+ else
213
+ code = response['Response']['Error']['Code']
214
+ message = response['Response']['Error']['Message']
215
+ reqid = response['Response']['RequestId']
216
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
217
+ end
218
+ rescue TencentCloud::Common::TencentCloudSDKException => e
219
+ raise e
220
+ rescue StandardError => e
221
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
222
+ end
223
+
224
+ # 本接口(CreateBackup)用于创建数据库备份。
225
+
226
+ # @param request: Request instance for CreateBackup.
227
+ # @type request: :class:`Tencentcloud::cdb::V20170320::CreateBackupRequest`
228
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::CreateBackupResponse`
229
+ def CreateBackup(request)
230
+ body = send_request('CreateBackup', request.serialize)
231
+ response = JSON.parse(body)
232
+ if response['Response'].key?('Error') == false
233
+ model = CreateBackupResponse.new
234
+ model.deserialize(response['Response'])
235
+ model
236
+ else
237
+ code = response['Response']['Error']['Code']
238
+ message = response['Response']['Error']['Message']
239
+ reqid = response['Response']['RequestId']
240
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
241
+ end
242
+ rescue TencentCloud::Common::TencentCloudSDKException => e
243
+ raise e
244
+ rescue StandardError => e
245
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
246
+ end
247
+
248
+ # 本接口(CreateCloneInstance) 用于从目标源实例创建一个克隆实例,可以指定克隆实例回档到源实例的指定物理备份文件或者指定的回档时间点。
249
+
250
+ # @param request: Request instance for CreateCloneInstance.
251
+ # @type request: :class:`Tencentcloud::cdb::V20170320::CreateCloneInstanceRequest`
252
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::CreateCloneInstanceResponse`
253
+ def CreateCloneInstance(request)
254
+ body = send_request('CreateCloneInstance', request.serialize)
255
+ response = JSON.parse(body)
256
+ if response['Response'].key?('Error') == false
257
+ model = CreateCloneInstanceResponse.new
258
+ model.deserialize(response['Response'])
259
+ model
260
+ else
261
+ code = response['Response']['Error']['Code']
262
+ message = response['Response']['Error']['Message']
263
+ reqid = response['Response']['RequestId']
264
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
265
+ end
266
+ rescue TencentCloud::Common::TencentCloudSDKException => e
267
+ raise e
268
+ rescue StandardError => e
269
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
270
+ end
271
+
272
+ # 本接口(CreateDBImportJob)用于创建云数据库数据导入任务。
273
+
274
+ # 注意,用户进行数据导入任务的文件,必须提前上传到腾讯云。用户须在控制台进行文件导入。
275
+
276
+ # @param request: Request instance for CreateDBImportJob.
277
+ # @type request: :class:`Tencentcloud::cdb::V20170320::CreateDBImportJobRequest`
278
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::CreateDBImportJobResponse`
279
+ def CreateDBImportJob(request)
280
+ body = send_request('CreateDBImportJob', request.serialize)
281
+ response = JSON.parse(body)
282
+ if response['Response'].key?('Error') == false
283
+ model = CreateDBImportJobResponse.new
284
+ model.deserialize(response['Response'])
285
+ model
286
+ else
287
+ code = response['Response']['Error']['Code']
288
+ message = response['Response']['Error']['Message']
289
+ reqid = response['Response']['RequestId']
290
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
291
+ end
292
+ rescue TencentCloud::Common::TencentCloudSDKException => e
293
+ raise e
294
+ rescue StandardError => e
295
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
296
+ end
297
+
298
+ # 本接口(CreateDBInstance)用于创建包年包月的云数据库实例(包括主实例、灾备实例和只读实例),可通过传入实例规格、MySQL 版本号、购买时长和数量等信息创建云数据库实例。
299
+
300
+ # 该接口为异步接口,您还可以使用 [查询实例列表](https://cloud.tencent.com/document/api/236/15872) 接口查询该实例的详细信息。当该实例的 Status 为1,且 TaskStatus 为0,表示实例已经发货成功。
301
+
302
+ # 1. 首先请使用 [获取云数据库可售卖规格](https://cloud.tencent.com/document/api/236/17229) 接口查询可创建的实例规格信息,然后请使用 [查询数据库价格](https://cloud.tencent.com/document/api/236/18566) 接口查询可创建实例的售卖价格;
303
+ # 2. 单次创建实例最大支持 100 个,实例时长最大支持 36 个月;
304
+ # 3. 支持创建 MySQL 5.5 、 MySQL 5.6 、 MySQL 5.7 、 MySQL 8.0 版本;
305
+ # 4. 支持创建主实例、只读实例、灾备实例;
306
+ # 5. 当入参指定 Port,ParamList 或 Password 时,该实例会进行初始化操作(不支持基础版实例);
307
+ # 6. 当入参指定 ParamTemplateId 或 AlarmPolicyList 时,需将SDK提升至最新版本方可支持;
308
+
309
+ # @param request: Request instance for CreateDBInstance.
310
+ # @type request: :class:`Tencentcloud::cdb::V20170320::CreateDBInstanceRequest`
311
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::CreateDBInstanceResponse`
312
+ def CreateDBInstance(request)
313
+ body = send_request('CreateDBInstance', request.serialize)
314
+ response = JSON.parse(body)
315
+ if response['Response'].key?('Error') == false
316
+ model = CreateDBInstanceResponse.new
317
+ model.deserialize(response['Response'])
318
+ model
319
+ else
320
+ code = response['Response']['Error']['Code']
321
+ message = response['Response']['Error']['Message']
322
+ reqid = response['Response']['RequestId']
323
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
324
+ end
325
+ rescue TencentCloud::Common::TencentCloudSDKException => e
326
+ raise e
327
+ rescue StandardError => e
328
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
329
+ end
330
+
331
+ # 本接口(CreateDBInstanceHour)用于创建按量计费的实例,可通过传入实例规格、MySQL 版本号和数量等信息创建云数据库实例,支持主实例、灾备实例和只读实例的创建。
332
+
333
+ # 该接口为异步接口,您还可以使用 [查询实例列表](https://cloud.tencent.com/document/api/236/15872) 接口查询该实例的详细信息。当该实例的 Status 为 1,且 TaskStatus 为 0,表示实例已经发货成功。
334
+
335
+ # 1. 首先请使用 [获取云数据库可售卖规格](https://cloud.tencent.com/document/api/236/17229) 接口查询可创建的实例规格信息,然后请使用 [查询数据库价格](https://cloud.tencent.com/document/api/236/18566) 接口查询可创建实例的售卖价格;
336
+ # 2. 单次创建实例最大支持 100 个,实例时长最大支持 36 个月;
337
+ # 3. 支持创建 MySQL 5.5、MySQL 5.6 、MySQL 5.7 和 MySQL 8.0 版本;
338
+ # 4. 支持创建主实例、灾备实例和只读实例;
339
+ # 5. 当入参指定 Port,ParamList 或 Password 时,该实例会进行初始化操作(暂不支持基础版实例);
340
+
341
+ # @param request: Request instance for CreateDBInstanceHour.
342
+ # @type request: :class:`Tencentcloud::cdb::V20170320::CreateDBInstanceHourRequest`
343
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::CreateDBInstanceHourResponse`
344
+ def CreateDBInstanceHour(request)
345
+ body = send_request('CreateDBInstanceHour', request.serialize)
346
+ response = JSON.parse(body)
347
+ if response['Response'].key?('Error') == false
348
+ model = CreateDBInstanceHourResponse.new
349
+ model.deserialize(response['Response'])
350
+ model
351
+ else
352
+ code = response['Response']['Error']['Code']
353
+ message = response['Response']['Error']['Message']
354
+ reqid = response['Response']['RequestId']
355
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
356
+ end
357
+ rescue TencentCloud::Common::TencentCloudSDKException => e
358
+ raise e
359
+ rescue StandardError => e
360
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
361
+ end
362
+
363
+ # 本接口(CreateDeployGroup)用于创建放置实例的置放群组
364
+
365
+ # @param request: Request instance for CreateDeployGroup.
366
+ # @type request: :class:`Tencentcloud::cdb::V20170320::CreateDeployGroupRequest`
367
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::CreateDeployGroupResponse`
368
+ def CreateDeployGroup(request)
369
+ body = send_request('CreateDeployGroup', request.serialize)
370
+ response = JSON.parse(body)
371
+ if response['Response'].key?('Error') == false
372
+ model = CreateDeployGroupResponse.new
373
+ model.deserialize(response['Response'])
374
+ model
375
+ else
376
+ code = response['Response']['Error']['Code']
377
+ message = response['Response']['Error']['Message']
378
+ reqid = response['Response']['RequestId']
379
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
380
+ end
381
+ rescue TencentCloud::Common::TencentCloudSDKException => e
382
+ raise e
383
+ rescue StandardError => e
384
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
385
+ end
386
+
387
+ # 该接口(CreateParamTemplate)用于创建参数模板,全地域公共参数Region均为ap-guangzhou。
388
+
389
+ # @param request: Request instance for CreateParamTemplate.
390
+ # @type request: :class:`Tencentcloud::cdb::V20170320::CreateParamTemplateRequest`
391
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::CreateParamTemplateResponse`
392
+ def CreateParamTemplate(request)
393
+ body = send_request('CreateParamTemplate', request.serialize)
394
+ response = JSON.parse(body)
395
+ if response['Response'].key?('Error') == false
396
+ model = CreateParamTemplateResponse.new
397
+ model.deserialize(response['Response'])
398
+ model
399
+ else
400
+ code = response['Response']['Error']['Code']
401
+ message = response['Response']['Error']['Message']
402
+ reqid = response['Response']['RequestId']
403
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
404
+ end
405
+ rescue TencentCloud::Common::TencentCloudSDKException => e
406
+ raise e
407
+ rescue StandardError => e
408
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
409
+ end
410
+
411
+ # 本接口(CreateRoInstanceIp)用于创建云数据库只读实例的独立VIP。
412
+
413
+ # @param request: Request instance for CreateRoInstanceIp.
414
+ # @type request: :class:`Tencentcloud::cdb::V20170320::CreateRoInstanceIpRequest`
415
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::CreateRoInstanceIpResponse`
416
+ def CreateRoInstanceIp(request)
417
+ body = send_request('CreateRoInstanceIp', request.serialize)
418
+ response = JSON.parse(body)
419
+ if response['Response'].key?('Error') == false
420
+ model = CreateRoInstanceIpResponse.new
421
+ model.deserialize(response['Response'])
422
+ model
423
+ else
424
+ code = response['Response']['Error']['Code']
425
+ message = response['Response']['Error']['Message']
426
+ reqid = response['Response']['RequestId']
427
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
428
+ end
429
+ rescue TencentCloud::Common::TencentCloudSDKException => e
430
+ raise e
431
+ rescue StandardError => e
432
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
433
+ end
434
+
435
+ # 本接口(DeleteAccounts)用于删除云数据库的账户。
436
+
437
+ # @param request: Request instance for DeleteAccounts.
438
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DeleteAccountsRequest`
439
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DeleteAccountsResponse`
440
+ def DeleteAccounts(request)
441
+ body = send_request('DeleteAccounts', request.serialize)
442
+ response = JSON.parse(body)
443
+ if response['Response'].key?('Error') == false
444
+ model = DeleteAccountsResponse.new
445
+ model.deserialize(response['Response'])
446
+ model
447
+ else
448
+ code = response['Response']['Error']['Code']
449
+ message = response['Response']['Error']['Message']
450
+ reqid = response['Response']['RequestId']
451
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
452
+ end
453
+ rescue TencentCloud::Common::TencentCloudSDKException => e
454
+ raise e
455
+ rescue StandardError => e
456
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
457
+ end
458
+
459
+ # 本接口(DeleteAuditLogFile)用于删除云数据库实例的审计日志文件。
460
+
461
+ # @param request: Request instance for DeleteAuditLogFile.
462
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DeleteAuditLogFileRequest`
463
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DeleteAuditLogFileResponse`
464
+ def DeleteAuditLogFile(request)
465
+ body = send_request('DeleteAuditLogFile', request.serialize)
466
+ response = JSON.parse(body)
467
+ if response['Response'].key?('Error') == false
468
+ model = DeleteAuditLogFileResponse.new
469
+ model.deserialize(response['Response'])
470
+ model
471
+ else
472
+ code = response['Response']['Error']['Code']
473
+ message = response['Response']['Error']['Message']
474
+ reqid = response['Response']['RequestId']
475
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
476
+ end
477
+ rescue TencentCloud::Common::TencentCloudSDKException => e
478
+ raise e
479
+ rescue StandardError => e
480
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
481
+ end
482
+
483
+ # 本接口(DeleteAuditPolicy)用于删除用户的审计策略。
484
+
485
+ # @param request: Request instance for DeleteAuditPolicy.
486
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DeleteAuditPolicyRequest`
487
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DeleteAuditPolicyResponse`
488
+ def DeleteAuditPolicy(request)
489
+ body = send_request('DeleteAuditPolicy', request.serialize)
490
+ response = JSON.parse(body)
491
+ if response['Response'].key?('Error') == false
492
+ model = DeleteAuditPolicyResponse.new
493
+ model.deserialize(response['Response'])
494
+ model
495
+ else
496
+ code = response['Response']['Error']['Code']
497
+ message = response['Response']['Error']['Message']
498
+ reqid = response['Response']['RequestId']
499
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
500
+ end
501
+ rescue TencentCloud::Common::TencentCloudSDKException => e
502
+ raise e
503
+ rescue StandardError => e
504
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
505
+ end
506
+
507
+ # 本接口(DeleteAuditRule)用于删除用户的审计规则。
508
+
509
+ # @param request: Request instance for DeleteAuditRule.
510
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DeleteAuditRuleRequest`
511
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DeleteAuditRuleResponse`
512
+ def DeleteAuditRule(request)
513
+ body = send_request('DeleteAuditRule', request.serialize)
514
+ response = JSON.parse(body)
515
+ if response['Response'].key?('Error') == false
516
+ model = DeleteAuditRuleResponse.new
517
+ model.deserialize(response['Response'])
518
+ model
519
+ else
520
+ code = response['Response']['Error']['Code']
521
+ message = response['Response']['Error']['Message']
522
+ reqid = response['Response']['RequestId']
523
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
524
+ end
525
+ rescue TencentCloud::Common::TencentCloudSDKException => e
526
+ raise e
527
+ rescue StandardError => e
528
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
529
+ end
530
+
531
+ # 本接口(DeleteBackup)用于删除数据库备份。本接口只支持删除手动发起的备份。
532
+
533
+ # @param request: Request instance for DeleteBackup.
534
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DeleteBackupRequest`
535
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DeleteBackupResponse`
536
+ def DeleteBackup(request)
537
+ body = send_request('DeleteBackup', request.serialize)
538
+ response = JSON.parse(body)
539
+ if response['Response'].key?('Error') == false
540
+ model = DeleteBackupResponse.new
541
+ model.deserialize(response['Response'])
542
+ model
543
+ else
544
+ code = response['Response']['Error']['Code']
545
+ message = response['Response']['Error']['Message']
546
+ reqid = response['Response']['RequestId']
547
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
548
+ end
549
+ rescue TencentCloud::Common::TencentCloudSDKException => e
550
+ raise e
551
+ rescue StandardError => e
552
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
553
+ end
554
+
555
+ # 根据置放群组ID删除置放群组(置放群组中有资源存在时不能删除该置放群组)
556
+
557
+ # @param request: Request instance for DeleteDeployGroups.
558
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DeleteDeployGroupsRequest`
559
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DeleteDeployGroupsResponse`
560
+ def DeleteDeployGroups(request)
561
+ body = send_request('DeleteDeployGroups', request.serialize)
562
+ response = JSON.parse(body)
563
+ if response['Response'].key?('Error') == false
564
+ model = DeleteDeployGroupsResponse.new
565
+ model.deserialize(response['Response'])
566
+ model
567
+ else
568
+ code = response['Response']['Error']['Code']
569
+ message = response['Response']['Error']['Message']
570
+ reqid = response['Response']['RequestId']
571
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
572
+ end
573
+ rescue TencentCloud::Common::TencentCloudSDKException => e
574
+ raise e
575
+ rescue StandardError => e
576
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
577
+ end
578
+
579
+ # 该接口(DeleteParamTemplate)用于删除参数模板,全地域公共参数Region均为ap-guangzhou。
580
+
581
+ # @param request: Request instance for DeleteParamTemplate.
582
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DeleteParamTemplateRequest`
583
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DeleteParamTemplateResponse`
584
+ def DeleteParamTemplate(request)
585
+ body = send_request('DeleteParamTemplate', request.serialize)
586
+ response = JSON.parse(body)
587
+ if response['Response'].key?('Error') == false
588
+ model = DeleteParamTemplateResponse.new
589
+ model.deserialize(response['Response'])
590
+ model
591
+ else
592
+ code = response['Response']['Error']['Code']
593
+ message = response['Response']['Error']['Message']
594
+ reqid = response['Response']['RequestId']
595
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
596
+ end
597
+ rescue TencentCloud::Common::TencentCloudSDKException => e
598
+ raise e
599
+ rescue StandardError => e
600
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
601
+ end
602
+
603
+ # 本接口(DeleteTimeWindow)用于删除云数据库实例的维护时间窗口。删除实例维护时间窗口之后,默认的维护时间窗为 03:00-04:00,即当选择在维护时间窗口内切换访问新实例时,默认会在 03:00-04:00 点进行切换访问新实例。
604
+
605
+ # @param request: Request instance for DeleteTimeWindow.
606
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DeleteTimeWindowRequest`
607
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DeleteTimeWindowResponse`
608
+ def DeleteTimeWindow(request)
609
+ body = send_request('DeleteTimeWindow', request.serialize)
610
+ response = JSON.parse(body)
611
+ if response['Response'].key?('Error') == false
612
+ model = DeleteTimeWindowResponse.new
613
+ model.deserialize(response['Response'])
614
+ model
615
+ else
616
+ code = response['Response']['Error']['Code']
617
+ message = response['Response']['Error']['Message']
618
+ reqid = response['Response']['RequestId']
619
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
620
+ end
621
+ rescue TencentCloud::Common::TencentCloudSDKException => e
622
+ raise e
623
+ rescue StandardError => e
624
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
625
+ end
626
+
627
+ # 本接口(DescribeAccountPrivileges)用于查询云数据库账户支持的权限信息。
628
+
629
+ # @param request: Request instance for DescribeAccountPrivileges.
630
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeAccountPrivilegesRequest`
631
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeAccountPrivilegesResponse`
632
+ def DescribeAccountPrivileges(request)
633
+ body = send_request('DescribeAccountPrivileges', request.serialize)
634
+ response = JSON.parse(body)
635
+ if response['Response'].key?('Error') == false
636
+ model = DescribeAccountPrivilegesResponse.new
637
+ model.deserialize(response['Response'])
638
+ model
639
+ else
640
+ code = response['Response']['Error']['Code']
641
+ message = response['Response']['Error']['Message']
642
+ reqid = response['Response']['RequestId']
643
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
644
+ end
645
+ rescue TencentCloud::Common::TencentCloudSDKException => e
646
+ raise e
647
+ rescue StandardError => e
648
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
649
+ end
650
+
651
+ # 本接口(DescribeAccounts)用于查询云数据库的所有账户信息。
652
+
653
+ # @param request: Request instance for DescribeAccounts.
654
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeAccountsRequest`
655
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeAccountsResponse`
656
+ def DescribeAccounts(request)
657
+ body = send_request('DescribeAccounts', request.serialize)
658
+ response = JSON.parse(body)
659
+ if response['Response'].key?('Error') == false
660
+ model = DescribeAccountsResponse.new
661
+ model.deserialize(response['Response'])
662
+ model
663
+ else
664
+ code = response['Response']['Error']['Code']
665
+ message = response['Response']['Error']['Message']
666
+ reqid = response['Response']['RequestId']
667
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
668
+ end
669
+ rescue TencentCloud::Common::TencentCloudSDKException => e
670
+ raise e
671
+ rescue StandardError => e
672
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
673
+ end
674
+
675
+ # 本接口(DescribeAsyncRequestInfo)用于查询云数据库实例异步任务的执行结果。
676
+
677
+ # @param request: Request instance for DescribeAsyncRequestInfo.
678
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeAsyncRequestInfoRequest`
679
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeAsyncRequestInfoResponse`
680
+ def DescribeAsyncRequestInfo(request)
681
+ body = send_request('DescribeAsyncRequestInfo', request.serialize)
682
+ response = JSON.parse(body)
683
+ if response['Response'].key?('Error') == false
684
+ model = DescribeAsyncRequestInfoResponse.new
685
+ model.deserialize(response['Response'])
686
+ model
687
+ else
688
+ code = response['Response']['Error']['Code']
689
+ message = response['Response']['Error']['Message']
690
+ reqid = response['Response']['RequestId']
691
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
692
+ end
693
+ rescue TencentCloud::Common::TencentCloudSDKException => e
694
+ raise e
695
+ rescue StandardError => e
696
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
697
+ end
698
+
699
+ # 本接口(DescribeAuditConfig)用于查询云数据库审计策略的服务配置,包括审计日志保存时长等。
700
+
701
+ # @param request: Request instance for DescribeAuditConfig.
702
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeAuditConfigRequest`
703
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeAuditConfigResponse`
704
+ def DescribeAuditConfig(request)
705
+ body = send_request('DescribeAuditConfig', request.serialize)
706
+ response = JSON.parse(body)
707
+ if response['Response'].key?('Error') == false
708
+ model = DescribeAuditConfigResponse.new
709
+ model.deserialize(response['Response'])
710
+ model
711
+ else
712
+ code = response['Response']['Error']['Code']
713
+ message = response['Response']['Error']['Message']
714
+ reqid = response['Response']['RequestId']
715
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
716
+ end
717
+ rescue TencentCloud::Common::TencentCloudSDKException => e
718
+ raise e
719
+ rescue StandardError => e
720
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
721
+ end
722
+
723
+ # 本接口(DescribeAuditLogFiles)用于查询云数据库实例的审计日志文件。
724
+
725
+ # @param request: Request instance for DescribeAuditLogFiles.
726
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeAuditLogFilesRequest`
727
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeAuditLogFilesResponse`
728
+ def DescribeAuditLogFiles(request)
729
+ body = send_request('DescribeAuditLogFiles', request.serialize)
730
+ response = JSON.parse(body)
731
+ if response['Response'].key?('Error') == false
732
+ model = DescribeAuditLogFilesResponse.new
733
+ model.deserialize(response['Response'])
734
+ model
735
+ else
736
+ code = response['Response']['Error']['Code']
737
+ message = response['Response']['Error']['Message']
738
+ reqid = response['Response']['RequestId']
739
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
740
+ end
741
+ rescue TencentCloud::Common::TencentCloudSDKException => e
742
+ raise e
743
+ rescue StandardError => e
744
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
745
+ end
746
+
747
+ # 本接口(DescribeAuditPolicies)用于查询云数据库实例的审计策略。
748
+
749
+ # @param request: Request instance for DescribeAuditPolicies.
750
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeAuditPoliciesRequest`
751
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeAuditPoliciesResponse`
752
+ def DescribeAuditPolicies(request)
753
+ body = send_request('DescribeAuditPolicies', request.serialize)
754
+ response = JSON.parse(body)
755
+ if response['Response'].key?('Error') == false
756
+ model = DescribeAuditPoliciesResponse.new
757
+ model.deserialize(response['Response'])
758
+ model
759
+ else
760
+ code = response['Response']['Error']['Code']
761
+ message = response['Response']['Error']['Message']
762
+ reqid = response['Response']['RequestId']
763
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
764
+ end
765
+ rescue TencentCloud::Common::TencentCloudSDKException => e
766
+ raise e
767
+ rescue StandardError => e
768
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
769
+ end
770
+
771
+ # 本接口(DescribeAuditRules)用于查询用户在当前地域的审计规则。
772
+
773
+ # @param request: Request instance for DescribeAuditRules.
774
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeAuditRulesRequest`
775
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeAuditRulesResponse`
776
+ def DescribeAuditRules(request)
777
+ body = send_request('DescribeAuditRules', request.serialize)
778
+ response = JSON.parse(body)
779
+ if response['Response'].key?('Error') == false
780
+ model = DescribeAuditRulesResponse.new
781
+ model.deserialize(response['Response'])
782
+ model
783
+ else
784
+ code = response['Response']['Error']['Code']
785
+ message = response['Response']['Error']['Message']
786
+ reqid = response['Response']['RequestId']
787
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
788
+ end
789
+ rescue TencentCloud::Common::TencentCloudSDKException => e
790
+ raise e
791
+ rescue StandardError => e
792
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
793
+ end
794
+
795
+ # 本接口(DescribeBackupConfig)用于查询数据库备份配置信息。
796
+
797
+ # @param request: Request instance for DescribeBackupConfig.
798
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeBackupConfigRequest`
799
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeBackupConfigResponse`
800
+ def DescribeBackupConfig(request)
801
+ body = send_request('DescribeBackupConfig', request.serialize)
802
+ response = JSON.parse(body)
803
+ if response['Response'].key?('Error') == false
804
+ model = DescribeBackupConfigResponse.new
805
+ model.deserialize(response['Response'])
806
+ model
807
+ else
808
+ code = response['Response']['Error']['Code']
809
+ message = response['Response']['Error']['Message']
810
+ reqid = response['Response']['RequestId']
811
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
812
+ end
813
+ rescue TencentCloud::Common::TencentCloudSDKException => e
814
+ raise e
815
+ rescue StandardError => e
816
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
817
+ end
818
+
819
+ # 本接口(DescribeBackupDatabases)用于查询备份文件包含的库 (已废弃)。
820
+ # 旧版本支持全量备份后,用户如果分库表下载逻辑备份文件,需要用到此接口。
821
+ # 新版本支持(CreateBackup)创建逻辑备份的时候,直接发起指定库表备份,用户直接下载该备份文件即可。
822
+
823
+ # @param request: Request instance for DescribeBackupDatabases.
824
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeBackupDatabasesRequest`
825
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeBackupDatabasesResponse`
826
+ def DescribeBackupDatabases(request)
827
+ body = send_request('DescribeBackupDatabases', request.serialize)
828
+ response = JSON.parse(body)
829
+ if response['Response'].key?('Error') == false
830
+ model = DescribeBackupDatabasesResponse.new
831
+ model.deserialize(response['Response'])
832
+ model
833
+ else
834
+ code = response['Response']['Error']['Code']
835
+ message = response['Response']['Error']['Message']
836
+ reqid = response['Response']['RequestId']
837
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
838
+ end
839
+ rescue TencentCloud::Common::TencentCloudSDKException => e
840
+ raise e
841
+ rescue StandardError => e
842
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
843
+ end
844
+
845
+ # 该接口用户查询当前地域用户设置的默认备份下载来源限制。
846
+
847
+ # @param request: Request instance for DescribeBackupDownloadRestriction.
848
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeBackupDownloadRestrictionRequest`
849
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeBackupDownloadRestrictionResponse`
850
+ def DescribeBackupDownloadRestriction(request)
851
+ body = send_request('DescribeBackupDownloadRestriction', request.serialize)
852
+ response = JSON.parse(body)
853
+ if response['Response'].key?('Error') == false
854
+ model = DescribeBackupDownloadRestrictionResponse.new
855
+ model.deserialize(response['Response'])
856
+ model
857
+ else
858
+ code = response['Response']['Error']['Code']
859
+ message = response['Response']['Error']['Message']
860
+ reqid = response['Response']['RequestId']
861
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
862
+ end
863
+ rescue TencentCloud::Common::TencentCloudSDKException => e
864
+ raise e
865
+ rescue StandardError => e
866
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
867
+ end
868
+
869
+ # 本接口(DescribeBackupOverview)用于查询用户的备份概览。返回用户当前备份总个数、备份总的占用容量、赠送的免费容量、计费容量(容量单位为字节)。
870
+
871
+ # @param request: Request instance for DescribeBackupOverview.
872
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeBackupOverviewRequest`
873
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeBackupOverviewResponse`
874
+ def DescribeBackupOverview(request)
875
+ body = send_request('DescribeBackupOverview', request.serialize)
876
+ response = JSON.parse(body)
877
+ if response['Response'].key?('Error') == false
878
+ model = DescribeBackupOverviewResponse.new
879
+ model.deserialize(response['Response'])
880
+ model
881
+ else
882
+ code = response['Response']['Error']['Code']
883
+ message = response['Response']['Error']['Message']
884
+ reqid = response['Response']['RequestId']
885
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
886
+ end
887
+ rescue TencentCloud::Common::TencentCloudSDKException => e
888
+ raise e
889
+ rescue StandardError => e
890
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
891
+ end
892
+
893
+ # 本接口(DescribeBackupSummaries)用于查询备份的统计情况,返回以实例为维度的备份占用容量,以及每个实例的数据备份和日志备份的个数和容量(容量单位为字节)。
894
+
895
+ # @param request: Request instance for DescribeBackupSummaries.
896
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeBackupSummariesRequest`
897
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeBackupSummariesResponse`
898
+ def DescribeBackupSummaries(request)
899
+ body = send_request('DescribeBackupSummaries', request.serialize)
900
+ response = JSON.parse(body)
901
+ if response['Response'].key?('Error') == false
902
+ model = DescribeBackupSummariesResponse.new
903
+ model.deserialize(response['Response'])
904
+ model
905
+ else
906
+ code = response['Response']['Error']['Code']
907
+ message = response['Response']['Error']['Message']
908
+ reqid = response['Response']['RequestId']
909
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
910
+ end
911
+ rescue TencentCloud::Common::TencentCloudSDKException => e
912
+ raise e
913
+ rescue StandardError => e
914
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
915
+ end
916
+
917
+ # 本接口(DescribeBackupTables)用于查询指定的数据库的备份数据表名 (已废弃)。
918
+ # 旧版本支持全量备份后,用户如果分库表下载逻辑备份文件,需要用到此接口。
919
+ # 新版本支持(CreateBackup)创建逻辑备份的时候,直接发起指定库表备份,用户直接下载该备份文件即可。
920
+
921
+ # @param request: Request instance for DescribeBackupTables.
922
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeBackupTablesRequest`
923
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeBackupTablesResponse`
924
+ def DescribeBackupTables(request)
925
+ body = send_request('DescribeBackupTables', request.serialize)
926
+ response = JSON.parse(body)
927
+ if response['Response'].key?('Error') == false
928
+ model = DescribeBackupTablesResponse.new
929
+ model.deserialize(response['Response'])
930
+ model
931
+ else
932
+ code = response['Response']['Error']['Code']
933
+ message = response['Response']['Error']['Message']
934
+ reqid = response['Response']['RequestId']
935
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
936
+ end
937
+ rescue TencentCloud::Common::TencentCloudSDKException => e
938
+ raise e
939
+ rescue StandardError => e
940
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
941
+ end
942
+
943
+ # 本接口(DescribeBackups)用于查询云数据库实例的备份数据。
944
+
945
+ # @param request: Request instance for DescribeBackups.
946
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeBackupsRequest`
947
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeBackupsResponse`
948
+ def DescribeBackups(request)
949
+ body = send_request('DescribeBackups', request.serialize)
950
+ response = JSON.parse(body)
951
+ if response['Response'].key?('Error') == false
952
+ model = DescribeBackupsResponse.new
953
+ model.deserialize(response['Response'])
954
+ model
955
+ else
956
+ code = response['Response']['Error']['Code']
957
+ message = response['Response']['Error']['Message']
958
+ reqid = response['Response']['RequestId']
959
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
960
+ end
961
+ rescue TencentCloud::Common::TencentCloudSDKException => e
962
+ raise e
963
+ rescue StandardError => e
964
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
965
+ end
966
+
967
+ # 本接口(DescribeBinlogBackupOverview)用于查询用户在当前地域总的日志备份概览。
968
+
969
+ # @param request: Request instance for DescribeBinlogBackupOverview.
970
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeBinlogBackupOverviewRequest`
971
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeBinlogBackupOverviewResponse`
972
+ def DescribeBinlogBackupOverview(request)
973
+ body = send_request('DescribeBinlogBackupOverview', request.serialize)
974
+ response = JSON.parse(body)
975
+ if response['Response'].key?('Error') == false
976
+ model = DescribeBinlogBackupOverviewResponse.new
977
+ model.deserialize(response['Response'])
978
+ model
979
+ else
980
+ code = response['Response']['Error']['Code']
981
+ message = response['Response']['Error']['Message']
982
+ reqid = response['Response']['RequestId']
983
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
984
+ end
985
+ rescue TencentCloud::Common::TencentCloudSDKException => e
986
+ raise e
987
+ rescue StandardError => e
988
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
989
+ end
990
+
991
+ # 本接口(DescribeBinlogs)用于查询云数据库实例的 binlog 文件列表。
992
+
993
+ # @param request: Request instance for DescribeBinlogs.
994
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeBinlogsRequest`
995
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeBinlogsResponse`
996
+ def DescribeBinlogs(request)
997
+ body = send_request('DescribeBinlogs', request.serialize)
998
+ response = JSON.parse(body)
999
+ if response['Response'].key?('Error') == false
1000
+ model = DescribeBinlogsResponse.new
1001
+ model.deserialize(response['Response'])
1002
+ model
1003
+ else
1004
+ code = response['Response']['Error']['Code']
1005
+ message = response['Response']['Error']['Message']
1006
+ reqid = response['Response']['RequestId']
1007
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1008
+ end
1009
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1010
+ raise e
1011
+ rescue StandardError => e
1012
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1013
+ end
1014
+
1015
+ # 本接口(DescribeCloneList) 用于查询用户实例的克隆任务列表。
1016
+
1017
+ # @param request: Request instance for DescribeCloneList.
1018
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeCloneListRequest`
1019
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeCloneListResponse`
1020
+ def DescribeCloneList(request)
1021
+ body = send_request('DescribeCloneList', request.serialize)
1022
+ response = JSON.parse(body)
1023
+ if response['Response'].key?('Error') == false
1024
+ model = DescribeCloneListResponse.new
1025
+ model.deserialize(response['Response'])
1026
+ model
1027
+ else
1028
+ code = response['Response']['Error']['Code']
1029
+ message = response['Response']['Error']['Message']
1030
+ reqid = response['Response']['RequestId']
1031
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1032
+ end
1033
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1034
+ raise e
1035
+ rescue StandardError => e
1036
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1037
+ end
1038
+
1039
+ # 本接口(DescribeDBImportRecords)用于查询云数据库导入任务操作日志。
1040
+
1041
+ # @param request: Request instance for DescribeDBImportRecords.
1042
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDBImportRecordsRequest`
1043
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDBImportRecordsResponse`
1044
+ def DescribeDBImportRecords(request)
1045
+ body = send_request('DescribeDBImportRecords', request.serialize)
1046
+ response = JSON.parse(body)
1047
+ if response['Response'].key?('Error') == false
1048
+ model = DescribeDBImportRecordsResponse.new
1049
+ model.deserialize(response['Response'])
1050
+ model
1051
+ else
1052
+ code = response['Response']['Error']['Code']
1053
+ message = response['Response']['Error']['Message']
1054
+ reqid = response['Response']['RequestId']
1055
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1056
+ end
1057
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1058
+ raise e
1059
+ rescue StandardError => e
1060
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1061
+ end
1062
+
1063
+ # 本接口(DescribeDBInstanceCharset)用于查询云数据库实例的字符集,获取字符集的名称。
1064
+
1065
+ # @param request: Request instance for DescribeDBInstanceCharset.
1066
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDBInstanceCharsetRequest`
1067
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDBInstanceCharsetResponse`
1068
+ def DescribeDBInstanceCharset(request)
1069
+ body = send_request('DescribeDBInstanceCharset', request.serialize)
1070
+ response = JSON.parse(body)
1071
+ if response['Response'].key?('Error') == false
1072
+ model = DescribeDBInstanceCharsetResponse.new
1073
+ model.deserialize(response['Response'])
1074
+ model
1075
+ else
1076
+ code = response['Response']['Error']['Code']
1077
+ message = response['Response']['Error']['Message']
1078
+ reqid = response['Response']['RequestId']
1079
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1080
+ end
1081
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1082
+ raise e
1083
+ rescue StandardError => e
1084
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1085
+ end
1086
+
1087
+ # 本接口(DescribeDBInstanceConfig)用于云数据库实例的配置信息,包括同步模式,部署模式等。
1088
+
1089
+ # @param request: Request instance for DescribeDBInstanceConfig.
1090
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDBInstanceConfigRequest`
1091
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDBInstanceConfigResponse`
1092
+ def DescribeDBInstanceConfig(request)
1093
+ body = send_request('DescribeDBInstanceConfig', request.serialize)
1094
+ response = JSON.parse(body)
1095
+ if response['Response'].key?('Error') == false
1096
+ model = DescribeDBInstanceConfigResponse.new
1097
+ model.deserialize(response['Response'])
1098
+ model
1099
+ else
1100
+ code = response['Response']['Error']['Code']
1101
+ message = response['Response']['Error']['Message']
1102
+ reqid = response['Response']['RequestId']
1103
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1104
+ end
1105
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1106
+ raise e
1107
+ rescue StandardError => e
1108
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1109
+ end
1110
+
1111
+ # 本接口(DescribeDBInstanceGTID)用于查询云数据库实例是否开通了 GTID,不支持版本为 5.5 以及以下的实例。
1112
+
1113
+ # @param request: Request instance for DescribeDBInstanceGTID.
1114
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDBInstanceGTIDRequest`
1115
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDBInstanceGTIDResponse`
1116
+ def DescribeDBInstanceGTID(request)
1117
+ body = send_request('DescribeDBInstanceGTID', request.serialize)
1118
+ response = JSON.parse(body)
1119
+ if response['Response'].key?('Error') == false
1120
+ model = DescribeDBInstanceGTIDResponse.new
1121
+ model.deserialize(response['Response'])
1122
+ model
1123
+ else
1124
+ code = response['Response']['Error']['Code']
1125
+ message = response['Response']['Error']['Message']
1126
+ reqid = response['Response']['RequestId']
1127
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1128
+ end
1129
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1130
+ raise e
1131
+ rescue StandardError => e
1132
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1133
+ end
1134
+
1135
+ # 查询实例基本信息(实例 ID ,实例名称,是否开通加密 )
1136
+
1137
+ # @param request: Request instance for DescribeDBInstanceInfo.
1138
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDBInstanceInfoRequest`
1139
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDBInstanceInfoResponse`
1140
+ def DescribeDBInstanceInfo(request)
1141
+ body = send_request('DescribeDBInstanceInfo', request.serialize)
1142
+ response = JSON.parse(body)
1143
+ if response['Response'].key?('Error') == false
1144
+ model = DescribeDBInstanceInfoResponse.new
1145
+ model.deserialize(response['Response'])
1146
+ model
1147
+ else
1148
+ code = response['Response']['Error']['Code']
1149
+ message = response['Response']['Error']['Message']
1150
+ reqid = response['Response']['RequestId']
1151
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1152
+ end
1153
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1154
+ raise e
1155
+ rescue StandardError => e
1156
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1157
+ end
1158
+
1159
+ # 本接口(DescribeDBInstanceRebootTime)用于查询云数据库实例重启预计所需的时间。
1160
+
1161
+ # @param request: Request instance for DescribeDBInstanceRebootTime.
1162
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDBInstanceRebootTimeRequest`
1163
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDBInstanceRebootTimeResponse`
1164
+ def DescribeDBInstanceRebootTime(request)
1165
+ body = send_request('DescribeDBInstanceRebootTime', request.serialize)
1166
+ response = JSON.parse(body)
1167
+ if response['Response'].key?('Error') == false
1168
+ model = DescribeDBInstanceRebootTimeResponse.new
1169
+ model.deserialize(response['Response'])
1170
+ model
1171
+ else
1172
+ code = response['Response']['Error']['Code']
1173
+ message = response['Response']['Error']['Message']
1174
+ reqid = response['Response']['RequestId']
1175
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1176
+ end
1177
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1178
+ raise e
1179
+ rescue StandardError => e
1180
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1181
+ end
1182
+
1183
+ # 本接口(DescribeDBInstances)用于查询云数据库实例列表,支持通过项目 ID、实例 ID、访问地址、实例状态等过滤条件来筛选实例。支持查询主实例、灾备实例和只读实例信息列表。
1184
+
1185
+ # @param request: Request instance for DescribeDBInstances.
1186
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDBInstancesRequest`
1187
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDBInstancesResponse`
1188
+ def DescribeDBInstances(request)
1189
+ body = send_request('DescribeDBInstances', request.serialize)
1190
+ response = JSON.parse(body)
1191
+ if response['Response'].key?('Error') == false
1192
+ model = DescribeDBInstancesResponse.new
1193
+ model.deserialize(response['Response'])
1194
+ model
1195
+ else
1196
+ code = response['Response']['Error']['Code']
1197
+ message = response['Response']['Error']['Message']
1198
+ reqid = response['Response']['RequestId']
1199
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1200
+ end
1201
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1202
+ raise e
1203
+ rescue StandardError => e
1204
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1205
+ end
1206
+
1207
+ # 本接口(DescribeDBPrice)用于查询购买或续费云数据库实例的价格,支持查询按量计费或者包年包月的价格。可传入实例类型、购买时长、购买数量、内存大小、硬盘大小和可用区信息等来查询实例价格。可传入实例名称来查询实例续费价格。
1208
+
1209
+ # 注意:对某个地域进行询价,请使用对应地域的接入点,接入点信息请参照 <a href="https://cloud.tencent.com/document/api/236/15832">服务地址</a> 文档。例如:对广州地域进行询价,请把请求发到:cdb.ap-guangzhou.tencentcloudapi.com。同理对上海地域询价,把请求发到:cdb.ap-shanghai.tencentcloudapi.com。
1210
+
1211
+ # @param request: Request instance for DescribeDBPrice.
1212
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDBPriceRequest`
1213
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDBPriceResponse`
1214
+ def DescribeDBPrice(request)
1215
+ body = send_request('DescribeDBPrice', request.serialize)
1216
+ response = JSON.parse(body)
1217
+ if response['Response'].key?('Error') == false
1218
+ model = DescribeDBPriceResponse.new
1219
+ model.deserialize(response['Response'])
1220
+ model
1221
+ else
1222
+ code = response['Response']['Error']['Code']
1223
+ message = response['Response']['Error']['Message']
1224
+ reqid = response['Response']['RequestId']
1225
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1226
+ end
1227
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1228
+ raise e
1229
+ rescue StandardError => e
1230
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1231
+ end
1232
+
1233
+ # 本接口(DescribeDBSecurityGroups)用于查询实例的安全组详情。
1234
+
1235
+ # @param request: Request instance for DescribeDBSecurityGroups.
1236
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDBSecurityGroupsRequest`
1237
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDBSecurityGroupsResponse`
1238
+ def DescribeDBSecurityGroups(request)
1239
+ body = send_request('DescribeDBSecurityGroups', request.serialize)
1240
+ response = JSON.parse(body)
1241
+ if response['Response'].key?('Error') == false
1242
+ model = DescribeDBSecurityGroupsResponse.new
1243
+ model.deserialize(response['Response'])
1244
+ model
1245
+ else
1246
+ code = response['Response']['Error']['Code']
1247
+ message = response['Response']['Error']['Message']
1248
+ reqid = response['Response']['RequestId']
1249
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1250
+ end
1251
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1252
+ raise e
1253
+ rescue StandardError => e
1254
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1255
+ end
1256
+
1257
+ # 本接口(DescribeDBSwitchRecords)用于查询云数据库实例切换记录。
1258
+
1259
+ # @param request: Request instance for DescribeDBSwitchRecords.
1260
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDBSwitchRecordsRequest`
1261
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDBSwitchRecordsResponse`
1262
+ def DescribeDBSwitchRecords(request)
1263
+ body = send_request('DescribeDBSwitchRecords', request.serialize)
1264
+ response = JSON.parse(body)
1265
+ if response['Response'].key?('Error') == false
1266
+ model = DescribeDBSwitchRecordsResponse.new
1267
+ model.deserialize(response['Response'])
1268
+ model
1269
+ else
1270
+ code = response['Response']['Error']['Code']
1271
+ message = response['Response']['Error']['Message']
1272
+ reqid = response['Response']['RequestId']
1273
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1274
+ end
1275
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1276
+ raise e
1277
+ rescue StandardError => e
1278
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1279
+ end
1280
+
1281
+ # 本接口(DescribeDBZoneConfig)用于查询可创建的云数据库各地域可售卖的规格配置。
1282
+
1283
+ # @param request: Request instance for DescribeDBZoneConfig.
1284
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDBZoneConfigRequest`
1285
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDBZoneConfigResponse`
1286
+ def DescribeDBZoneConfig(request)
1287
+ body = send_request('DescribeDBZoneConfig', request.serialize)
1288
+ response = JSON.parse(body)
1289
+ if response['Response'].key?('Error') == false
1290
+ model = DescribeDBZoneConfigResponse.new
1291
+ model.deserialize(response['Response'])
1292
+ model
1293
+ else
1294
+ code = response['Response']['Error']['Code']
1295
+ message = response['Response']['Error']['Message']
1296
+ reqid = response['Response']['RequestId']
1297
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1298
+ end
1299
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1300
+ raise e
1301
+ rescue StandardError => e
1302
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1303
+ end
1304
+
1305
+ # 本接口(DescribeDataBackupOverview)用于查询用户在当前地域总的数据备份概览。
1306
+
1307
+ # @param request: Request instance for DescribeDataBackupOverview.
1308
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDataBackupOverviewRequest`
1309
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDataBackupOverviewResponse`
1310
+ def DescribeDataBackupOverview(request)
1311
+ body = send_request('DescribeDataBackupOverview', request.serialize)
1312
+ response = JSON.parse(body)
1313
+ if response['Response'].key?('Error') == false
1314
+ model = DescribeDataBackupOverviewResponse.new
1315
+ model.deserialize(response['Response'])
1316
+ model
1317
+ else
1318
+ code = response['Response']['Error']['Code']
1319
+ message = response['Response']['Error']['Message']
1320
+ reqid = response['Response']['RequestId']
1321
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1322
+ end
1323
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1324
+ raise e
1325
+ rescue StandardError => e
1326
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1327
+ end
1328
+
1329
+ # 本接口(DescribeDatabases)用于查询云数据库实例的数据库信息,仅支持主实例和灾备实例,不支持只读实例。
1330
+
1331
+ # @param request: Request instance for DescribeDatabases.
1332
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDatabasesRequest`
1333
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDatabasesResponse`
1334
+ def DescribeDatabases(request)
1335
+ body = send_request('DescribeDatabases', request.serialize)
1336
+ response = JSON.parse(body)
1337
+ if response['Response'].key?('Error') == false
1338
+ model = DescribeDatabasesResponse.new
1339
+ model.deserialize(response['Response'])
1340
+ model
1341
+ else
1342
+ code = response['Response']['Error']['Code']
1343
+ message = response['Response']['Error']['Message']
1344
+ reqid = response['Response']['RequestId']
1345
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1346
+ end
1347
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1348
+ raise e
1349
+ rescue StandardError => e
1350
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1351
+ end
1352
+
1353
+ # 该接口(DescribeDefaultParams)用于查询默认的可设置参数列表。
1354
+
1355
+ # @param request: Request instance for DescribeDefaultParams.
1356
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDefaultParamsRequest`
1357
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDefaultParamsResponse`
1358
+ def DescribeDefaultParams(request)
1359
+ body = send_request('DescribeDefaultParams', request.serialize)
1360
+ response = JSON.parse(body)
1361
+ if response['Response'].key?('Error') == false
1362
+ model = DescribeDefaultParamsResponse.new
1363
+ model.deserialize(response['Response'])
1364
+ model
1365
+ else
1366
+ code = response['Response']['Error']['Code']
1367
+ message = response['Response']['Error']['Message']
1368
+ reqid = response['Response']['RequestId']
1369
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1370
+ end
1371
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1372
+ raise e
1373
+ rescue StandardError => e
1374
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1375
+ end
1376
+
1377
+ # 本接口(DescribeDeployGroupList)用于查询用户的置放群组列表,可以指定置放群组 ID 或置放群组名称。
1378
+
1379
+ # @param request: Request instance for DescribeDeployGroupList.
1380
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDeployGroupListRequest`
1381
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDeployGroupListResponse`
1382
+ def DescribeDeployGroupList(request)
1383
+ body = send_request('DescribeDeployGroupList', request.serialize)
1384
+ response = JSON.parse(body)
1385
+ if response['Response'].key?('Error') == false
1386
+ model = DescribeDeployGroupListResponse.new
1387
+ model.deserialize(response['Response'])
1388
+ model
1389
+ else
1390
+ code = response['Response']['Error']['Code']
1391
+ message = response['Response']['Error']['Message']
1392
+ reqid = response['Response']['RequestId']
1393
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1394
+ end
1395
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1396
+ raise e
1397
+ rescue StandardError => e
1398
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1399
+ end
1400
+
1401
+ # 本接口(DescribeDeviceMonitorInfo)用于查询云数据库物理机当天的监控信息,暂只支持内存488G、硬盘6T的实例查询。
1402
+
1403
+ # @param request: Request instance for DescribeDeviceMonitorInfo.
1404
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeDeviceMonitorInfoRequest`
1405
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeDeviceMonitorInfoResponse`
1406
+ def DescribeDeviceMonitorInfo(request)
1407
+ body = send_request('DescribeDeviceMonitorInfo', request.serialize)
1408
+ response = JSON.parse(body)
1409
+ if response['Response'].key?('Error') == false
1410
+ model = DescribeDeviceMonitorInfoResponse.new
1411
+ model.deserialize(response['Response'])
1412
+ model
1413
+ else
1414
+ code = response['Response']['Error']['Code']
1415
+ message = response['Response']['Error']['Message']
1416
+ reqid = response['Response']['RequestId']
1417
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1418
+ end
1419
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1420
+ raise e
1421
+ rescue StandardError => e
1422
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1423
+ end
1424
+
1425
+ # 根据检索条件查询实例错误日志详情。只能查询一个月之内的错误日志。
1426
+
1427
+ # @param request: Request instance for DescribeErrorLogData.
1428
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeErrorLogDataRequest`
1429
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeErrorLogDataResponse`
1430
+ def DescribeErrorLogData(request)
1431
+ body = send_request('DescribeErrorLogData', request.serialize)
1432
+ response = JSON.parse(body)
1433
+ if response['Response'].key?('Error') == false
1434
+ model = DescribeErrorLogDataResponse.new
1435
+ model.deserialize(response['Response'])
1436
+ model
1437
+ else
1438
+ code = response['Response']['Error']['Code']
1439
+ message = response['Response']['Error']['Message']
1440
+ reqid = response['Response']['RequestId']
1441
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1442
+ end
1443
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1444
+ raise e
1445
+ rescue StandardError => e
1446
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1447
+ end
1448
+
1449
+ # 该接口(DescribeInstanceParamRecords)用于查询实例参数修改历史。
1450
+
1451
+ # @param request: Request instance for DescribeInstanceParamRecords.
1452
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeInstanceParamRecordsRequest`
1453
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeInstanceParamRecordsResponse`
1454
+ def DescribeInstanceParamRecords(request)
1455
+ body = send_request('DescribeInstanceParamRecords', request.serialize)
1456
+ response = JSON.parse(body)
1457
+ if response['Response'].key?('Error') == false
1458
+ model = DescribeInstanceParamRecordsResponse.new
1459
+ model.deserialize(response['Response'])
1460
+ model
1461
+ else
1462
+ code = response['Response']['Error']['Code']
1463
+ message = response['Response']['Error']['Message']
1464
+ reqid = response['Response']['RequestId']
1465
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1466
+ end
1467
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1468
+ raise e
1469
+ rescue StandardError => e
1470
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1471
+ end
1472
+
1473
+ # 该接口(DescribeInstanceParams)用于查询实例的参数列表。
1474
+
1475
+ # @param request: Request instance for DescribeInstanceParams.
1476
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeInstanceParamsRequest`
1477
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeInstanceParamsResponse`
1478
+ def DescribeInstanceParams(request)
1479
+ body = send_request('DescribeInstanceParams', request.serialize)
1480
+ response = JSON.parse(body)
1481
+ if response['Response'].key?('Error') == false
1482
+ model = DescribeInstanceParamsResponse.new
1483
+ model.deserialize(response['Response'])
1484
+ model
1485
+ else
1486
+ code = response['Response']['Error']['Code']
1487
+ message = response['Response']['Error']['Message']
1488
+ reqid = response['Response']['RequestId']
1489
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1490
+ end
1491
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1492
+ raise e
1493
+ rescue StandardError => e
1494
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1495
+ end
1496
+
1497
+ # 该接口(DescribeParamTemplateInfo)用于查询参数模板详情,全地域公共参数Region均为ap-guangzhou。
1498
+
1499
+ # @param request: Request instance for DescribeParamTemplateInfo.
1500
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeParamTemplateInfoRequest`
1501
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeParamTemplateInfoResponse`
1502
+ def DescribeParamTemplateInfo(request)
1503
+ body = send_request('DescribeParamTemplateInfo', request.serialize)
1504
+ response = JSON.parse(body)
1505
+ if response['Response'].key?('Error') == false
1506
+ model = DescribeParamTemplateInfoResponse.new
1507
+ model.deserialize(response['Response'])
1508
+ model
1509
+ else
1510
+ code = response['Response']['Error']['Code']
1511
+ message = response['Response']['Error']['Message']
1512
+ reqid = response['Response']['RequestId']
1513
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1514
+ end
1515
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1516
+ raise e
1517
+ rescue StandardError => e
1518
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1519
+ end
1520
+
1521
+ # 该接口(DescribeParamTemplates)查询参数模板列表。
1522
+
1523
+ # @param request: Request instance for DescribeParamTemplates.
1524
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeParamTemplatesRequest`
1525
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeParamTemplatesResponse`
1526
+ def DescribeParamTemplates(request)
1527
+ body = send_request('DescribeParamTemplates', request.serialize)
1528
+ response = JSON.parse(body)
1529
+ if response['Response'].key?('Error') == false
1530
+ model = DescribeParamTemplatesResponse.new
1531
+ model.deserialize(response['Response'])
1532
+ model
1533
+ else
1534
+ code = response['Response']['Error']['Code']
1535
+ message = response['Response']['Error']['Message']
1536
+ reqid = response['Response']['RequestId']
1537
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1538
+ end
1539
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1540
+ raise e
1541
+ rescue StandardError => e
1542
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1543
+ end
1544
+
1545
+ # 本接口(DescribeProjectSecurityGroups)用于查询项目的安全组详情。
1546
+
1547
+ # @param request: Request instance for DescribeProjectSecurityGroups.
1548
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeProjectSecurityGroupsRequest`
1549
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeProjectSecurityGroupsResponse`
1550
+ def DescribeProjectSecurityGroups(request)
1551
+ body = send_request('DescribeProjectSecurityGroups', request.serialize)
1552
+ response = JSON.parse(body)
1553
+ if response['Response'].key?('Error') == false
1554
+ model = DescribeProjectSecurityGroupsResponse.new
1555
+ model.deserialize(response['Response'])
1556
+ model
1557
+ else
1558
+ code = response['Response']['Error']['Code']
1559
+ message = response['Response']['Error']['Message']
1560
+ reqid = response['Response']['RequestId']
1561
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1562
+ end
1563
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1564
+ raise e
1565
+ rescue StandardError => e
1566
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1567
+ end
1568
+
1569
+ # 本接口(DescribeRoGroups)用于查询云数据库实例的所有的RO组的信息。
1570
+
1571
+ # @param request: Request instance for DescribeRoGroups.
1572
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeRoGroupsRequest`
1573
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeRoGroupsResponse`
1574
+ def DescribeRoGroups(request)
1575
+ body = send_request('DescribeRoGroups', request.serialize)
1576
+ response = JSON.parse(body)
1577
+ if response['Response'].key?('Error') == false
1578
+ model = DescribeRoGroupsResponse.new
1579
+ model.deserialize(response['Response'])
1580
+ model
1581
+ else
1582
+ code = response['Response']['Error']['Code']
1583
+ message = response['Response']['Error']['Message']
1584
+ reqid = response['Response']['RequestId']
1585
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1586
+ end
1587
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1588
+ raise e
1589
+ rescue StandardError => e
1590
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1591
+ end
1592
+
1593
+ # 本接口(DescribeRoMinScale)用于获取只读实例购买、升级时的最小规格。
1594
+
1595
+ # @param request: Request instance for DescribeRoMinScale.
1596
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeRoMinScaleRequest`
1597
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeRoMinScaleResponse`
1598
+ def DescribeRoMinScale(request)
1599
+ body = send_request('DescribeRoMinScale', request.serialize)
1600
+ response = JSON.parse(body)
1601
+ if response['Response'].key?('Error') == false
1602
+ model = DescribeRoMinScaleResponse.new
1603
+ model.deserialize(response['Response'])
1604
+ model
1605
+ else
1606
+ code = response['Response']['Error']['Code']
1607
+ message = response['Response']['Error']['Message']
1608
+ reqid = response['Response']['RequestId']
1609
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1610
+ end
1611
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1612
+ raise e
1613
+ rescue StandardError => e
1614
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1615
+ end
1616
+
1617
+ # 本接口(DescribeRollbackRangeTime)用于查询云数据库实例可回档的时间范围。
1618
+
1619
+ # @param request: Request instance for DescribeRollbackRangeTime.
1620
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeRollbackRangeTimeRequest`
1621
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeRollbackRangeTimeResponse`
1622
+ def DescribeRollbackRangeTime(request)
1623
+ body = send_request('DescribeRollbackRangeTime', request.serialize)
1624
+ response = JSON.parse(body)
1625
+ if response['Response'].key?('Error') == false
1626
+ model = DescribeRollbackRangeTimeResponse.new
1627
+ model.deserialize(response['Response'])
1628
+ model
1629
+ else
1630
+ code = response['Response']['Error']['Code']
1631
+ message = response['Response']['Error']['Message']
1632
+ reqid = response['Response']['RequestId']
1633
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1634
+ end
1635
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1636
+ raise e
1637
+ rescue StandardError => e
1638
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1639
+ end
1640
+
1641
+ # 本接口(DescribeRollbackTaskDetail)用于查询云数据库实例回档任务详情。
1642
+
1643
+ # @param request: Request instance for DescribeRollbackTaskDetail.
1644
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeRollbackTaskDetailRequest`
1645
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeRollbackTaskDetailResponse`
1646
+ def DescribeRollbackTaskDetail(request)
1647
+ body = send_request('DescribeRollbackTaskDetail', request.serialize)
1648
+ response = JSON.parse(body)
1649
+ if response['Response'].key?('Error') == false
1650
+ model = DescribeRollbackTaskDetailResponse.new
1651
+ model.deserialize(response['Response'])
1652
+ model
1653
+ else
1654
+ code = response['Response']['Error']['Code']
1655
+ message = response['Response']['Error']['Message']
1656
+ reqid = response['Response']['RequestId']
1657
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1658
+ end
1659
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1660
+ raise e
1661
+ rescue StandardError => e
1662
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1663
+ end
1664
+
1665
+ # 条件检索实例的慢日志。只允许查看一个月之内的慢日志
1666
+
1667
+ # @param request: Request instance for DescribeSlowLogData.
1668
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeSlowLogDataRequest`
1669
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeSlowLogDataResponse`
1670
+ def DescribeSlowLogData(request)
1671
+ body = send_request('DescribeSlowLogData', request.serialize)
1672
+ response = JSON.parse(body)
1673
+ if response['Response'].key?('Error') == false
1674
+ model = DescribeSlowLogDataResponse.new
1675
+ model.deserialize(response['Response'])
1676
+ model
1677
+ else
1678
+ code = response['Response']['Error']['Code']
1679
+ message = response['Response']['Error']['Message']
1680
+ reqid = response['Response']['RequestId']
1681
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1682
+ end
1683
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1684
+ raise e
1685
+ rescue StandardError => e
1686
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1687
+ end
1688
+
1689
+ # 本接口(DescribeSlowLogs)用于获取云数据库实例的慢查询日志。
1690
+
1691
+ # @param request: Request instance for DescribeSlowLogs.
1692
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeSlowLogsRequest`
1693
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeSlowLogsResponse`
1694
+ def DescribeSlowLogs(request)
1695
+ body = send_request('DescribeSlowLogs', request.serialize)
1696
+ response = JSON.parse(body)
1697
+ if response['Response'].key?('Error') == false
1698
+ model = DescribeSlowLogsResponse.new
1699
+ model.deserialize(response['Response'])
1700
+ model
1701
+ else
1702
+ code = response['Response']['Error']['Code']
1703
+ message = response['Response']['Error']['Message']
1704
+ reqid = response['Response']['RequestId']
1705
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1706
+ end
1707
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1708
+ raise e
1709
+ rescue StandardError => e
1710
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1711
+ end
1712
+
1713
+ # 本接口(DescribeSupportedPrivileges)用于查询云数据库的支持的权限信息,包括全局权限,数据库权限,表权限以及列权限。
1714
+
1715
+ # @param request: Request instance for DescribeSupportedPrivileges.
1716
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeSupportedPrivilegesRequest`
1717
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeSupportedPrivilegesResponse`
1718
+ def DescribeSupportedPrivileges(request)
1719
+ body = send_request('DescribeSupportedPrivileges', request.serialize)
1720
+ response = JSON.parse(body)
1721
+ if response['Response'].key?('Error') == false
1722
+ model = DescribeSupportedPrivilegesResponse.new
1723
+ model.deserialize(response['Response'])
1724
+ model
1725
+ else
1726
+ code = response['Response']['Error']['Code']
1727
+ message = response['Response']['Error']['Message']
1728
+ reqid = response['Response']['RequestId']
1729
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1730
+ end
1731
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1732
+ raise e
1733
+ rescue StandardError => e
1734
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1735
+ end
1736
+
1737
+ # 本接口(DescribeTables)用于查询云数据库实例的数据库表信息,仅支持主实例和灾备实例,不支持只读实例。
1738
+
1739
+ # @param request: Request instance for DescribeTables.
1740
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeTablesRequest`
1741
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeTablesResponse`
1742
+ def DescribeTables(request)
1743
+ body = send_request('DescribeTables', request.serialize)
1744
+ response = JSON.parse(body)
1745
+ if response['Response'].key?('Error') == false
1746
+ model = DescribeTablesResponse.new
1747
+ model.deserialize(response['Response'])
1748
+ model
1749
+ else
1750
+ code = response['Response']['Error']['Code']
1751
+ message = response['Response']['Error']['Message']
1752
+ reqid = response['Response']['RequestId']
1753
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1754
+ end
1755
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1756
+ raise e
1757
+ rescue StandardError => e
1758
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1759
+ end
1760
+
1761
+ # 本接口(DescribeTagsOfInstanceIds)用于获取云数据库实例的标签信息。
1762
+
1763
+ # @param request: Request instance for DescribeTagsOfInstanceIds.
1764
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeTagsOfInstanceIdsRequest`
1765
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeTagsOfInstanceIdsResponse`
1766
+ def DescribeTagsOfInstanceIds(request)
1767
+ body = send_request('DescribeTagsOfInstanceIds', request.serialize)
1768
+ response = JSON.parse(body)
1769
+ if response['Response'].key?('Error') == false
1770
+ model = DescribeTagsOfInstanceIdsResponse.new
1771
+ model.deserialize(response['Response'])
1772
+ model
1773
+ else
1774
+ code = response['Response']['Error']['Code']
1775
+ message = response['Response']['Error']['Message']
1776
+ reqid = response['Response']['RequestId']
1777
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1778
+ end
1779
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1780
+ raise e
1781
+ rescue StandardError => e
1782
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1783
+ end
1784
+
1785
+ # 本接口(DescribeTasks)用于查询云数据库实例任务列表。
1786
+
1787
+ # @param request: Request instance for DescribeTasks.
1788
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeTasksRequest`
1789
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeTasksResponse`
1790
+ def DescribeTasks(request)
1791
+ body = send_request('DescribeTasks', request.serialize)
1792
+ response = JSON.parse(body)
1793
+ if response['Response'].key?('Error') == false
1794
+ model = DescribeTasksResponse.new
1795
+ model.deserialize(response['Response'])
1796
+ model
1797
+ else
1798
+ code = response['Response']['Error']['Code']
1799
+ message = response['Response']['Error']['Message']
1800
+ reqid = response['Response']['RequestId']
1801
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1802
+ end
1803
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1804
+ raise e
1805
+ rescue StandardError => e
1806
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1807
+ end
1808
+
1809
+ # 本接口(DescribeTimeWindow)用于查询云数据库实例的维护时间窗口。
1810
+
1811
+ # @param request: Request instance for DescribeTimeWindow.
1812
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeTimeWindowRequest`
1813
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeTimeWindowResponse`
1814
+ def DescribeTimeWindow(request)
1815
+ body = send_request('DescribeTimeWindow', request.serialize)
1816
+ response = JSON.parse(body)
1817
+ if response['Response'].key?('Error') == false
1818
+ model = DescribeTimeWindowResponse.new
1819
+ model.deserialize(response['Response'])
1820
+ model
1821
+ else
1822
+ code = response['Response']['Error']['Code']
1823
+ message = response['Response']['Error']['Message']
1824
+ reqid = response['Response']['RequestId']
1825
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1826
+ end
1827
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1828
+ raise e
1829
+ rescue StandardError => e
1830
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1831
+ end
1832
+
1833
+ # 本接口(DescribeUploadedFiles)用于查询用户导入的SQL文件列表。
1834
+
1835
+ # @param request: Request instance for DescribeUploadedFiles.
1836
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DescribeUploadedFilesRequest`
1837
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DescribeUploadedFilesResponse`
1838
+ def DescribeUploadedFiles(request)
1839
+ body = send_request('DescribeUploadedFiles', request.serialize)
1840
+ response = JSON.parse(body)
1841
+ if response['Response'].key?('Error') == false
1842
+ model = DescribeUploadedFilesResponse.new
1843
+ model.deserialize(response['Response'])
1844
+ model
1845
+ else
1846
+ code = response['Response']['Error']['Code']
1847
+ message = response['Response']['Error']['Message']
1848
+ reqid = response['Response']['RequestId']
1849
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1850
+ end
1851
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1852
+ raise e
1853
+ rescue StandardError => e
1854
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1855
+ end
1856
+
1857
+ # 本接口(DisassociateSecurityGroups)用于安全组批量解绑实例。
1858
+
1859
+ # @param request: Request instance for DisassociateSecurityGroups.
1860
+ # @type request: :class:`Tencentcloud::cdb::V20170320::DisassociateSecurityGroupsRequest`
1861
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::DisassociateSecurityGroupsResponse`
1862
+ def DisassociateSecurityGroups(request)
1863
+ body = send_request('DisassociateSecurityGroups', request.serialize)
1864
+ response = JSON.parse(body)
1865
+ if response['Response'].key?('Error') == false
1866
+ model = DisassociateSecurityGroupsResponse.new
1867
+ model.deserialize(response['Response'])
1868
+ model
1869
+ else
1870
+ code = response['Response']['Error']['Code']
1871
+ message = response['Response']['Error']['Message']
1872
+ reqid = response['Response']['RequestId']
1873
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1874
+ end
1875
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1876
+ raise e
1877
+ rescue StandardError => e
1878
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1879
+ end
1880
+
1881
+ # 本接口(InitDBInstances)用于初始化云数据库实例,包括初始化密码、默认字符集、实例端口号等
1882
+
1883
+ # @param request: Request instance for InitDBInstances.
1884
+ # @type request: :class:`Tencentcloud::cdb::V20170320::InitDBInstancesRequest`
1885
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::InitDBInstancesResponse`
1886
+ def InitDBInstances(request)
1887
+ body = send_request('InitDBInstances', request.serialize)
1888
+ response = JSON.parse(body)
1889
+ if response['Response'].key?('Error') == false
1890
+ model = InitDBInstancesResponse.new
1891
+ model.deserialize(response['Response'])
1892
+ model
1893
+ else
1894
+ code = response['Response']['Error']['Code']
1895
+ message = response['Response']['Error']['Message']
1896
+ reqid = response['Response']['RequestId']
1897
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1898
+ end
1899
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1900
+ raise e
1901
+ rescue StandardError => e
1902
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1903
+ end
1904
+
1905
+ # 本接口(InquiryPriceUpgradeInstances)用于查询云数据库实例升级的价格,支持查询按量计费或者包年包月实例的升级价格,实例类型支持主实例、灾备实例和只读实例。
1906
+
1907
+ # @param request: Request instance for InquiryPriceUpgradeInstances.
1908
+ # @type request: :class:`Tencentcloud::cdb::V20170320::InquiryPriceUpgradeInstancesRequest`
1909
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::InquiryPriceUpgradeInstancesResponse`
1910
+ def InquiryPriceUpgradeInstances(request)
1911
+ body = send_request('InquiryPriceUpgradeInstances', request.serialize)
1912
+ response = JSON.parse(body)
1913
+ if response['Response'].key?('Error') == false
1914
+ model = InquiryPriceUpgradeInstancesResponse.new
1915
+ model.deserialize(response['Response'])
1916
+ model
1917
+ else
1918
+ code = response['Response']['Error']['Code']
1919
+ message = response['Response']['Error']['Message']
1920
+ reqid = response['Response']['RequestId']
1921
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1922
+ end
1923
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1924
+ raise e
1925
+ rescue StandardError => e
1926
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1927
+ end
1928
+
1929
+ # 本接口(IsolateDBInstance)用于隔离云数据库实例,隔离后不能通过IP和端口访问数据库。隔离的实例可在回收站中进行开机。若为欠费隔离,请尽快进行充值。
1930
+
1931
+ # @param request: Request instance for IsolateDBInstance.
1932
+ # @type request: :class:`Tencentcloud::cdb::V20170320::IsolateDBInstanceRequest`
1933
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::IsolateDBInstanceResponse`
1934
+ def IsolateDBInstance(request)
1935
+ body = send_request('IsolateDBInstance', request.serialize)
1936
+ response = JSON.parse(body)
1937
+ if response['Response'].key?('Error') == false
1938
+ model = IsolateDBInstanceResponse.new
1939
+ model.deserialize(response['Response'])
1940
+ model
1941
+ else
1942
+ code = response['Response']['Error']['Code']
1943
+ message = response['Response']['Error']['Message']
1944
+ reqid = response['Response']['RequestId']
1945
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1946
+ end
1947
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1948
+ raise e
1949
+ rescue StandardError => e
1950
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1951
+ end
1952
+
1953
+ # 本接口(ModifyAccountDescription)用于修改云数据库账户的备注信息。
1954
+
1955
+ # @param request: Request instance for ModifyAccountDescription.
1956
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyAccountDescriptionRequest`
1957
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyAccountDescriptionResponse`
1958
+ def ModifyAccountDescription(request)
1959
+ body = send_request('ModifyAccountDescription', request.serialize)
1960
+ response = JSON.parse(body)
1961
+ if response['Response'].key?('Error') == false
1962
+ model = ModifyAccountDescriptionResponse.new
1963
+ model.deserialize(response['Response'])
1964
+ model
1965
+ else
1966
+ code = response['Response']['Error']['Code']
1967
+ message = response['Response']['Error']['Message']
1968
+ reqid = response['Response']['RequestId']
1969
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1970
+ end
1971
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1972
+ raise e
1973
+ rescue StandardError => e
1974
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1975
+ end
1976
+
1977
+ # 本接口(ModifyAccountHost)用于修改云数据库账户的主机。
1978
+
1979
+ # @param request: Request instance for ModifyAccountHost.
1980
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyAccountHostRequest`
1981
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyAccountHostResponse`
1982
+ def ModifyAccountHost(request)
1983
+ body = send_request('ModifyAccountHost', request.serialize)
1984
+ response = JSON.parse(body)
1985
+ if response['Response'].key?('Error') == false
1986
+ model = ModifyAccountHostResponse.new
1987
+ model.deserialize(response['Response'])
1988
+ model
1989
+ else
1990
+ code = response['Response']['Error']['Code']
1991
+ message = response['Response']['Error']['Message']
1992
+ reqid = response['Response']['RequestId']
1993
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
1994
+ end
1995
+ rescue TencentCloud::Common::TencentCloudSDKException => e
1996
+ raise e
1997
+ rescue StandardError => e
1998
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
1999
+ end
2000
+
2001
+ # 本接口(ModifyAccountMaxUserConnections)用于修改云数据库账户最大可用连接数。
2002
+
2003
+ # @param request: Request instance for ModifyAccountMaxUserConnections.
2004
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyAccountMaxUserConnectionsRequest`
2005
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyAccountMaxUserConnectionsResponse`
2006
+ def ModifyAccountMaxUserConnections(request)
2007
+ body = send_request('ModifyAccountMaxUserConnections', request.serialize)
2008
+ response = JSON.parse(body)
2009
+ if response['Response'].key?('Error') == false
2010
+ model = ModifyAccountMaxUserConnectionsResponse.new
2011
+ model.deserialize(response['Response'])
2012
+ model
2013
+ else
2014
+ code = response['Response']['Error']['Code']
2015
+ message = response['Response']['Error']['Message']
2016
+ reqid = response['Response']['RequestId']
2017
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2018
+ end
2019
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2020
+ raise e
2021
+ rescue StandardError => e
2022
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2023
+ end
2024
+
2025
+ # 本接口(ModifyAccountPassword)用于修改云数据库账户的密码。
2026
+
2027
+ # @param request: Request instance for ModifyAccountPassword.
2028
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyAccountPasswordRequest`
2029
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyAccountPasswordResponse`
2030
+ def ModifyAccountPassword(request)
2031
+ body = send_request('ModifyAccountPassword', request.serialize)
2032
+ response = JSON.parse(body)
2033
+ if response['Response'].key?('Error') == false
2034
+ model = ModifyAccountPasswordResponse.new
2035
+ model.deserialize(response['Response'])
2036
+ model
2037
+ else
2038
+ code = response['Response']['Error']['Code']
2039
+ message = response['Response']['Error']['Message']
2040
+ reqid = response['Response']['RequestId']
2041
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2042
+ end
2043
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2044
+ raise e
2045
+ rescue StandardError => e
2046
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2047
+ end
2048
+
2049
+ # 本接口(ModifyAccountPrivileges)用于修改云数据库的账户的权限信息。
2050
+
2051
+ # 注意,修改账号权限时,需要传入该账号下的全量权限信息。用户可以先通过 [查询云数据库账户的权限信息
2052
+ # ](https://cloud.tencent.com/document/api/236/17500) 查询该账号下的全量权限信息,然后进行权限修改。
2053
+
2054
+ # @param request: Request instance for ModifyAccountPrivileges.
2055
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyAccountPrivilegesRequest`
2056
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyAccountPrivilegesResponse`
2057
+ def ModifyAccountPrivileges(request)
2058
+ body = send_request('ModifyAccountPrivileges', request.serialize)
2059
+ response = JSON.parse(body)
2060
+ if response['Response'].key?('Error') == false
2061
+ model = ModifyAccountPrivilegesResponse.new
2062
+ model.deserialize(response['Response'])
2063
+ model
2064
+ else
2065
+ code = response['Response']['Error']['Code']
2066
+ message = response['Response']['Error']['Message']
2067
+ reqid = response['Response']['RequestId']
2068
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2069
+ end
2070
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2071
+ raise e
2072
+ rescue StandardError => e
2073
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2074
+ end
2075
+
2076
+ # 本接口(ModifyAuditConfig)用于修改云数据库审计策略的服务配置,包括审计日志保存时长等。
2077
+
2078
+ # @param request: Request instance for ModifyAuditConfig.
2079
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyAuditConfigRequest`
2080
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyAuditConfigResponse`
2081
+ def ModifyAuditConfig(request)
2082
+ body = send_request('ModifyAuditConfig', request.serialize)
2083
+ response = JSON.parse(body)
2084
+ if response['Response'].key?('Error') == false
2085
+ model = ModifyAuditConfigResponse.new
2086
+ model.deserialize(response['Response'])
2087
+ model
2088
+ else
2089
+ code = response['Response']['Error']['Code']
2090
+ message = response['Response']['Error']['Message']
2091
+ reqid = response['Response']['RequestId']
2092
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2093
+ end
2094
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2095
+ raise e
2096
+ rescue StandardError => e
2097
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2098
+ end
2099
+
2100
+ # 本接口(ModifyAuditRule)用于修改用户的审计规则。
2101
+
2102
+ # @param request: Request instance for ModifyAuditRule.
2103
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyAuditRuleRequest`
2104
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyAuditRuleResponse`
2105
+ def ModifyAuditRule(request)
2106
+ body = send_request('ModifyAuditRule', request.serialize)
2107
+ response = JSON.parse(body)
2108
+ if response['Response'].key?('Error') == false
2109
+ model = ModifyAuditRuleResponse.new
2110
+ model.deserialize(response['Response'])
2111
+ model
2112
+ else
2113
+ code = response['Response']['Error']['Code']
2114
+ message = response['Response']['Error']['Message']
2115
+ reqid = response['Response']['RequestId']
2116
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2117
+ end
2118
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2119
+ raise e
2120
+ rescue StandardError => e
2121
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2122
+ end
2123
+
2124
+ # 本接口(ModifyAutoRenewFlag)用于修改云数据库实例的自动续费标记。仅支持包年包月的实例设置自动续费标记。
2125
+
2126
+ # @param request: Request instance for ModifyAutoRenewFlag.
2127
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyAutoRenewFlagRequest`
2128
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyAutoRenewFlagResponse`
2129
+ def ModifyAutoRenewFlag(request)
2130
+ body = send_request('ModifyAutoRenewFlag', request.serialize)
2131
+ response = JSON.parse(body)
2132
+ if response['Response'].key?('Error') == false
2133
+ model = ModifyAutoRenewFlagResponse.new
2134
+ model.deserialize(response['Response'])
2135
+ model
2136
+ else
2137
+ code = response['Response']['Error']['Code']
2138
+ message = response['Response']['Error']['Message']
2139
+ reqid = response['Response']['RequestId']
2140
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2141
+ end
2142
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2143
+ raise e
2144
+ rescue StandardError => e
2145
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2146
+ end
2147
+
2148
+ # 本接口(ModifyBackupConfig)用于修改数据库备份配置信息。
2149
+
2150
+ # @param request: Request instance for ModifyBackupConfig.
2151
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyBackupConfigRequest`
2152
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyBackupConfigResponse`
2153
+ def ModifyBackupConfig(request)
2154
+ body = send_request('ModifyBackupConfig', request.serialize)
2155
+ response = JSON.parse(body)
2156
+ if response['Response'].key?('Error') == false
2157
+ model = ModifyBackupConfigResponse.new
2158
+ model.deserialize(response['Response'])
2159
+ model
2160
+ else
2161
+ code = response['Response']['Error']['Code']
2162
+ message = response['Response']['Error']['Message']
2163
+ reqid = response['Response']['RequestId']
2164
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2165
+ end
2166
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2167
+ raise e
2168
+ rescue StandardError => e
2169
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2170
+ end
2171
+
2172
+ # 该接口用于修改用户当前地域的备份文件限制下载来源,可以设置内外网均可下载、仅内网可下载,或内网指定的vpc、ip可以下载。
2173
+
2174
+ # @param request: Request instance for ModifyBackupDownloadRestriction.
2175
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyBackupDownloadRestrictionRequest`
2176
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyBackupDownloadRestrictionResponse`
2177
+ def ModifyBackupDownloadRestriction(request)
2178
+ body = send_request('ModifyBackupDownloadRestriction', request.serialize)
2179
+ response = JSON.parse(body)
2180
+ if response['Response'].key?('Error') == false
2181
+ model = ModifyBackupDownloadRestrictionResponse.new
2182
+ model.deserialize(response['Response'])
2183
+ model
2184
+ else
2185
+ code = response['Response']['Error']['Code']
2186
+ message = response['Response']['Error']['Message']
2187
+ reqid = response['Response']['RequestId']
2188
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2189
+ end
2190
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2191
+ raise e
2192
+ rescue StandardError => e
2193
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2194
+ end
2195
+
2196
+ # 本接口(ModifyDBInstanceName)用于修改云数据库实例的名称。
2197
+
2198
+ # @param request: Request instance for ModifyDBInstanceName.
2199
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyDBInstanceNameRequest`
2200
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyDBInstanceNameResponse`
2201
+ def ModifyDBInstanceName(request)
2202
+ body = send_request('ModifyDBInstanceName', request.serialize)
2203
+ response = JSON.parse(body)
2204
+ if response['Response'].key?('Error') == false
2205
+ model = ModifyDBInstanceNameResponse.new
2206
+ model.deserialize(response['Response'])
2207
+ model
2208
+ else
2209
+ code = response['Response']['Error']['Code']
2210
+ message = response['Response']['Error']['Message']
2211
+ reqid = response['Response']['RequestId']
2212
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2213
+ end
2214
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2215
+ raise e
2216
+ rescue StandardError => e
2217
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2218
+ end
2219
+
2220
+ # 本接口(ModifyDBInstanceProject)用于修改云数据库实例的所属项目。
2221
+
2222
+ # @param request: Request instance for ModifyDBInstanceProject.
2223
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyDBInstanceProjectRequest`
2224
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyDBInstanceProjectResponse`
2225
+ def ModifyDBInstanceProject(request)
2226
+ body = send_request('ModifyDBInstanceProject', request.serialize)
2227
+ response = JSON.parse(body)
2228
+ if response['Response'].key?('Error') == false
2229
+ model = ModifyDBInstanceProjectResponse.new
2230
+ model.deserialize(response['Response'])
2231
+ model
2232
+ else
2233
+ code = response['Response']['Error']['Code']
2234
+ message = response['Response']['Error']['Message']
2235
+ reqid = response['Response']['RequestId']
2236
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2237
+ end
2238
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2239
+ raise e
2240
+ rescue StandardError => e
2241
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2242
+ end
2243
+
2244
+ # 本接口(ModifyDBInstanceSecurityGroups)用于修改实例绑定的安全组。
2245
+
2246
+ # @param request: Request instance for ModifyDBInstanceSecurityGroups.
2247
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyDBInstanceSecurityGroupsRequest`
2248
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyDBInstanceSecurityGroupsResponse`
2249
+ def ModifyDBInstanceSecurityGroups(request)
2250
+ body = send_request('ModifyDBInstanceSecurityGroups', request.serialize)
2251
+ response = JSON.parse(body)
2252
+ if response['Response'].key?('Error') == false
2253
+ model = ModifyDBInstanceSecurityGroupsResponse.new
2254
+ model.deserialize(response['Response'])
2255
+ model
2256
+ else
2257
+ code = response['Response']['Error']['Code']
2258
+ message = response['Response']['Error']['Message']
2259
+ reqid = response['Response']['RequestId']
2260
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2261
+ end
2262
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2263
+ raise e
2264
+ rescue StandardError => e
2265
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2266
+ end
2267
+
2268
+ # 本接口(ModifyDBInstanceVipVport)用于修改云数据库实例的IP和端口号,也可进行基础网络转 VPC 网络和 VPC 网络下的子网变更。
2269
+
2270
+ # @param request: Request instance for ModifyDBInstanceVipVport.
2271
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyDBInstanceVipVportRequest`
2272
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyDBInstanceVipVportResponse`
2273
+ def ModifyDBInstanceVipVport(request)
2274
+ body = send_request('ModifyDBInstanceVipVport', request.serialize)
2275
+ response = JSON.parse(body)
2276
+ if response['Response'].key?('Error') == false
2277
+ model = ModifyDBInstanceVipVportResponse.new
2278
+ model.deserialize(response['Response'])
2279
+ model
2280
+ else
2281
+ code = response['Response']['Error']['Code']
2282
+ message = response['Response']['Error']['Message']
2283
+ reqid = response['Response']['RequestId']
2284
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2285
+ end
2286
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2287
+ raise e
2288
+ rescue StandardError => e
2289
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2290
+ end
2291
+
2292
+ # 本接口(ModifyInstanceParam)用于修改云数据库实例的参数。
2293
+
2294
+ # @param request: Request instance for ModifyInstanceParam.
2295
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyInstanceParamRequest`
2296
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyInstanceParamResponse`
2297
+ def ModifyInstanceParam(request)
2298
+ body = send_request('ModifyInstanceParam', request.serialize)
2299
+ response = JSON.parse(body)
2300
+ if response['Response'].key?('Error') == false
2301
+ model = ModifyInstanceParamResponse.new
2302
+ model.deserialize(response['Response'])
2303
+ model
2304
+ else
2305
+ code = response['Response']['Error']['Code']
2306
+ message = response['Response']['Error']['Message']
2307
+ reqid = response['Response']['RequestId']
2308
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2309
+ end
2310
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2311
+ raise e
2312
+ rescue StandardError => e
2313
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2314
+ end
2315
+
2316
+ # 本接口(ModifyInstanceTag)用于对实例标签进行添加、修改或者删除。
2317
+
2318
+ # @param request: Request instance for ModifyInstanceTag.
2319
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyInstanceTagRequest`
2320
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyInstanceTagResponse`
2321
+ def ModifyInstanceTag(request)
2322
+ body = send_request('ModifyInstanceTag', request.serialize)
2323
+ response = JSON.parse(body)
2324
+ if response['Response'].key?('Error') == false
2325
+ model = ModifyInstanceTagResponse.new
2326
+ model.deserialize(response['Response'])
2327
+ model
2328
+ else
2329
+ code = response['Response']['Error']['Code']
2330
+ message = response['Response']['Error']['Message']
2331
+ reqid = response['Response']['RequestId']
2332
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2333
+ end
2334
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2335
+ raise e
2336
+ rescue StandardError => e
2337
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2338
+ end
2339
+
2340
+ # 修改置放群组的名称或者描述
2341
+
2342
+ # @param request: Request instance for ModifyNameOrDescByDpId.
2343
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyNameOrDescByDpIdRequest`
2344
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyNameOrDescByDpIdResponse`
2345
+ def ModifyNameOrDescByDpId(request)
2346
+ body = send_request('ModifyNameOrDescByDpId', request.serialize)
2347
+ response = JSON.parse(body)
2348
+ if response['Response'].key?('Error') == false
2349
+ model = ModifyNameOrDescByDpIdResponse.new
2350
+ model.deserialize(response['Response'])
2351
+ model
2352
+ else
2353
+ code = response['Response']['Error']['Code']
2354
+ message = response['Response']['Error']['Message']
2355
+ reqid = response['Response']['RequestId']
2356
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2357
+ end
2358
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2359
+ raise e
2360
+ rescue StandardError => e
2361
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2362
+ end
2363
+
2364
+ # 该接口(ModifyParamTemplate)用于修改参数模板,全地域公共参数Region均为ap-guangzhou。
2365
+
2366
+ # @param request: Request instance for ModifyParamTemplate.
2367
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyParamTemplateRequest`
2368
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyParamTemplateResponse`
2369
+ def ModifyParamTemplate(request)
2370
+ body = send_request('ModifyParamTemplate', request.serialize)
2371
+ response = JSON.parse(body)
2372
+ if response['Response'].key?('Error') == false
2373
+ model = ModifyParamTemplateResponse.new
2374
+ model.deserialize(response['Response'])
2375
+ model
2376
+ else
2377
+ code = response['Response']['Error']['Code']
2378
+ message = response['Response']['Error']['Message']
2379
+ reqid = response['Response']['RequestId']
2380
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2381
+ end
2382
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2383
+ raise e
2384
+ rescue StandardError => e
2385
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2386
+ end
2387
+
2388
+ # 本接口(ModifyRoGroupInfo)用于更新云数据库只读组的信息。包括设置实例延迟超限剔除策略,设置只读实例读权重等。
2389
+
2390
+ # @param request: Request instance for ModifyRoGroupInfo.
2391
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyRoGroupInfoRequest`
2392
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyRoGroupInfoResponse`
2393
+ def ModifyRoGroupInfo(request)
2394
+ body = send_request('ModifyRoGroupInfo', request.serialize)
2395
+ response = JSON.parse(body)
2396
+ if response['Response'].key?('Error') == false
2397
+ model = ModifyRoGroupInfoResponse.new
2398
+ model.deserialize(response['Response'])
2399
+ model
2400
+ else
2401
+ code = response['Response']['Error']['Code']
2402
+ message = response['Response']['Error']['Message']
2403
+ reqid = response['Response']['RequestId']
2404
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2405
+ end
2406
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2407
+ raise e
2408
+ rescue StandardError => e
2409
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2410
+ end
2411
+
2412
+ # 修改延迟只读实例的延迟复制时间。
2413
+
2414
+ # @param request: Request instance for ModifyRoReplicationDelay.
2415
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyRoReplicationDelayRequest`
2416
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyRoReplicationDelayResponse`
2417
+ def ModifyRoReplicationDelay(request)
2418
+ body = send_request('ModifyRoReplicationDelay', request.serialize)
2419
+ response = JSON.parse(body)
2420
+ if response['Response'].key?('Error') == false
2421
+ model = ModifyRoReplicationDelayResponse.new
2422
+ model.deserialize(response['Response'])
2423
+ model
2424
+ else
2425
+ code = response['Response']['Error']['Code']
2426
+ message = response['Response']['Error']['Message']
2427
+ reqid = response['Response']['RequestId']
2428
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2429
+ end
2430
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2431
+ raise e
2432
+ rescue StandardError => e
2433
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2434
+ end
2435
+
2436
+ # 本接口(ModifyTimeWindow)用于更新云数据库实例的维护时间窗口。
2437
+
2438
+ # @param request: Request instance for ModifyTimeWindow.
2439
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ModifyTimeWindowRequest`
2440
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ModifyTimeWindowResponse`
2441
+ def ModifyTimeWindow(request)
2442
+ body = send_request('ModifyTimeWindow', request.serialize)
2443
+ response = JSON.parse(body)
2444
+ if response['Response'].key?('Error') == false
2445
+ model = ModifyTimeWindowResponse.new
2446
+ model.deserialize(response['Response'])
2447
+ model
2448
+ else
2449
+ code = response['Response']['Error']['Code']
2450
+ message = response['Response']['Error']['Message']
2451
+ reqid = response['Response']['RequestId']
2452
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2453
+ end
2454
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2455
+ raise e
2456
+ rescue StandardError => e
2457
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2458
+ end
2459
+
2460
+ # 本接口(OfflineIsolatedInstances)用于立即下线隔离状态的云数据库实例。进行操作的实例状态必须为隔离状态,即通过 [查询实例列表](https://cloud.tencent.com/document/api/236/15872) 接口查询到 Status 值为 5 的实例。
2461
+
2462
+ # 该接口为异步操作,部分资源的回收可能存在延迟。您可以通过使用 [查询实例列表](https://cloud.tencent.com/document/api/236/15872) 接口,指定实例 InstanceId 和状态 Status 为 [5,6,7] 进行查询,若返回实例为空,则实例资源已全部释放。
2463
+
2464
+ # 注意,实例下线后,相关资源和数据将无法找回,请谨慎操作。
2465
+
2466
+ # @param request: Request instance for OfflineIsolatedInstances.
2467
+ # @type request: :class:`Tencentcloud::cdb::V20170320::OfflineIsolatedInstancesRequest`
2468
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::OfflineIsolatedInstancesResponse`
2469
+ def OfflineIsolatedInstances(request)
2470
+ body = send_request('OfflineIsolatedInstances', request.serialize)
2471
+ response = JSON.parse(body)
2472
+ if response['Response'].key?('Error') == false
2473
+ model = OfflineIsolatedInstancesResponse.new
2474
+ model.deserialize(response['Response'])
2475
+ model
2476
+ else
2477
+ code = response['Response']['Error']['Code']
2478
+ message = response['Response']['Error']['Message']
2479
+ reqid = response['Response']['RequestId']
2480
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2481
+ end
2482
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2483
+ raise e
2484
+ rescue StandardError => e
2485
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2486
+ end
2487
+
2488
+ # 本接口(OpenDBInstanceGTID)用于开启云数据库实例的 GTID,只支持版本为 5.6 以及以上的实例。
2489
+
2490
+ # @param request: Request instance for OpenDBInstanceGTID.
2491
+ # @type request: :class:`Tencentcloud::cdb::V20170320::OpenDBInstanceGTIDRequest`
2492
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::OpenDBInstanceGTIDResponse`
2493
+ def OpenDBInstanceGTID(request)
2494
+ body = send_request('OpenDBInstanceGTID', request.serialize)
2495
+ response = JSON.parse(body)
2496
+ if response['Response'].key?('Error') == false
2497
+ model = OpenDBInstanceGTIDResponse.new
2498
+ model.deserialize(response['Response'])
2499
+ model
2500
+ else
2501
+ code = response['Response']['Error']['Code']
2502
+ message = response['Response']['Error']['Message']
2503
+ reqid = response['Response']['RequestId']
2504
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2505
+ end
2506
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2507
+ raise e
2508
+ rescue StandardError => e
2509
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2510
+ end
2511
+
2512
+ # 本接口(OpenWanService)用于开通实例外网访问。
2513
+
2514
+ # 注意,实例开通外网访问之前,需要先将实例进行 [实例初始化](https://cloud.tencent.com/document/api/236/15873) 操作。
2515
+
2516
+ # @param request: Request instance for OpenWanService.
2517
+ # @type request: :class:`Tencentcloud::cdb::V20170320::OpenWanServiceRequest`
2518
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::OpenWanServiceResponse`
2519
+ def OpenWanService(request)
2520
+ body = send_request('OpenWanService', request.serialize)
2521
+ response = JSON.parse(body)
2522
+ if response['Response'].key?('Error') == false
2523
+ model = OpenWanServiceResponse.new
2524
+ model.deserialize(response['Response'])
2525
+ model
2526
+ else
2527
+ code = response['Response']['Error']['Code']
2528
+ message = response['Response']['Error']['Message']
2529
+ reqid = response['Response']['RequestId']
2530
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2531
+ end
2532
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2533
+ raise e
2534
+ rescue StandardError => e
2535
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2536
+ end
2537
+
2538
+ # 本接口(ReleaseIsolatedDBInstances)用于恢复已隔离云数据库实例。
2539
+
2540
+ # @param request: Request instance for ReleaseIsolatedDBInstances.
2541
+ # @type request: :class:`Tencentcloud::cdb::V20170320::ReleaseIsolatedDBInstancesRequest`
2542
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::ReleaseIsolatedDBInstancesResponse`
2543
+ def ReleaseIsolatedDBInstances(request)
2544
+ body = send_request('ReleaseIsolatedDBInstances', request.serialize)
2545
+ response = JSON.parse(body)
2546
+ if response['Response'].key?('Error') == false
2547
+ model = ReleaseIsolatedDBInstancesResponse.new
2548
+ model.deserialize(response['Response'])
2549
+ model
2550
+ else
2551
+ code = response['Response']['Error']['Code']
2552
+ message = response['Response']['Error']['Message']
2553
+ reqid = response['Response']['RequestId']
2554
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2555
+ end
2556
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2557
+ raise e
2558
+ rescue StandardError => e
2559
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2560
+ end
2561
+
2562
+ # 本接口(RenewDBInstance)用于续费云数据库实例,支持付费模式为包年包月的实例。按量计费实例可通过该接口续费为包年包月的实例。
2563
+
2564
+ # @param request: Request instance for RenewDBInstance.
2565
+ # @type request: :class:`Tencentcloud::cdb::V20170320::RenewDBInstanceRequest`
2566
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::RenewDBInstanceResponse`
2567
+ def RenewDBInstance(request)
2568
+ body = send_request('RenewDBInstance', request.serialize)
2569
+ response = JSON.parse(body)
2570
+ if response['Response'].key?('Error') == false
2571
+ model = RenewDBInstanceResponse.new
2572
+ model.deserialize(response['Response'])
2573
+ model
2574
+ else
2575
+ code = response['Response']['Error']['Code']
2576
+ message = response['Response']['Error']['Message']
2577
+ reqid = response['Response']['RequestId']
2578
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2579
+ end
2580
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2581
+ raise e
2582
+ rescue StandardError => e
2583
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2584
+ end
2585
+
2586
+ # 本接口(RestartDBInstances)用于重启云数据库实例。
2587
+
2588
+ # 注意:
2589
+ # 1、本接口只支持主实例进行重启操作;
2590
+ # 2、实例状态必须为正常,并且没有其他异步任务在执行中。
2591
+
2592
+ # @param request: Request instance for RestartDBInstances.
2593
+ # @type request: :class:`Tencentcloud::cdb::V20170320::RestartDBInstancesRequest`
2594
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::RestartDBInstancesResponse`
2595
+ def RestartDBInstances(request)
2596
+ body = send_request('RestartDBInstances', request.serialize)
2597
+ response = JSON.parse(body)
2598
+ if response['Response'].key?('Error') == false
2599
+ model = RestartDBInstancesResponse.new
2600
+ model.deserialize(response['Response'])
2601
+ model
2602
+ else
2603
+ code = response['Response']['Error']['Code']
2604
+ message = response['Response']['Error']['Message']
2605
+ reqid = response['Response']['RequestId']
2606
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2607
+ end
2608
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2609
+ raise e
2610
+ rescue StandardError => e
2611
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2612
+ end
2613
+
2614
+ # 该接口(StartBatchRollback)用于批量回档云数据库实例的库表。
2615
+
2616
+ # @param request: Request instance for StartBatchRollback.
2617
+ # @type request: :class:`Tencentcloud::cdb::V20170320::StartBatchRollbackRequest`
2618
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::StartBatchRollbackResponse`
2619
+ def StartBatchRollback(request)
2620
+ body = send_request('StartBatchRollback', request.serialize)
2621
+ response = JSON.parse(body)
2622
+ if response['Response'].key?('Error') == false
2623
+ model = StartBatchRollbackResponse.new
2624
+ model.deserialize(response['Response'])
2625
+ model
2626
+ else
2627
+ code = response['Response']['Error']['Code']
2628
+ message = response['Response']['Error']['Message']
2629
+ reqid = response['Response']['RequestId']
2630
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2631
+ end
2632
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2633
+ raise e
2634
+ rescue StandardError => e
2635
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2636
+ end
2637
+
2638
+ # 启动延迟只读实例的延迟复制。
2639
+
2640
+ # @param request: Request instance for StartDelayReplication.
2641
+ # @type request: :class:`Tencentcloud::cdb::V20170320::StartDelayReplicationRequest`
2642
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::StartDelayReplicationResponse`
2643
+ def StartDelayReplication(request)
2644
+ body = send_request('StartDelayReplication', request.serialize)
2645
+ response = JSON.parse(body)
2646
+ if response['Response'].key?('Error') == false
2647
+ model = StartDelayReplicationResponse.new
2648
+ model.deserialize(response['Response'])
2649
+ model
2650
+ else
2651
+ code = response['Response']['Error']['Code']
2652
+ message = response['Response']['Error']['Message']
2653
+ reqid = response['Response']['RequestId']
2654
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2655
+ end
2656
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2657
+ raise e
2658
+ rescue StandardError => e
2659
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2660
+ end
2661
+
2662
+ # 本接口(StopDBImportJob)用于终止数据导入任务。
2663
+
2664
+ # @param request: Request instance for StopDBImportJob.
2665
+ # @type request: :class:`Tencentcloud::cdb::V20170320::StopDBImportJobRequest`
2666
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::StopDBImportJobResponse`
2667
+ def StopDBImportJob(request)
2668
+ body = send_request('StopDBImportJob', request.serialize)
2669
+ response = JSON.parse(body)
2670
+ if response['Response'].key?('Error') == false
2671
+ model = StopDBImportJobResponse.new
2672
+ model.deserialize(response['Response'])
2673
+ model
2674
+ else
2675
+ code = response['Response']['Error']['Code']
2676
+ message = response['Response']['Error']['Message']
2677
+ reqid = response['Response']['RequestId']
2678
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2679
+ end
2680
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2681
+ raise e
2682
+ rescue StandardError => e
2683
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2684
+ end
2685
+
2686
+ # 停止延迟只读实例的延迟复制。
2687
+
2688
+ # @param request: Request instance for StopDelayReplication.
2689
+ # @type request: :class:`Tencentcloud::cdb::V20170320::StopDelayReplicationRequest`
2690
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::StopDelayReplicationResponse`
2691
+ def StopDelayReplication(request)
2692
+ body = send_request('StopDelayReplication', request.serialize)
2693
+ response = JSON.parse(body)
2694
+ if response['Response'].key?('Error') == false
2695
+ model = StopDelayReplicationResponse.new
2696
+ model.deserialize(response['Response'])
2697
+ model
2698
+ else
2699
+ code = response['Response']['Error']['Code']
2700
+ message = response['Response']['Error']['Message']
2701
+ reqid = response['Response']['RequestId']
2702
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2703
+ end
2704
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2705
+ raise e
2706
+ rescue StandardError => e
2707
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2708
+ end
2709
+
2710
+ # 本接口(StopRollback) 用于撤销实例正在进行的回档任务,该接口返回一个异步任务id。 撤销结果可以通过 DescribeAsyncRequestInfo 查询任务的执行情况。
2711
+
2712
+ # @param request: Request instance for StopRollback.
2713
+ # @type request: :class:`Tencentcloud::cdb::V20170320::StopRollbackRequest`
2714
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::StopRollbackResponse`
2715
+ def StopRollback(request)
2716
+ body = send_request('StopRollback', request.serialize)
2717
+ response = JSON.parse(body)
2718
+ if response['Response'].key?('Error') == false
2719
+ model = StopRollbackResponse.new
2720
+ model.deserialize(response['Response'])
2721
+ model
2722
+ else
2723
+ code = response['Response']['Error']['Code']
2724
+ message = response['Response']['Error']['Message']
2725
+ reqid = response['Response']['RequestId']
2726
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2727
+ end
2728
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2729
+ raise e
2730
+ rescue StandardError => e
2731
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2732
+ end
2733
+
2734
+ # 该接口 (SwitchDBInstanceMasterSlave) 支持用户主动切换实例主从角色。
2735
+
2736
+ # @param request: Request instance for SwitchDBInstanceMasterSlave.
2737
+ # @type request: :class:`Tencentcloud::cdb::V20170320::SwitchDBInstanceMasterSlaveRequest`
2738
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::SwitchDBInstanceMasterSlaveResponse`
2739
+ def SwitchDBInstanceMasterSlave(request)
2740
+ body = send_request('SwitchDBInstanceMasterSlave', request.serialize)
2741
+ response = JSON.parse(body)
2742
+ if response['Response'].key?('Error') == false
2743
+ model = SwitchDBInstanceMasterSlaveResponse.new
2744
+ model.deserialize(response['Response'])
2745
+ model
2746
+ else
2747
+ code = response['Response']['Error']['Code']
2748
+ message = response['Response']['Error']['Message']
2749
+ reqid = response['Response']['RequestId']
2750
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2751
+ end
2752
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2753
+ raise e
2754
+ rescue StandardError => e
2755
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2756
+ end
2757
+
2758
+ # 本接口(SwitchDrInstanceToMaster)用于将云数据库灾备实例切换为主实例,注意请求必须发到灾备实例所在的地域。
2759
+
2760
+ # @param request: Request instance for SwitchDrInstanceToMaster.
2761
+ # @type request: :class:`Tencentcloud::cdb::V20170320::SwitchDrInstanceToMasterRequest`
2762
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::SwitchDrInstanceToMasterResponse`
2763
+ def SwitchDrInstanceToMaster(request)
2764
+ body = send_request('SwitchDrInstanceToMaster', request.serialize)
2765
+ response = JSON.parse(body)
2766
+ if response['Response'].key?('Error') == false
2767
+ model = SwitchDrInstanceToMasterResponse.new
2768
+ model.deserialize(response['Response'])
2769
+ model
2770
+ else
2771
+ code = response['Response']['Error']['Code']
2772
+ message = response['Response']['Error']['Message']
2773
+ reqid = response['Response']['RequestId']
2774
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2775
+ end
2776
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2777
+ raise e
2778
+ rescue StandardError => e
2779
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2780
+ end
2781
+
2782
+ # 本接口(SwitchForUpgrade)用于切换访问新实例,针对主升级中的实例处于待切换状态时,用户可主动发起该流程。
2783
+
2784
+ # @param request: Request instance for SwitchForUpgrade.
2785
+ # @type request: :class:`Tencentcloud::cdb::V20170320::SwitchForUpgradeRequest`
2786
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::SwitchForUpgradeResponse`
2787
+ def SwitchForUpgrade(request)
2788
+ body = send_request('SwitchForUpgrade', request.serialize)
2789
+ response = JSON.parse(body)
2790
+ if response['Response'].key?('Error') == false
2791
+ model = SwitchForUpgradeResponse.new
2792
+ model.deserialize(response['Response'])
2793
+ model
2794
+ else
2795
+ code = response['Response']['Error']['Code']
2796
+ message = response['Response']['Error']['Message']
2797
+ reqid = response['Response']['RequestId']
2798
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2799
+ end
2800
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2801
+ raise e
2802
+ rescue StandardError => e
2803
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2804
+ end
2805
+
2806
+ # 本接口(UpgradeDBInstance)用于升级或降级云数据库实例的配置,实例类型支持主实例、灾备实例和只读实例。
2807
+
2808
+ # @param request: Request instance for UpgradeDBInstance.
2809
+ # @type request: :class:`Tencentcloud::cdb::V20170320::UpgradeDBInstanceRequest`
2810
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::UpgradeDBInstanceResponse`
2811
+ def UpgradeDBInstance(request)
2812
+ body = send_request('UpgradeDBInstance', request.serialize)
2813
+ response = JSON.parse(body)
2814
+ if response['Response'].key?('Error') == false
2815
+ model = UpgradeDBInstanceResponse.new
2816
+ model.deserialize(response['Response'])
2817
+ model
2818
+ else
2819
+ code = response['Response']['Error']['Code']
2820
+ message = response['Response']['Error']['Message']
2821
+ reqid = response['Response']['RequestId']
2822
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2823
+ end
2824
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2825
+ raise e
2826
+ rescue StandardError => e
2827
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2828
+ end
2829
+
2830
+ # 本接口(UpgradeDBInstanceEngineVersion)用于升级云数据库实例版本,实例类型支持主实例、灾备实例和只读实例。
2831
+
2832
+ # @param request: Request instance for UpgradeDBInstanceEngineVersion.
2833
+ # @type request: :class:`Tencentcloud::cdb::V20170320::UpgradeDBInstanceEngineVersionRequest`
2834
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::UpgradeDBInstanceEngineVersionResponse`
2835
+ def UpgradeDBInstanceEngineVersion(request)
2836
+ body = send_request('UpgradeDBInstanceEngineVersion', request.serialize)
2837
+ response = JSON.parse(body)
2838
+ if response['Response'].key?('Error') == false
2839
+ model = UpgradeDBInstanceEngineVersionResponse.new
2840
+ model.deserialize(response['Response'])
2841
+ model
2842
+ else
2843
+ code = response['Response']['Error']['Code']
2844
+ message = response['Response']['Error']['Message']
2845
+ reqid = response['Response']['RequestId']
2846
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2847
+ end
2848
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2849
+ raise e
2850
+ rescue StandardError => e
2851
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2852
+ end
2853
+
2854
+ # 本接口(VerifyRootAccount)用于校验云数据库实例的 ROOT 账号是否有足够的权限进行授权操作。
2855
+
2856
+ # @param request: Request instance for VerifyRootAccount.
2857
+ # @type request: :class:`Tencentcloud::cdb::V20170320::VerifyRootAccountRequest`
2858
+ # @rtype: :class:`Tencentcloud::cdb::V20170320::VerifyRootAccountResponse`
2859
+ def VerifyRootAccount(request)
2860
+ body = send_request('VerifyRootAccount', request.serialize)
2861
+ response = JSON.parse(body)
2862
+ if response['Response'].key?('Error') == false
2863
+ model = VerifyRootAccountResponse.new
2864
+ model.deserialize(response['Response'])
2865
+ model
2866
+ else
2867
+ code = response['Response']['Error']['Code']
2868
+ message = response['Response']['Error']['Message']
2869
+ reqid = response['Response']['RequestId']
2870
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
2871
+ end
2872
+ rescue TencentCloud::Common::TencentCloudSDKException => e
2873
+ raise e
2874
+ rescue StandardError => e
2875
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
2876
+ end
2877
+
2878
+
2879
+ end
2880
+ end
2881
+ end
2882
+ end