tencentcloud-sdk-es 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2a2c193f2c279dab16db9844d6aff482e9329dc2
4
+ data.tar.gz: 8af5b1e19cdc4040a7ee630d1798b47ed0c8049b
5
+ SHA512:
6
+ metadata.gz: 80c58a71a5bf4f1ad02cdab07f375a4c502d411440e0fe410d99b32733479d7142d424cf51a8faad514c1098c0c71476b418cef1f48ef0b23fe00f943f7d3ab2
7
+ data.tar.gz: b9e0baaadbc0e11c9515af4856f50f723b79eb01785215dd19758c347fbe79d2b5e3cbfbc27aab965c8a9b15cf1c3c999dc8ccd2fc1dbe2a044fe4b344caf57d
data/lib/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.200
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'tencentcloud-sdk-common'
4
+
5
+ require_relative 'v20180416/client'
6
+ require_relative 'v20180416/models'
7
+
8
+ module TencentCloud
9
+ module Es
10
+ end
11
+ end
@@ -0,0 +1,451 @@
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 Es
21
+ module V20180416
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2018-04-16'
26
+ api_endpoint = 'es.tencentcloudapi.com'
27
+ sdk_version = 'ES_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 创建指定规格的ES集群实例
33
+
34
+ # @param request: Request instance for CreateInstance.
35
+ # @type request: :class:`Tencentcloud::es::V20180416::CreateInstanceRequest`
36
+ # @rtype: :class:`Tencentcloud::es::V20180416::CreateInstanceResponse`
37
+ def CreateInstance(request)
38
+ body = send_request('CreateInstance', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = CreateInstanceResponse.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
+ # 销毁集群实例
57
+
58
+ # @param request: Request instance for DeleteInstance.
59
+ # @type request: :class:`Tencentcloud::es::V20180416::DeleteInstanceRequest`
60
+ # @rtype: :class:`Tencentcloud::es::V20180416::DeleteInstanceResponse`
61
+ def DeleteInstance(request)
62
+ body = send_request('DeleteInstance', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = DeleteInstanceResponse.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
+ # 查询用户该地域下符合条件的ES集群的日志
81
+
82
+ # @param request: Request instance for DescribeInstanceLogs.
83
+ # @type request: :class:`Tencentcloud::es::V20180416::DescribeInstanceLogsRequest`
84
+ # @rtype: :class:`Tencentcloud::es::V20180416::DescribeInstanceLogsResponse`
85
+ def DescribeInstanceLogs(request)
86
+ body = send_request('DescribeInstanceLogs', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = DescribeInstanceLogsResponse.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
+ # 查询实例指定条件下的操作记录
105
+
106
+ # @param request: Request instance for DescribeInstanceOperations.
107
+ # @type request: :class:`Tencentcloud::es::V20180416::DescribeInstanceOperationsRequest`
108
+ # @rtype: :class:`Tencentcloud::es::V20180416::DescribeInstanceOperationsResponse`
109
+ def DescribeInstanceOperations(request)
110
+ body = send_request('DescribeInstanceOperations', request.serialize)
111
+ response = JSON.parse(body)
112
+ if response['Response'].key?('Error') == false
113
+ model = DescribeInstanceOperationsResponse.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
+ # 查询用户该地域下符合条件的所有实例
129
+
130
+ # @param request: Request instance for DescribeInstances.
131
+ # @type request: :class:`Tencentcloud::es::V20180416::DescribeInstancesRequest`
132
+ # @rtype: :class:`Tencentcloud::es::V20180416::DescribeInstancesResponse`
133
+ def DescribeInstances(request)
134
+ body = send_request('DescribeInstances', request.serialize)
135
+ response = JSON.parse(body)
136
+ if response['Response'].key?('Error') == false
137
+ model = DescribeInstancesResponse.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
+ # 智能运维诊断集群
153
+
154
+ # @param request: Request instance for DiagnoseInstance.
155
+ # @type request: :class:`Tencentcloud::es::V20180416::DiagnoseInstanceRequest`
156
+ # @rtype: :class:`Tencentcloud::es::V20180416::DiagnoseInstanceResponse`
157
+ def DiagnoseInstance(request)
158
+ body = send_request('DiagnoseInstance', request.serialize)
159
+ response = JSON.parse(body)
160
+ if response['Response'].key?('Error') == false
161
+ model = DiagnoseInstanceResponse.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
+ # 获取接收客户端请求的节点类型
177
+
178
+ # @param request: Request instance for GetRequestTargetNodeTypes.
179
+ # @type request: :class:`Tencentcloud::es::V20180416::GetRequestTargetNodeTypesRequest`
180
+ # @rtype: :class:`Tencentcloud::es::V20180416::GetRequestTargetNodeTypesResponse`
181
+ def GetRequestTargetNodeTypes(request)
182
+ body = send_request('GetRequestTargetNodeTypes', request.serialize)
183
+ response = JSON.parse(body)
184
+ if response['Response'].key?('Error') == false
185
+ model = GetRequestTargetNodeTypesResponse.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
+ # 重启ES集群实例(用于系统版本更新等操作)
201
+
202
+ # @param request: Request instance for RestartInstance.
203
+ # @type request: :class:`Tencentcloud::es::V20180416::RestartInstanceRequest`
204
+ # @rtype: :class:`Tencentcloud::es::V20180416::RestartInstanceResponse`
205
+ def RestartInstance(request)
206
+ body = send_request('RestartInstance', request.serialize)
207
+ response = JSON.parse(body)
208
+ if response['Response'].key?('Error') == false
209
+ model = RestartInstanceResponse.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
+ # 重启Kibana
225
+
226
+ # @param request: Request instance for RestartKibana.
227
+ # @type request: :class:`Tencentcloud::es::V20180416::RestartKibanaRequest`
228
+ # @rtype: :class:`Tencentcloud::es::V20180416::RestartKibanaResponse`
229
+ def RestartKibana(request)
230
+ body = send_request('RestartKibana', request.serialize)
231
+ response = JSON.parse(body)
232
+ if response['Response'].key?('Error') == false
233
+ model = RestartKibanaResponse.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
+ # 用于重启集群节点
249
+
250
+ # @param request: Request instance for RestartNodes.
251
+ # @type request: :class:`Tencentcloud::es::V20180416::RestartNodesRequest`
252
+ # @rtype: :class:`Tencentcloud::es::V20180416::RestartNodesResponse`
253
+ def RestartNodes(request)
254
+ body = send_request('RestartNodes', request.serialize)
255
+ response = JSON.parse(body)
256
+ if response['Response'].key?('Error') == false
257
+ model = RestartNodesResponse.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
+ # 更新智能运维配置
273
+
274
+ # @param request: Request instance for UpdateDiagnoseSettings.
275
+ # @type request: :class:`Tencentcloud::es::V20180416::UpdateDiagnoseSettingsRequest`
276
+ # @rtype: :class:`Tencentcloud::es::V20180416::UpdateDiagnoseSettingsResponse`
277
+ def UpdateDiagnoseSettings(request)
278
+ body = send_request('UpdateDiagnoseSettings', request.serialize)
279
+ response = JSON.parse(body)
280
+ if response['Response'].key?('Error') == false
281
+ model = UpdateDiagnoseSettingsResponse.new
282
+ model.deserialize(response['Response'])
283
+ model
284
+ else
285
+ code = response['Response']['Error']['Code']
286
+ message = response['Response']['Error']['Message']
287
+ reqid = response['Response']['RequestId']
288
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
289
+ end
290
+ rescue TencentCloud::Common::TencentCloudSDKException => e
291
+ raise e
292
+ rescue StandardError => e
293
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
294
+ end
295
+
296
+ # 对集群进行节点规格变更,修改实例名称,修改配置,重置密码, 添加Kibana黑白名单等操作。参数中InstanceId为必传参数,ForceRestart为选填参数,剩余参数传递组合及含义如下:
297
+ # - InstanceName:修改实例名称(仅用于标识实例)
298
+ # - NodeInfoList: 修改节点配置(节点横向扩缩容,纵向扩缩容,增加主节点,增加冷节点等)
299
+ # - EsConfig:修改集群配置
300
+ # - Password:修改默认用户elastic的密码
301
+ # - EsAcl:修改访问控制列表
302
+ # - CosBackUp: 设置集群COS自动备份信息
303
+ # 以上参数组合只能传递一种,多传或少传均会导致请求失败
304
+
305
+ # @param request: Request instance for UpdateInstance.
306
+ # @type request: :class:`Tencentcloud::es::V20180416::UpdateInstanceRequest`
307
+ # @rtype: :class:`Tencentcloud::es::V20180416::UpdateInstanceResponse`
308
+ def UpdateInstance(request)
309
+ body = send_request('UpdateInstance', request.serialize)
310
+ response = JSON.parse(body)
311
+ if response['Response'].key?('Error') == false
312
+ model = UpdateInstanceResponse.new
313
+ model.deserialize(response['Response'])
314
+ model
315
+ else
316
+ code = response['Response']['Error']['Code']
317
+ message = response['Response']['Error']['Message']
318
+ reqid = response['Response']['RequestId']
319
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
320
+ end
321
+ rescue TencentCloud::Common::TencentCloudSDKException => e
322
+ raise e
323
+ rescue StandardError => e
324
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
325
+ end
326
+
327
+ # 更新实例Jdk配置
328
+
329
+ # @param request: Request instance for UpdateJdk.
330
+ # @type request: :class:`Tencentcloud::es::V20180416::UpdateJdkRequest`
331
+ # @rtype: :class:`Tencentcloud::es::V20180416::UpdateJdkResponse`
332
+ def UpdateJdk(request)
333
+ body = send_request('UpdateJdk', request.serialize)
334
+ response = JSON.parse(body)
335
+ if response['Response'].key?('Error') == false
336
+ model = UpdateJdkResponse.new
337
+ model.deserialize(response['Response'])
338
+ model
339
+ else
340
+ code = response['Response']['Error']['Code']
341
+ message = response['Response']['Error']['Message']
342
+ reqid = response['Response']['RequestId']
343
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
344
+ end
345
+ rescue TencentCloud::Common::TencentCloudSDKException => e
346
+ raise e
347
+ rescue StandardError => e
348
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
349
+ end
350
+
351
+ # 变更插件列表
352
+
353
+ # @param request: Request instance for UpdatePlugins.
354
+ # @type request: :class:`Tencentcloud::es::V20180416::UpdatePluginsRequest`
355
+ # @rtype: :class:`Tencentcloud::es::V20180416::UpdatePluginsResponse`
356
+ def UpdatePlugins(request)
357
+ body = send_request('UpdatePlugins', request.serialize)
358
+ response = JSON.parse(body)
359
+ if response['Response'].key?('Error') == false
360
+ model = UpdatePluginsResponse.new
361
+ model.deserialize(response['Response'])
362
+ model
363
+ else
364
+ code = response['Response']['Error']['Code']
365
+ message = response['Response']['Error']['Message']
366
+ reqid = response['Response']['RequestId']
367
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
368
+ end
369
+ rescue TencentCloud::Common::TencentCloudSDKException => e
370
+ raise e
371
+ rescue StandardError => e
372
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
373
+ end
374
+
375
+ # 更新接收客户端请求的节点类型
376
+
377
+ # @param request: Request instance for UpdateRequestTargetNodeTypes.
378
+ # @type request: :class:`Tencentcloud::es::V20180416::UpdateRequestTargetNodeTypesRequest`
379
+ # @rtype: :class:`Tencentcloud::es::V20180416::UpdateRequestTargetNodeTypesResponse`
380
+ def UpdateRequestTargetNodeTypes(request)
381
+ body = send_request('UpdateRequestTargetNodeTypes', request.serialize)
382
+ response = JSON.parse(body)
383
+ if response['Response'].key?('Error') == false
384
+ model = UpdateRequestTargetNodeTypesResponse.new
385
+ model.deserialize(response['Response'])
386
+ model
387
+ else
388
+ code = response['Response']['Error']['Code']
389
+ message = response['Response']['Error']['Message']
390
+ reqid = response['Response']['RequestId']
391
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
392
+ end
393
+ rescue TencentCloud::Common::TencentCloudSDKException => e
394
+ raise e
395
+ rescue StandardError => e
396
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
397
+ end
398
+
399
+ # 升级ES集群版本
400
+
401
+ # @param request: Request instance for UpgradeInstance.
402
+ # @type request: :class:`Tencentcloud::es::V20180416::UpgradeInstanceRequest`
403
+ # @rtype: :class:`Tencentcloud::es::V20180416::UpgradeInstanceResponse`
404
+ def UpgradeInstance(request)
405
+ body = send_request('UpgradeInstance', request.serialize)
406
+ response = JSON.parse(body)
407
+ if response['Response'].key?('Error') == false
408
+ model = UpgradeInstanceResponse.new
409
+ model.deserialize(response['Response'])
410
+ model
411
+ else
412
+ code = response['Response']['Error']['Code']
413
+ message = response['Response']['Error']['Message']
414
+ reqid = response['Response']['RequestId']
415
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
416
+ end
417
+ rescue TencentCloud::Common::TencentCloudSDKException => e
418
+ raise e
419
+ rescue StandardError => e
420
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
421
+ end
422
+
423
+ # 升级ES商业特性
424
+
425
+ # @param request: Request instance for UpgradeLicense.
426
+ # @type request: :class:`Tencentcloud::es::V20180416::UpgradeLicenseRequest`
427
+ # @rtype: :class:`Tencentcloud::es::V20180416::UpgradeLicenseResponse`
428
+ def UpgradeLicense(request)
429
+ body = send_request('UpgradeLicense', request.serialize)
430
+ response = JSON.parse(body)
431
+ if response['Response'].key?('Error') == false
432
+ model = UpgradeLicenseResponse.new
433
+ model.deserialize(response['Response'])
434
+ model
435
+ else
436
+ code = response['Response']['Error']['Code']
437
+ message = response['Response']['Error']['Message']
438
+ reqid = response['Response']['RequestId']
439
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
440
+ end
441
+ rescue TencentCloud::Common::TencentCloudSDKException => e
442
+ raise e
443
+ rescue StandardError => e
444
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
445
+ end
446
+
447
+
448
+ end
449
+ end
450
+ end
451
+ end