tencentcloud-sdk-chdfs 1.0.200

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,712 @@
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 Chdfs
21
+ module V20190718
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2019-07-18'
26
+ api_endpoint = 'chdfs.tencentcloudapi.com'
27
+ sdk_version = 'CHDFS_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
33
+
34
+ # 创建权限组。
35
+
36
+ # @param request: Request instance for CreateAccessGroup.
37
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::CreateAccessGroupRequest`
38
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::CreateAccessGroupResponse`
39
+ def CreateAccessGroup(request)
40
+ body = send_request('CreateAccessGroup', request.serialize)
41
+ response = JSON.parse(body)
42
+ if response['Response'].key?('Error') == false
43
+ model = CreateAccessGroupResponse.new
44
+ model.deserialize(response['Response'])
45
+ model
46
+ else
47
+ code = response['Response']['Error']['Code']
48
+ message = response['Response']['Error']['Message']
49
+ reqid = response['Response']['RequestId']
50
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
51
+ end
52
+ rescue TencentCloud::Common::TencentCloudSDKException => e
53
+ raise e
54
+ rescue StandardError => e
55
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
56
+ end
57
+
58
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
59
+
60
+ # 批量创建权限规则,权限规则ID和创建时间无需填写。
61
+
62
+ # @param request: Request instance for CreateAccessRules.
63
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::CreateAccessRulesRequest`
64
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::CreateAccessRulesResponse`
65
+ def CreateAccessRules(request)
66
+ body = send_request('CreateAccessRules', request.serialize)
67
+ response = JSON.parse(body)
68
+ if response['Response'].key?('Error') == false
69
+ model = CreateAccessRulesResponse.new
70
+ model.deserialize(response['Response'])
71
+ model
72
+ else
73
+ code = response['Response']['Error']['Code']
74
+ message = response['Response']['Error']['Message']
75
+ reqid = response['Response']['RequestId']
76
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
77
+ end
78
+ rescue TencentCloud::Common::TencentCloudSDKException => e
79
+ raise e
80
+ rescue StandardError => e
81
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
82
+ end
83
+
84
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
85
+
86
+ # 创建文件系统(异步)。
87
+
88
+ # @param request: Request instance for CreateFileSystem.
89
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::CreateFileSystemRequest`
90
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::CreateFileSystemResponse`
91
+ def CreateFileSystem(request)
92
+ body = send_request('CreateFileSystem', request.serialize)
93
+ response = JSON.parse(body)
94
+ if response['Response'].key?('Error') == false
95
+ model = CreateFileSystemResponse.new
96
+ model.deserialize(response['Response'])
97
+ model
98
+ else
99
+ code = response['Response']['Error']['Code']
100
+ message = response['Response']['Error']['Message']
101
+ reqid = response['Response']['RequestId']
102
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
103
+ end
104
+ rescue TencentCloud::Common::TencentCloudSDKException => e
105
+ raise e
106
+ rescue StandardError => e
107
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
108
+ end
109
+
110
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
111
+
112
+ # 批量创建生命周期规则,生命周期规则ID和创建时间无需填写。
113
+
114
+ # @param request: Request instance for CreateLifeCycleRules.
115
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::CreateLifeCycleRulesRequest`
116
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::CreateLifeCycleRulesResponse`
117
+ def CreateLifeCycleRules(request)
118
+ body = send_request('CreateLifeCycleRules', request.serialize)
119
+ response = JSON.parse(body)
120
+ if response['Response'].key?('Error') == false
121
+ model = CreateLifeCycleRulesResponse.new
122
+ model.deserialize(response['Response'])
123
+ model
124
+ else
125
+ code = response['Response']['Error']['Code']
126
+ message = response['Response']['Error']['Message']
127
+ reqid = response['Response']['RequestId']
128
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
129
+ end
130
+ rescue TencentCloud::Common::TencentCloudSDKException => e
131
+ raise e
132
+ rescue StandardError => e
133
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
134
+ end
135
+
136
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
137
+
138
+ # 创建文件系统挂载点,仅限于创建成功的文件系统。
139
+
140
+ # @param request: Request instance for CreateMountPoint.
141
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::CreateMountPointRequest`
142
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::CreateMountPointResponse`
143
+ def CreateMountPoint(request)
144
+ body = send_request('CreateMountPoint', request.serialize)
145
+ response = JSON.parse(body)
146
+ if response['Response'].key?('Error') == false
147
+ model = CreateMountPointResponse.new
148
+ model.deserialize(response['Response'])
149
+ model
150
+ else
151
+ code = response['Response']['Error']['Code']
152
+ message = response['Response']['Error']['Message']
153
+ reqid = response['Response']['RequestId']
154
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
155
+ end
156
+ rescue TencentCloud::Common::TencentCloudSDKException => e
157
+ raise e
158
+ rescue StandardError => e
159
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
160
+ end
161
+
162
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
163
+
164
+ # 批量创建回热任务,回热任务ID、状态和创建时间无需填写。
165
+
166
+ # @param request: Request instance for CreateRestoreTasks.
167
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::CreateRestoreTasksRequest`
168
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::CreateRestoreTasksResponse`
169
+ def CreateRestoreTasks(request)
170
+ body = send_request('CreateRestoreTasks', request.serialize)
171
+ response = JSON.parse(body)
172
+ if response['Response'].key?('Error') == false
173
+ model = CreateRestoreTasksResponse.new
174
+ model.deserialize(response['Response'])
175
+ model
176
+ else
177
+ code = response['Response']['Error']['Code']
178
+ message = response['Response']['Error']['Message']
179
+ reqid = response['Response']['RequestId']
180
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
181
+ end
182
+ rescue TencentCloud::Common::TencentCloudSDKException => e
183
+ raise e
184
+ rescue StandardError => e
185
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
186
+ end
187
+
188
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
189
+
190
+ # 删除权限组。
191
+
192
+ # @param request: Request instance for DeleteAccessGroup.
193
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DeleteAccessGroupRequest`
194
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DeleteAccessGroupResponse`
195
+ def DeleteAccessGroup(request)
196
+ body = send_request('DeleteAccessGroup', request.serialize)
197
+ response = JSON.parse(body)
198
+ if response['Response'].key?('Error') == false
199
+ model = DeleteAccessGroupResponse.new
200
+ model.deserialize(response['Response'])
201
+ model
202
+ else
203
+ code = response['Response']['Error']['Code']
204
+ message = response['Response']['Error']['Message']
205
+ reqid = response['Response']['RequestId']
206
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
207
+ end
208
+ rescue TencentCloud::Common::TencentCloudSDKException => e
209
+ raise e
210
+ rescue StandardError => e
211
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
212
+ end
213
+
214
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
215
+
216
+ # 批量删除权限规则。
217
+
218
+ # @param request: Request instance for DeleteAccessRules.
219
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DeleteAccessRulesRequest`
220
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DeleteAccessRulesResponse`
221
+ def DeleteAccessRules(request)
222
+ body = send_request('DeleteAccessRules', request.serialize)
223
+ response = JSON.parse(body)
224
+ if response['Response'].key?('Error') == false
225
+ model = DeleteAccessRulesResponse.new
226
+ model.deserialize(response['Response'])
227
+ model
228
+ else
229
+ code = response['Response']['Error']['Code']
230
+ message = response['Response']['Error']['Message']
231
+ reqid = response['Response']['RequestId']
232
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
233
+ end
234
+ rescue TencentCloud::Common::TencentCloudSDKException => e
235
+ raise e
236
+ rescue StandardError => e
237
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
238
+ end
239
+
240
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
241
+
242
+ # 删除文件系统,不允许删除非空文件系统。
243
+
244
+ # @param request: Request instance for DeleteFileSystem.
245
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DeleteFileSystemRequest`
246
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DeleteFileSystemResponse`
247
+ def DeleteFileSystem(request)
248
+ body = send_request('DeleteFileSystem', request.serialize)
249
+ response = JSON.parse(body)
250
+ if response['Response'].key?('Error') == false
251
+ model = DeleteFileSystemResponse.new
252
+ model.deserialize(response['Response'])
253
+ model
254
+ else
255
+ code = response['Response']['Error']['Code']
256
+ message = response['Response']['Error']['Message']
257
+ reqid = response['Response']['RequestId']
258
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
259
+ end
260
+ rescue TencentCloud::Common::TencentCloudSDKException => e
261
+ raise e
262
+ rescue StandardError => e
263
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
264
+ end
265
+
266
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
267
+
268
+ # 批量删除生命周期规则。
269
+
270
+ # @param request: Request instance for DeleteLifeCycleRules.
271
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DeleteLifeCycleRulesRequest`
272
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DeleteLifeCycleRulesResponse`
273
+ def DeleteLifeCycleRules(request)
274
+ body = send_request('DeleteLifeCycleRules', request.serialize)
275
+ response = JSON.parse(body)
276
+ if response['Response'].key?('Error') == false
277
+ model = DeleteLifeCycleRulesResponse.new
278
+ model.deserialize(response['Response'])
279
+ model
280
+ else
281
+ code = response['Response']['Error']['Code']
282
+ message = response['Response']['Error']['Message']
283
+ reqid = response['Response']['RequestId']
284
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
285
+ end
286
+ rescue TencentCloud::Common::TencentCloudSDKException => e
287
+ raise e
288
+ rescue StandardError => e
289
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
290
+ end
291
+
292
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
293
+
294
+ # 删除挂载点。
295
+
296
+ # @param request: Request instance for DeleteMountPoint.
297
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DeleteMountPointRequest`
298
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DeleteMountPointResponse`
299
+ def DeleteMountPoint(request)
300
+ body = send_request('DeleteMountPoint', request.serialize)
301
+ response = JSON.parse(body)
302
+ if response['Response'].key?('Error') == false
303
+ model = DeleteMountPointResponse.new
304
+ model.deserialize(response['Response'])
305
+ model
306
+ else
307
+ code = response['Response']['Error']['Code']
308
+ message = response['Response']['Error']['Message']
309
+ reqid = response['Response']['RequestId']
310
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
311
+ end
312
+ rescue TencentCloud::Common::TencentCloudSDKException => e
313
+ raise e
314
+ rescue StandardError => e
315
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
316
+ end
317
+
318
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
319
+
320
+ # 查看权限组列表。
321
+
322
+ # @param request: Request instance for DescribeAccessGroups.
323
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DescribeAccessGroupsRequest`
324
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DescribeAccessGroupsResponse`
325
+ def DescribeAccessGroups(request)
326
+ body = send_request('DescribeAccessGroups', request.serialize)
327
+ response = JSON.parse(body)
328
+ if response['Response'].key?('Error') == false
329
+ model = DescribeAccessGroupsResponse.new
330
+ model.deserialize(response['Response'])
331
+ model
332
+ else
333
+ code = response['Response']['Error']['Code']
334
+ message = response['Response']['Error']['Message']
335
+ reqid = response['Response']['RequestId']
336
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
337
+ end
338
+ rescue TencentCloud::Common::TencentCloudSDKException => e
339
+ raise e
340
+ rescue StandardError => e
341
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
342
+ end
343
+
344
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
345
+
346
+ # 通过权限组ID查看权限规则列表。
347
+
348
+ # @param request: Request instance for DescribeAccessRules.
349
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DescribeAccessRulesRequest`
350
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DescribeAccessRulesResponse`
351
+ def DescribeAccessRules(request)
352
+ body = send_request('DescribeAccessRules', request.serialize)
353
+ response = JSON.parse(body)
354
+ if response['Response'].key?('Error') == false
355
+ model = DescribeAccessRulesResponse.new
356
+ model.deserialize(response['Response'])
357
+ model
358
+ else
359
+ code = response['Response']['Error']['Code']
360
+ message = response['Response']['Error']['Message']
361
+ reqid = response['Response']['RequestId']
362
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
363
+ end
364
+ rescue TencentCloud::Common::TencentCloudSDKException => e
365
+ raise e
366
+ rescue StandardError => e
367
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
368
+ end
369
+
370
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
371
+
372
+ # 查看文件系统详细信息。
373
+
374
+ # @param request: Request instance for DescribeFileSystem.
375
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DescribeFileSystemRequest`
376
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DescribeFileSystemResponse`
377
+ def DescribeFileSystem(request)
378
+ body = send_request('DescribeFileSystem', request.serialize)
379
+ response = JSON.parse(body)
380
+ if response['Response'].key?('Error') == false
381
+ model = DescribeFileSystemResponse.new
382
+ model.deserialize(response['Response'])
383
+ model
384
+ else
385
+ code = response['Response']['Error']['Code']
386
+ message = response['Response']['Error']['Message']
387
+ reqid = response['Response']['RequestId']
388
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
389
+ end
390
+ rescue TencentCloud::Common::TencentCloudSDKException => e
391
+ raise e
392
+ rescue StandardError => e
393
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
394
+ end
395
+
396
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
397
+
398
+ # 查看文件系统列表。
399
+
400
+ # @param request: Request instance for DescribeFileSystems.
401
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DescribeFileSystemsRequest`
402
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DescribeFileSystemsResponse`
403
+ def DescribeFileSystems(request)
404
+ body = send_request('DescribeFileSystems', request.serialize)
405
+ response = JSON.parse(body)
406
+ if response['Response'].key?('Error') == false
407
+ model = DescribeFileSystemsResponse.new
408
+ model.deserialize(response['Response'])
409
+ model
410
+ else
411
+ code = response['Response']['Error']['Code']
412
+ message = response['Response']['Error']['Message']
413
+ reqid = response['Response']['RequestId']
414
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
415
+ end
416
+ rescue TencentCloud::Common::TencentCloudSDKException => e
417
+ raise e
418
+ rescue StandardError => e
419
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
420
+ end
421
+
422
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
423
+
424
+ # 通过文件系统ID查看生命周期规则列表。
425
+
426
+ # @param request: Request instance for DescribeLifeCycleRules.
427
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DescribeLifeCycleRulesRequest`
428
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DescribeLifeCycleRulesResponse`
429
+ def DescribeLifeCycleRules(request)
430
+ body = send_request('DescribeLifeCycleRules', request.serialize)
431
+ response = JSON.parse(body)
432
+ if response['Response'].key?('Error') == false
433
+ model = DescribeLifeCycleRulesResponse.new
434
+ model.deserialize(response['Response'])
435
+ model
436
+ else
437
+ code = response['Response']['Error']['Code']
438
+ message = response['Response']['Error']['Message']
439
+ reqid = response['Response']['RequestId']
440
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
441
+ end
442
+ rescue TencentCloud::Common::TencentCloudSDKException => e
443
+ raise e
444
+ rescue StandardError => e
445
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
446
+ end
447
+
448
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
449
+
450
+ # 查看挂载点详细信息。
451
+
452
+ # @param request: Request instance for DescribeMountPoint.
453
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DescribeMountPointRequest`
454
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DescribeMountPointResponse`
455
+ def DescribeMountPoint(request)
456
+ body = send_request('DescribeMountPoint', request.serialize)
457
+ response = JSON.parse(body)
458
+ if response['Response'].key?('Error') == false
459
+ model = DescribeMountPointResponse.new
460
+ model.deserialize(response['Response'])
461
+ model
462
+ else
463
+ code = response['Response']['Error']['Code']
464
+ message = response['Response']['Error']['Message']
465
+ reqid = response['Response']['RequestId']
466
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
467
+ end
468
+ rescue TencentCloud::Common::TencentCloudSDKException => e
469
+ raise e
470
+ rescue StandardError => e
471
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
472
+ end
473
+
474
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
475
+
476
+ # 通过文件系统ID或者权限组ID查看挂载点列表。
477
+
478
+ # @param request: Request instance for DescribeMountPoints.
479
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DescribeMountPointsRequest`
480
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DescribeMountPointsResponse`
481
+ def DescribeMountPoints(request)
482
+ body = send_request('DescribeMountPoints', request.serialize)
483
+ response = JSON.parse(body)
484
+ if response['Response'].key?('Error') == false
485
+ model = DescribeMountPointsResponse.new
486
+ model.deserialize(response['Response'])
487
+ model
488
+ else
489
+ code = response['Response']['Error']['Code']
490
+ message = response['Response']['Error']['Message']
491
+ reqid = response['Response']['RequestId']
492
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
493
+ end
494
+ rescue TencentCloud::Common::TencentCloudSDKException => e
495
+ raise e
496
+ rescue StandardError => e
497
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
498
+ end
499
+
500
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
501
+
502
+ # 通过文件系统ID查看资源标签列表。
503
+
504
+ # @param request: Request instance for DescribeResourceTags.
505
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DescribeResourceTagsRequest`
506
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DescribeResourceTagsResponse`
507
+ def DescribeResourceTags(request)
508
+ body = send_request('DescribeResourceTags', request.serialize)
509
+ response = JSON.parse(body)
510
+ if response['Response'].key?('Error') == false
511
+ model = DescribeResourceTagsResponse.new
512
+ model.deserialize(response['Response'])
513
+ model
514
+ else
515
+ code = response['Response']['Error']['Code']
516
+ message = response['Response']['Error']['Message']
517
+ reqid = response['Response']['RequestId']
518
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
519
+ end
520
+ rescue TencentCloud::Common::TencentCloudSDKException => e
521
+ raise e
522
+ rescue StandardError => e
523
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
524
+ end
525
+
526
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
527
+
528
+ # 通过文件系统ID查看回热任务列表。
529
+
530
+ # @param request: Request instance for DescribeRestoreTasks.
531
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::DescribeRestoreTasksRequest`
532
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::DescribeRestoreTasksResponse`
533
+ def DescribeRestoreTasks(request)
534
+ body = send_request('DescribeRestoreTasks', request.serialize)
535
+ response = JSON.parse(body)
536
+ if response['Response'].key?('Error') == false
537
+ model = DescribeRestoreTasksResponse.new
538
+ model.deserialize(response['Response'])
539
+ model
540
+ else
541
+ code = response['Response']['Error']['Code']
542
+ message = response['Response']['Error']['Message']
543
+ reqid = response['Response']['RequestId']
544
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
545
+ end
546
+ rescue TencentCloud::Common::TencentCloudSDKException => e
547
+ raise e
548
+ rescue StandardError => e
549
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
550
+ end
551
+
552
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
553
+
554
+ # 修改权限组属性。
555
+
556
+ # @param request: Request instance for ModifyAccessGroup.
557
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::ModifyAccessGroupRequest`
558
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::ModifyAccessGroupResponse`
559
+ def ModifyAccessGroup(request)
560
+ body = send_request('ModifyAccessGroup', request.serialize)
561
+ response = JSON.parse(body)
562
+ if response['Response'].key?('Error') == false
563
+ model = ModifyAccessGroupResponse.new
564
+ model.deserialize(response['Response'])
565
+ model
566
+ else
567
+ code = response['Response']['Error']['Code']
568
+ message = response['Response']['Error']['Message']
569
+ reqid = response['Response']['RequestId']
570
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
571
+ end
572
+ rescue TencentCloud::Common::TencentCloudSDKException => e
573
+ raise e
574
+ rescue StandardError => e
575
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
576
+ end
577
+
578
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
579
+
580
+ # 批量修改权限规则属性,需要指定权限规则ID,支持修改权限规则地址、访问模式和优先级。
581
+
582
+ # @param request: Request instance for ModifyAccessRules.
583
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::ModifyAccessRulesRequest`
584
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::ModifyAccessRulesResponse`
585
+ def ModifyAccessRules(request)
586
+ body = send_request('ModifyAccessRules', request.serialize)
587
+ response = JSON.parse(body)
588
+ if response['Response'].key?('Error') == false
589
+ model = ModifyAccessRulesResponse.new
590
+ model.deserialize(response['Response'])
591
+ model
592
+ else
593
+ code = response['Response']['Error']['Code']
594
+ message = response['Response']['Error']['Message']
595
+ reqid = response['Response']['RequestId']
596
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
597
+ end
598
+ rescue TencentCloud::Common::TencentCloudSDKException => e
599
+ raise e
600
+ rescue StandardError => e
601
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
602
+ end
603
+
604
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
605
+
606
+ # 修改文件系统属性,仅限于创建成功的文件系统。
607
+
608
+ # @param request: Request instance for ModifyFileSystem.
609
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::ModifyFileSystemRequest`
610
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::ModifyFileSystemResponse`
611
+ def ModifyFileSystem(request)
612
+ body = send_request('ModifyFileSystem', request.serialize)
613
+ response = JSON.parse(body)
614
+ if response['Response'].key?('Error') == false
615
+ model = ModifyFileSystemResponse.new
616
+ model.deserialize(response['Response'])
617
+ model
618
+ else
619
+ code = response['Response']['Error']['Code']
620
+ message = response['Response']['Error']['Message']
621
+ reqid = response['Response']['RequestId']
622
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
623
+ end
624
+ rescue TencentCloud::Common::TencentCloudSDKException => e
625
+ raise e
626
+ rescue StandardError => e
627
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
628
+ end
629
+
630
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
631
+
632
+ # 批量修改生命周期规则属性,需要指定生命周期规则ID,支持修改生命周期规则名称、路径、转换列表和状态。
633
+
634
+ # @param request: Request instance for ModifyLifeCycleRules.
635
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::ModifyLifeCycleRulesRequest`
636
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::ModifyLifeCycleRulesResponse`
637
+ def ModifyLifeCycleRules(request)
638
+ body = send_request('ModifyLifeCycleRules', request.serialize)
639
+ response = JSON.parse(body)
640
+ if response['Response'].key?('Error') == false
641
+ model = ModifyLifeCycleRulesResponse.new
642
+ model.deserialize(response['Response'])
643
+ model
644
+ else
645
+ code = response['Response']['Error']['Code']
646
+ message = response['Response']['Error']['Message']
647
+ reqid = response['Response']['RequestId']
648
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
649
+ end
650
+ rescue TencentCloud::Common::TencentCloudSDKException => e
651
+ raise e
652
+ rescue StandardError => e
653
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
654
+ end
655
+
656
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
657
+
658
+ # 修改挂载点属性。
659
+
660
+ # @param request: Request instance for ModifyMountPoint.
661
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::ModifyMountPointRequest`
662
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::ModifyMountPointResponse`
663
+ def ModifyMountPoint(request)
664
+ body = send_request('ModifyMountPoint', request.serialize)
665
+ response = JSON.parse(body)
666
+ if response['Response'].key?('Error') == false
667
+ model = ModifyMountPointResponse.new
668
+ model.deserialize(response['Response'])
669
+ model
670
+ else
671
+ code = response['Response']['Error']['Code']
672
+ message = response['Response']['Error']['Message']
673
+ reqid = response['Response']['RequestId']
674
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
675
+ end
676
+ rescue TencentCloud::Common::TencentCloudSDKException => e
677
+ raise e
678
+ rescue StandardError => e
679
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
680
+ end
681
+
682
+ # 云API旧版本2019-07-18预下线,所有功能由新版本2020-11-12替代,目前云API主要用作控制台使用。
683
+
684
+ # 修改资源标签列表,全量覆盖。
685
+
686
+ # @param request: Request instance for ModifyResourceTags.
687
+ # @type request: :class:`Tencentcloud::chdfs::V20190718::ModifyResourceTagsRequest`
688
+ # @rtype: :class:`Tencentcloud::chdfs::V20190718::ModifyResourceTagsResponse`
689
+ def ModifyResourceTags(request)
690
+ body = send_request('ModifyResourceTags', request.serialize)
691
+ response = JSON.parse(body)
692
+ if response['Response'].key?('Error') == false
693
+ model = ModifyResourceTagsResponse.new
694
+ model.deserialize(response['Response'])
695
+ model
696
+ else
697
+ code = response['Response']['Error']['Code']
698
+ message = response['Response']['Error']['Message']
699
+ reqid = response['Response']['RequestId']
700
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
701
+ end
702
+ rescue TencentCloud::Common::TencentCloudSDKException => e
703
+ raise e
704
+ rescue StandardError => e
705
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
706
+ end
707
+
708
+
709
+ end
710
+ end
711
+ end
712
+ end