tencentcloud-sdk-cloudaudit 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: a7a0e1b96d2cf0af7947728f2561596e3fc1b0e9
4
+ data.tar.gz: 1c8cc7338b31f276bd834ce608ce3975a5135e7c
5
+ SHA512:
6
+ metadata.gz: 82161f8173b97d7f5f7a1bba14c44e5648451f7691b0c33ab6f36f3be831bf347ff570672bc09a51eebbf50d367731a1b5abbc17b32dbfa957b4f6cdf75614a6
7
+ data.tar.gz: 6f7265bb6fd6889eb7d9a8e4317c4118d106c25c3f56dc895d8933018aba955fa0fbd0a1a07f57dacbbd7e63b22c418852120dea975cb42628d9b92ac3cd66e2
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 'v20190319/client'
6
+ require_relative 'v20190319/models'
7
+
8
+ module TencentCloud
9
+ module Cloudaudit
10
+ end
11
+ end
@@ -0,0 +1,380 @@
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 Cloudaudit
21
+ module V20190319
22
+ class Client < TencentCloud::Common::AbstractClient
23
+
24
+ def initialize(credential, region, profile = nil)
25
+ api_version = '2019-03-19'
26
+ api_endpoint = 'cloudaudit.tencentcloudapi.com'
27
+ sdk_version = 'CLOUDAUDIT_' + 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
+ # 1、如果IsCreateNewBucket的值存在的话,cosRegion和cosBucketName都是必填参数。
34
+ # 2、如果IsEnableCmqNotify的值是1的话,IsCreateNewQueue、CmqRegion和CmqQueueName都是必填参数。
35
+ # 3、如果IsEnableCmqNotify的值是0的话,IsCreateNewQueue、CmqRegion和CmqQueueName都不能传。
36
+ # 4、如果IsEnableKmsEncry的值是1的话,KmsRegion和KeyId属于必填项
37
+
38
+ # @param request: Request instance for CreateAudit.
39
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::CreateAuditRequest`
40
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::CreateAuditResponse`
41
+ def CreateAudit(request)
42
+ body = send_request('CreateAudit', request.serialize)
43
+ response = JSON.parse(body)
44
+ if response['Response'].key?('Error') == false
45
+ model = CreateAuditResponse.new
46
+ model.deserialize(response['Response'])
47
+ model
48
+ else
49
+ code = response['Response']['Error']['Code']
50
+ message = response['Response']['Error']['Message']
51
+ reqid = response['Response']['RequestId']
52
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
53
+ end
54
+ rescue TencentCloud::Common::TencentCloudSDKException => e
55
+ raise e
56
+ rescue StandardError => e
57
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
58
+ end
59
+
60
+ # 删除跟踪集
61
+
62
+ # @param request: Request instance for DeleteAudit.
63
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::DeleteAuditRequest`
64
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::DeleteAuditResponse`
65
+ def DeleteAudit(request)
66
+ body = send_request('DeleteAudit', request.serialize)
67
+ response = JSON.parse(body)
68
+ if response['Response'].key?('Error') == false
69
+ model = DeleteAuditResponse.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
+ # 查询跟踪集详情
85
+
86
+ # @param request: Request instance for DescribeAudit.
87
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::DescribeAuditRequest`
88
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::DescribeAuditResponse`
89
+ def DescribeAudit(request)
90
+ body = send_request('DescribeAudit', request.serialize)
91
+ response = JSON.parse(body)
92
+ if response['Response'].key?('Error') == false
93
+ model = DescribeAuditResponse.new
94
+ model.deserialize(response['Response'])
95
+ model
96
+ else
97
+ code = response['Response']['Error']['Code']
98
+ message = response['Response']['Error']['Message']
99
+ reqid = response['Response']['RequestId']
100
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
101
+ end
102
+ rescue TencentCloud::Common::TencentCloudSDKException => e
103
+ raise e
104
+ rescue StandardError => e
105
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
106
+ end
107
+
108
+ # 查询云审计日志
109
+
110
+ # @param request: Request instance for DescribeEvents.
111
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::DescribeEventsRequest`
112
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::DescribeEventsResponse`
113
+ def DescribeEvents(request)
114
+ body = send_request('DescribeEvents', request.serialize)
115
+ response = JSON.parse(body)
116
+ if response['Response'].key?('Error') == false
117
+ model = DescribeEventsResponse.new
118
+ model.deserialize(response['Response'])
119
+ model
120
+ else
121
+ code = response['Response']['Error']['Code']
122
+ message = response['Response']['Error']['Message']
123
+ reqid = response['Response']['RequestId']
124
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
125
+ end
126
+ rescue TencentCloud::Common::TencentCloudSDKException => e
127
+ raise e
128
+ rescue StandardError => e
129
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
130
+ end
131
+
132
+ # 查询AttributeKey的有效取值范围
133
+
134
+ # @param request: Request instance for GetAttributeKey.
135
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::GetAttributeKeyRequest`
136
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::GetAttributeKeyResponse`
137
+ def GetAttributeKey(request)
138
+ body = send_request('GetAttributeKey', request.serialize)
139
+ response = JSON.parse(body)
140
+ if response['Response'].key?('Error') == false
141
+ model = GetAttributeKeyResponse.new
142
+ model.deserialize(response['Response'])
143
+ model
144
+ else
145
+ code = response['Response']['Error']['Code']
146
+ message = response['Response']['Error']['Message']
147
+ reqid = response['Response']['RequestId']
148
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
149
+ end
150
+ rescue TencentCloud::Common::TencentCloudSDKException => e
151
+ raise e
152
+ rescue StandardError => e
153
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
154
+ end
155
+
156
+ # 查询用户可创建跟踪集的数量
157
+
158
+ # @param request: Request instance for InquireAuditCredit.
159
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::InquireAuditCreditRequest`
160
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::InquireAuditCreditResponse`
161
+ def InquireAuditCredit(request)
162
+ body = send_request('InquireAuditCredit', request.serialize)
163
+ response = JSON.parse(body)
164
+ if response['Response'].key?('Error') == false
165
+ model = InquireAuditCreditResponse.new
166
+ model.deserialize(response['Response'])
167
+ model
168
+ else
169
+ code = response['Response']['Error']['Code']
170
+ message = response['Response']['Error']['Message']
171
+ reqid = response['Response']['RequestId']
172
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
173
+ end
174
+ rescue TencentCloud::Common::TencentCloudSDKException => e
175
+ raise e
176
+ rescue StandardError => e
177
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
178
+ end
179
+
180
+ # 查询跟踪集概要
181
+
182
+ # @param request: Request instance for ListAudits.
183
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::ListAuditsRequest`
184
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::ListAuditsResponse`
185
+ def ListAudits(request)
186
+ body = send_request('ListAudits', request.serialize)
187
+ response = JSON.parse(body)
188
+ if response['Response'].key?('Error') == false
189
+ model = ListAuditsResponse.new
190
+ model.deserialize(response['Response'])
191
+ model
192
+ else
193
+ code = response['Response']['Error']['Code']
194
+ message = response['Response']['Error']['Message']
195
+ reqid = response['Response']['RequestId']
196
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
197
+ end
198
+ rescue TencentCloud::Common::TencentCloudSDKException => e
199
+ raise e
200
+ rescue StandardError => e
201
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
202
+ end
203
+
204
+ # 查询云审计支持的cmq的可用区
205
+
206
+ # @param request: Request instance for ListCmqEnableRegion.
207
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::ListCmqEnableRegionRequest`
208
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::ListCmqEnableRegionResponse`
209
+ def ListCmqEnableRegion(request)
210
+ body = send_request('ListCmqEnableRegion', request.serialize)
211
+ response = JSON.parse(body)
212
+ if response['Response'].key?('Error') == false
213
+ model = ListCmqEnableRegionResponse.new
214
+ model.deserialize(response['Response'])
215
+ model
216
+ else
217
+ code = response['Response']['Error']['Code']
218
+ message = response['Response']['Error']['Message']
219
+ reqid = response['Response']['RequestId']
220
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
221
+ end
222
+ rescue TencentCloud::Common::TencentCloudSDKException => e
223
+ raise e
224
+ rescue StandardError => e
225
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
226
+ end
227
+
228
+ # 查询云审计支持的cos可用区
229
+
230
+ # @param request: Request instance for ListCosEnableRegion.
231
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::ListCosEnableRegionRequest`
232
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::ListCosEnableRegionResponse`
233
+ def ListCosEnableRegion(request)
234
+ body = send_request('ListCosEnableRegion', request.serialize)
235
+ response = JSON.parse(body)
236
+ if response['Response'].key?('Error') == false
237
+ model = ListCosEnableRegionResponse.new
238
+ model.deserialize(response['Response'])
239
+ model
240
+ else
241
+ code = response['Response']['Error']['Code']
242
+ message = response['Response']['Error']['Message']
243
+ reqid = response['Response']['RequestId']
244
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
245
+ end
246
+ rescue TencentCloud::Common::TencentCloudSDKException => e
247
+ raise e
248
+ rescue StandardError => e
249
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
250
+ end
251
+
252
+ # 根据地域获取KMS密钥别名
253
+
254
+ # @param request: Request instance for ListKeyAliasByRegion.
255
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::ListKeyAliasByRegionRequest`
256
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::ListKeyAliasByRegionResponse`
257
+ def ListKeyAliasByRegion(request)
258
+ body = send_request('ListKeyAliasByRegion', request.serialize)
259
+ response = JSON.parse(body)
260
+ if response['Response'].key?('Error') == false
261
+ model = ListKeyAliasByRegionResponse.new
262
+ model.deserialize(response['Response'])
263
+ model
264
+ else
265
+ code = response['Response']['Error']['Code']
266
+ message = response['Response']['Error']['Message']
267
+ reqid = response['Response']['RequestId']
268
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
269
+ end
270
+ rescue TencentCloud::Common::TencentCloudSDKException => e
271
+ raise e
272
+ rescue StandardError => e
273
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
274
+ end
275
+
276
+ # 用于对操作日志进行检索,便于用户进行查询相关的操作信息。
277
+
278
+ # @param request: Request instance for LookUpEvents.
279
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::LookUpEventsRequest`
280
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::LookUpEventsResponse`
281
+ def LookUpEvents(request)
282
+ body = send_request('LookUpEvents', request.serialize)
283
+ response = JSON.parse(body)
284
+ if response['Response'].key?('Error') == false
285
+ model = LookUpEventsResponse.new
286
+ model.deserialize(response['Response'])
287
+ model
288
+ else
289
+ code = response['Response']['Error']['Code']
290
+ message = response['Response']['Error']['Message']
291
+ reqid = response['Response']['RequestId']
292
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
293
+ end
294
+ rescue TencentCloud::Common::TencentCloudSDKException => e
295
+ raise e
296
+ rescue StandardError => e
297
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
298
+ end
299
+
300
+ # 开启跟踪集
301
+
302
+ # @param request: Request instance for StartLogging.
303
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::StartLoggingRequest`
304
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::StartLoggingResponse`
305
+ def StartLogging(request)
306
+ body = send_request('StartLogging', request.serialize)
307
+ response = JSON.parse(body)
308
+ if response['Response'].key?('Error') == false
309
+ model = StartLoggingResponse.new
310
+ model.deserialize(response['Response'])
311
+ model
312
+ else
313
+ code = response['Response']['Error']['Code']
314
+ message = response['Response']['Error']['Message']
315
+ reqid = response['Response']['RequestId']
316
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
317
+ end
318
+ rescue TencentCloud::Common::TencentCloudSDKException => e
319
+ raise e
320
+ rescue StandardError => e
321
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
322
+ end
323
+
324
+ # 关闭跟踪集
325
+
326
+ # @param request: Request instance for StopLogging.
327
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::StopLoggingRequest`
328
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::StopLoggingResponse`
329
+ def StopLogging(request)
330
+ body = send_request('StopLogging', request.serialize)
331
+ response = JSON.parse(body)
332
+ if response['Response'].key?('Error') == false
333
+ model = StopLoggingResponse.new
334
+ model.deserialize(response['Response'])
335
+ model
336
+ else
337
+ code = response['Response']['Error']['Code']
338
+ message = response['Response']['Error']['Message']
339
+ reqid = response['Response']['RequestId']
340
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
341
+ end
342
+ rescue TencentCloud::Common::TencentCloudSDKException => e
343
+ raise e
344
+ rescue StandardError => e
345
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
346
+ end
347
+
348
+ # 参数要求:
349
+ # 1、如果IsCreateNewBucket的值存在的话,cosRegion和cosBucketName都是必填参数。
350
+ # 2、如果IsEnableCmqNotify的值是1的话,IsCreateNewQueue、CmqRegion和CmqQueueName都是必填参数。
351
+ # 3、如果IsEnableCmqNotify的值是0的话,IsCreateNewQueue、CmqRegion和CmqQueueName都不能传。
352
+ # 4、如果IsEnableKmsEncry的值是1的话,KmsRegion和KeyId属于必填项
353
+
354
+ # @param request: Request instance for UpdateAudit.
355
+ # @type request: :class:`Tencentcloud::cloudaudit::V20190319::UpdateAuditRequest`
356
+ # @rtype: :class:`Tencentcloud::cloudaudit::V20190319::UpdateAuditResponse`
357
+ def UpdateAudit(request)
358
+ body = send_request('UpdateAudit', request.serialize)
359
+ response = JSON.parse(body)
360
+ if response['Response'].key?('Error') == false
361
+ model = UpdateAuditResponse.new
362
+ model.deserialize(response['Response'])
363
+ model
364
+ else
365
+ code = response['Response']['Error']['Code']
366
+ message = response['Response']['Error']['Message']
367
+ reqid = response['Response']['RequestId']
368
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
369
+ end
370
+ rescue TencentCloud::Common::TencentCloudSDKException => e
371
+ raise e
372
+ rescue StandardError => e
373
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
374
+ end
375
+
376
+
377
+ end
378
+ end
379
+ end
380
+ end