tencentcloud-sdk-ms 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: d15fde17bc8200b0ed03bcfcf43b05f44477fcbc
4
+ data.tar.gz: 244ac245440db94d5b4debe10e77a8caa1c1579a
5
+ SHA512:
6
+ metadata.gz: 221755e4224cf93125760e486b3ddd10b07475174823fa549aef61720096ffa24375e4dd1ace8a233f669b64976363fb457f9202f88cfbfe92e1cdd352fc677f
7
+ data.tar.gz: c9fafa69172ae916aa5f83fc8ab268c39bf4e7d7327557fbd7f59450fc06fea1c68bf16c263c8b318b6c5e9d923497e9c5e6aad934ec39f43792e260025e400a
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 'v20180408/client'
6
+ require_relative 'v20180408/models'
7
+
8
+ module TencentCloud
9
+ module Ms
10
+ end
11
+ end
@@ -0,0 +1,398 @@
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 Ms
21
+ module V20180408
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2018-04-08'
26
+ api_endpoint = 'ms.tencentcloudapi.com'
27
+ sdk_version = 'MS_' + File.read(File.expand_path('../VERSION', __dir__)).strip
28
+ super(credential, region, api_version, api_endpoint, sdk_version, profile)
29
+ end
30
+
31
+
32
+ # 将应用和资源进行绑定
33
+
34
+ # @param request: Request instance for CreateBindInstance.
35
+ # @type request: :class:`Tencentcloud::ms::V20180408::CreateBindInstanceRequest`
36
+ # @rtype: :class:`Tencentcloud::ms::V20180408::CreateBindInstanceResponse`
37
+ def CreateBindInstance(request)
38
+ body = send_request('CreateBindInstance', request.serialize)
39
+ response = JSON.parse(body)
40
+ if response['Response'].key?('Error') == false
41
+ model = CreateBindInstanceResponse.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
+ # 获取云COS文件存储临时密钥,密钥仅限于临时上传文件,有访问限制和时效性。
57
+
58
+ # @param request: Request instance for CreateCosSecKeyInstance.
59
+ # @type request: :class:`Tencentcloud::ms::V20180408::CreateCosSecKeyInstanceRequest`
60
+ # @rtype: :class:`Tencentcloud::ms::V20180408::CreateCosSecKeyInstanceResponse`
61
+ def CreateCosSecKeyInstance(request)
62
+ body = send_request('CreateCosSecKeyInstance', request.serialize)
63
+ response = JSON.parse(body)
64
+ if response['Response'].key?('Error') == false
65
+ model = CreateCosSecKeyInstanceResponse.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
+ # 用户可以使用该接口自建资源,只支持白名单用户
81
+
82
+ # @param request: Request instance for CreateResourceInstances.
83
+ # @type request: :class:`Tencentcloud::ms::V20180408::CreateResourceInstancesRequest`
84
+ # @rtype: :class:`Tencentcloud::ms::V20180408::CreateResourceInstancesResponse`
85
+ def CreateResourceInstances(request)
86
+ body = send_request('CreateResourceInstances', request.serialize)
87
+ response = JSON.parse(body)
88
+ if response['Response'].key?('Error') == false
89
+ model = CreateResourceInstancesResponse.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
+ # 用户通过该接口批量提交应用进行应用扫描,扫描后需通过DescribeScanResults接口查询扫描结果
105
+
106
+ # @param request: Request instance for CreateScanInstances.
107
+ # @type request: :class:`Tencentcloud::ms::V20180408::CreateScanInstancesRequest`
108
+ # @rtype: :class:`Tencentcloud::ms::V20180408::CreateScanInstancesResponse`
109
+ def CreateScanInstances(request)
110
+ body = send_request('CreateScanInstances', request.serialize)
111
+ response = JSON.parse(body)
112
+ if response['Response'].key?('Error') == false
113
+ model = CreateScanInstancesResponse.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
+ # 用户通过该接口提交应用进行应用加固,加固后需通过DescribeShieldResult接口查询加固结果
129
+
130
+ # @param request: Request instance for CreateShieldInstance.
131
+ # @type request: :class:`Tencentcloud::ms::V20180408::CreateShieldInstanceRequest`
132
+ # @rtype: :class:`Tencentcloud::ms::V20180408::CreateShieldInstanceResponse`
133
+ def CreateShieldInstance(request)
134
+ body = send_request('CreateShieldInstance', request.serialize)
135
+ response = JSON.parse(body)
136
+ if response['Response'].key?('Error') == false
137
+ model = CreateShieldInstanceResponse.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 CreateShieldPlanInstance.
155
+ # @type request: :class:`Tencentcloud::ms::V20180408::CreateShieldPlanInstanceRequest`
156
+ # @rtype: :class:`Tencentcloud::ms::V20180408::CreateShieldPlanInstanceResponse`
157
+ def CreateShieldPlanInstance(request)
158
+ body = send_request('CreateShieldPlanInstance', request.serialize)
159
+ response = JSON.parse(body)
160
+ if response['Response'].key?('Error') == false
161
+ model = CreateShieldPlanInstanceResponse.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
+ # 删除一个或者多个app扫描信息
177
+
178
+ # @param request: Request instance for DeleteScanInstances.
179
+ # @type request: :class:`Tencentcloud::ms::V20180408::DeleteScanInstancesRequest`
180
+ # @rtype: :class:`Tencentcloud::ms::V20180408::DeleteScanInstancesResponse`
181
+ def DeleteScanInstances(request)
182
+ body = send_request('DeleteScanInstances', request.serialize)
183
+ response = JSON.parse(body)
184
+ if response['Response'].key?('Error') == false
185
+ model = DeleteScanInstancesResponse.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
+ # 删除一个或者多个app加固信息
201
+
202
+ # @param request: Request instance for DeleteShieldInstances.
203
+ # @type request: :class:`Tencentcloud::ms::V20180408::DeleteShieldInstancesRequest`
204
+ # @rtype: :class:`Tencentcloud::ms::V20180408::DeleteShieldInstancesResponse`
205
+ def DeleteShieldInstances(request)
206
+ body = send_request('DeleteShieldInstances', request.serialize)
207
+ response = JSON.parse(body)
208
+ if response['Response'].key?('Error') == false
209
+ model = DeleteShieldInstancesResponse.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
+ # 获取某个用户的所有资源信息
225
+
226
+ # @param request: Request instance for DescribeResourceInstances.
227
+ # @type request: :class:`Tencentcloud::ms::V20180408::DescribeResourceInstancesRequest`
228
+ # @rtype: :class:`Tencentcloud::ms::V20180408::DescribeResourceInstancesResponse`
229
+ def DescribeResourceInstances(request)
230
+ body = send_request('DescribeResourceInstances', request.serialize)
231
+ response = JSON.parse(body)
232
+ if response['Response'].key?('Error') == false
233
+ model = DescribeResourceInstancesResponse.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
+ # 本接口用于查看app列表。
249
+ # 可以通过指定任务唯一标识ItemId来查询指定app的详细信息,或通过设定过滤器来查询满足过滤条件的app的详细信息。 指定偏移(Offset)和限制(Limit)来选择结果中的一部分,默认返回满足条件的前20个app信息。
250
+
251
+ # @param request: Request instance for DescribeScanInstances.
252
+ # @type request: :class:`Tencentcloud::ms::V20180408::DescribeScanInstancesRequest`
253
+ # @rtype: :class:`Tencentcloud::ms::V20180408::DescribeScanInstancesResponse`
254
+ def DescribeScanInstances(request)
255
+ body = send_request('DescribeScanInstances', request.serialize)
256
+ response = JSON.parse(body)
257
+ if response['Response'].key?('Error') == false
258
+ model = DescribeScanInstancesResponse.new
259
+ model.deserialize(response['Response'])
260
+ model
261
+ else
262
+ code = response['Response']['Error']['Code']
263
+ message = response['Response']['Error']['Message']
264
+ reqid = response['Response']['RequestId']
265
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
266
+ end
267
+ rescue TencentCloud::Common::TencentCloudSDKException => e
268
+ raise e
269
+ rescue StandardError => e
270
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
271
+ end
272
+
273
+ # 用户通过CreateScanInstances接口提交应用进行风险批量扫描后,用此接口批量获取风险详细信息,包含漏洞信息,广告信息,插件信息和病毒信息
274
+
275
+ # @param request: Request instance for DescribeScanResults.
276
+ # @type request: :class:`Tencentcloud::ms::V20180408::DescribeScanResultsRequest`
277
+ # @rtype: :class:`Tencentcloud::ms::V20180408::DescribeScanResultsResponse`
278
+ def DescribeScanResults(request)
279
+ body = send_request('DescribeScanResults', request.serialize)
280
+ response = JSON.parse(body)
281
+ if response['Response'].key?('Error') == false
282
+ model = DescribeScanResultsResponse.new
283
+ model.deserialize(response['Response'])
284
+ model
285
+ else
286
+ code = response['Response']['Error']['Code']
287
+ message = response['Response']['Error']['Message']
288
+ reqid = response['Response']['RequestId']
289
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
290
+ end
291
+ rescue TencentCloud::Common::TencentCloudSDKException => e
292
+ raise e
293
+ rescue StandardError => e
294
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
295
+ end
296
+
297
+ # 本接口用于查看app列表。
298
+ # 可以通过指定任务唯一标识ItemId来查询指定app的详细信息,或通过设定过滤器来查询满足过滤条件的app的详细信息。 指定偏移(Offset)和限制(Limit)来选择结果中的一部分,默认返回满足条件的前20个app信息。
299
+
300
+ # @param request: Request instance for DescribeShieldInstances.
301
+ # @type request: :class:`Tencentcloud::ms::V20180408::DescribeShieldInstancesRequest`
302
+ # @rtype: :class:`Tencentcloud::ms::V20180408::DescribeShieldInstancesResponse`
303
+ def DescribeShieldInstances(request)
304
+ body = send_request('DescribeShieldInstances', request.serialize)
305
+ response = JSON.parse(body)
306
+ if response['Response'].key?('Error') == false
307
+ model = DescribeShieldInstancesResponse.new
308
+ model.deserialize(response['Response'])
309
+ model
310
+ else
311
+ code = response['Response']['Error']['Code']
312
+ message = response['Response']['Error']['Message']
313
+ reqid = response['Response']['RequestId']
314
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
315
+ end
316
+ rescue TencentCloud::Common::TencentCloudSDKException => e
317
+ raise e
318
+ rescue StandardError => e
319
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
320
+ end
321
+
322
+ # 查询加固策略
323
+
324
+ # @param request: Request instance for DescribeShieldPlanInstance.
325
+ # @type request: :class:`Tencentcloud::ms::V20180408::DescribeShieldPlanInstanceRequest`
326
+ # @rtype: :class:`Tencentcloud::ms::V20180408::DescribeShieldPlanInstanceResponse`
327
+ def DescribeShieldPlanInstance(request)
328
+ body = send_request('DescribeShieldPlanInstance', request.serialize)
329
+ response = JSON.parse(body)
330
+ if response['Response'].key?('Error') == false
331
+ model = DescribeShieldPlanInstanceResponse.new
332
+ model.deserialize(response['Response'])
333
+ model
334
+ else
335
+ code = response['Response']['Error']['Code']
336
+ message = response['Response']['Error']['Message']
337
+ reqid = response['Response']['RequestId']
338
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
339
+ end
340
+ rescue TencentCloud::Common::TencentCloudSDKException => e
341
+ raise e
342
+ rescue StandardError => e
343
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
344
+ end
345
+
346
+ # 通过唯一标识获取加固的结果
347
+
348
+ # @param request: Request instance for DescribeShieldResult.
349
+ # @type request: :class:`Tencentcloud::ms::V20180408::DescribeShieldResultRequest`
350
+ # @rtype: :class:`Tencentcloud::ms::V20180408::DescribeShieldResultResponse`
351
+ def DescribeShieldResult(request)
352
+ body = send_request('DescribeShieldResult', request.serialize)
353
+ response = JSON.parse(body)
354
+ if response['Response'].key?('Error') == false
355
+ model = DescribeShieldResultResponse.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
+ # 获取用户基础信息
371
+
372
+ # @param request: Request instance for DescribeUserBaseInfoInstance.
373
+ # @type request: :class:`Tencentcloud::ms::V20180408::DescribeUserBaseInfoInstanceRequest`
374
+ # @rtype: :class:`Tencentcloud::ms::V20180408::DescribeUserBaseInfoInstanceResponse`
375
+ def DescribeUserBaseInfoInstance(request)
376
+ body = send_request('DescribeUserBaseInfoInstance', request.serialize)
377
+ response = JSON.parse(body)
378
+ if response['Response'].key?('Error') == false
379
+ model = DescribeUserBaseInfoInstanceResponse.new
380
+ model.deserialize(response['Response'])
381
+ model
382
+ else
383
+ code = response['Response']['Error']['Code']
384
+ message = response['Response']['Error']['Message']
385
+ reqid = response['Response']['RequestId']
386
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
387
+ end
388
+ rescue TencentCloud::Common::TencentCloudSDKException => e
389
+ raise e
390
+ rescue StandardError => e
391
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
392
+ end
393
+
394
+
395
+ end
396
+ end
397
+ end
398
+ end