tencentcloud-sdk-apigateway 1.0.200
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-apigateway.rb +11 -0
- data/lib/v20180808/client.rb +2194 -0
- data/lib/v20180808/models.rb +8437 -0
- metadata +66 -0
@@ -0,0 +1,2194 @@
|
|
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 Apigateway
|
21
|
+
module V20180808
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
23
|
+
|
24
|
+
def initialize(credential, region, profile = nil)
|
25
|
+
api_version = '2018-08-08'
|
26
|
+
api_endpoint = 'apigateway.tencentcloudapi.com'
|
27
|
+
sdk_version = 'APIGATEWAY_' + 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上。
|
33
|
+
|
34
|
+
# @param request: Request instance for AttachPlugin.
|
35
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::AttachPluginRequest`
|
36
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::AttachPluginResponse`
|
37
|
+
def AttachPlugin(request)
|
38
|
+
body = send_request('AttachPlugin', request.serialize)
|
39
|
+
response = JSON.parse(body)
|
40
|
+
if response['Response'].key?('Error') == false
|
41
|
+
model = AttachPluginResponse.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
|
+
# 本接口(BindApiApp)用于绑定应用到API。
|
57
|
+
|
58
|
+
# @param request: Request instance for BindApiApp.
|
59
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::BindApiAppRequest`
|
60
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::BindApiAppResponse`
|
61
|
+
def BindApiApp(request)
|
62
|
+
body = send_request('BindApiApp', request.serialize)
|
63
|
+
response = JSON.parse(body)
|
64
|
+
if response['Response'].key?('Error') == false
|
65
|
+
model = BindApiAppResponse.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
|
+
# 本接口(BindEnvironment)用于绑定使用计划到服务或API。
|
81
|
+
# 用户在发布服务到某个环境中后,如果 API 需要鉴权,还需要绑定使用计划才能进行调用,此接口用户将使用计划绑定到特定环境。
|
82
|
+
# 目前支持绑定使用计划到API,但是同一个服务不能同时存在绑定到服务的使用计划和绑定到API的使用计划,所以对已经绑定过服务级别使用计划的环境,请先使用 服务级别使用计划降级 接口进行降级操作。
|
83
|
+
|
84
|
+
# @param request: Request instance for BindEnvironment.
|
85
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::BindEnvironmentRequest`
|
86
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::BindEnvironmentResponse`
|
87
|
+
def BindEnvironment(request)
|
88
|
+
body = send_request('BindEnvironment', request.serialize)
|
89
|
+
response = JSON.parse(body)
|
90
|
+
if response['Response'].key?('Error') == false
|
91
|
+
model = BindEnvironmentResponse.new
|
92
|
+
model.deserialize(response['Response'])
|
93
|
+
model
|
94
|
+
else
|
95
|
+
code = response['Response']['Error']['Code']
|
96
|
+
message = response['Response']['Error']['Message']
|
97
|
+
reqid = response['Response']['RequestId']
|
98
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
99
|
+
end
|
100
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
101
|
+
raise e
|
102
|
+
rescue StandardError => e
|
103
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
104
|
+
end
|
105
|
+
|
106
|
+
# 本接口(BindIPStrategy)用于API绑定IP策略。
|
107
|
+
|
108
|
+
# @param request: Request instance for BindIPStrategy.
|
109
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::BindIPStrategyRequest`
|
110
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::BindIPStrategyResponse`
|
111
|
+
def BindIPStrategy(request)
|
112
|
+
body = send_request('BindIPStrategy', request.serialize)
|
113
|
+
response = JSON.parse(body)
|
114
|
+
if response['Response'].key?('Error') == false
|
115
|
+
model = BindIPStrategyResponse.new
|
116
|
+
model.deserialize(response['Response'])
|
117
|
+
model
|
118
|
+
else
|
119
|
+
code = response['Response']['Error']['Code']
|
120
|
+
message = response['Response']['Error']['Message']
|
121
|
+
reqid = response['Response']['RequestId']
|
122
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
123
|
+
end
|
124
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
125
|
+
raise e
|
126
|
+
rescue StandardError => e
|
127
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
128
|
+
end
|
129
|
+
|
130
|
+
# 本接口(BindSecretIds)用于为使用计划绑定密钥。
|
131
|
+
# 将密钥绑定到某个使用计划,并将此使用计划绑定到某个服务发布的环境上,调用者方可使用此密钥调用这个服务中的 API,可使用本接口为使用计划绑定密钥。
|
132
|
+
|
133
|
+
# @param request: Request instance for BindSecretIds.
|
134
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::BindSecretIdsRequest`
|
135
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::BindSecretIdsResponse`
|
136
|
+
def BindSecretIds(request)
|
137
|
+
body = send_request('BindSecretIds', request.serialize)
|
138
|
+
response = JSON.parse(body)
|
139
|
+
if response['Response'].key?('Error') == false
|
140
|
+
model = BindSecretIdsResponse.new
|
141
|
+
model.deserialize(response['Response'])
|
142
|
+
model
|
143
|
+
else
|
144
|
+
code = response['Response']['Error']['Code']
|
145
|
+
message = response['Response']['Error']['Message']
|
146
|
+
reqid = response['Response']['RequestId']
|
147
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
148
|
+
end
|
149
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
150
|
+
raise e
|
151
|
+
rescue StandardError => e
|
152
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
153
|
+
end
|
154
|
+
|
155
|
+
# 本接口(BindSubDomain)用于绑定自定义域名到服务。
|
156
|
+
# API 网关中每个服务都会提供一个默认的域名供用户调用,但当用户想使用自己的已有域名时,也可以将自定义域名绑定到此服务,在做好备案、与默认域名的 CNAME 后,可直接调用自定义域名。
|
157
|
+
|
158
|
+
# @param request: Request instance for BindSubDomain.
|
159
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::BindSubDomainRequest`
|
160
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::BindSubDomainResponse`
|
161
|
+
def BindSubDomain(request)
|
162
|
+
body = send_request('BindSubDomain', request.serialize)
|
163
|
+
response = JSON.parse(body)
|
164
|
+
if response['Response'].key?('Error') == false
|
165
|
+
model = BindSubDomainResponse.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
|
+
# 构建 API 文档
|
181
|
+
|
182
|
+
# @param request: Request instance for BuildAPIDoc.
|
183
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::BuildAPIDocRequest`
|
184
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::BuildAPIDocResponse`
|
185
|
+
def BuildAPIDoc(request)
|
186
|
+
body = send_request('BuildAPIDoc', request.serialize)
|
187
|
+
response = JSON.parse(body)
|
188
|
+
if response['Response'].key?('Error') == false
|
189
|
+
model = BuildAPIDocResponse.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
|
+
# 创建 API 文档
|
205
|
+
|
206
|
+
# @param request: Request instance for CreateAPIDoc.
|
207
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::CreateAPIDocRequest`
|
208
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::CreateAPIDocResponse`
|
209
|
+
def CreateAPIDoc(request)
|
210
|
+
body = send_request('CreateAPIDoc', request.serialize)
|
211
|
+
response = JSON.parse(body)
|
212
|
+
if response['Response'].key?('Error') == false
|
213
|
+
model = CreateAPIDocResponse.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
|
+
# 本接口(CreateApi)用于创建 API 接口,创建 API 前,用户需要先创建服务,每个 API 都有自己归属的服务。
|
229
|
+
|
230
|
+
# @param request: Request instance for CreateApi.
|
231
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::CreateApiRequest`
|
232
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::CreateApiResponse`
|
233
|
+
def CreateApi(request)
|
234
|
+
body = send_request('CreateApi', request.serialize)
|
235
|
+
response = JSON.parse(body)
|
236
|
+
if response['Response'].key?('Error') == false
|
237
|
+
model = CreateApiResponse.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
|
+
# 本接口(CreateApiApp)用于创建应用。
|
253
|
+
|
254
|
+
# @param request: Request instance for CreateApiApp.
|
255
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::CreateApiAppRequest`
|
256
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::CreateApiAppResponse`
|
257
|
+
def CreateApiApp(request)
|
258
|
+
body = send_request('CreateApiApp', request.serialize)
|
259
|
+
response = JSON.parse(body)
|
260
|
+
if response['Response'].key?('Error') == false
|
261
|
+
model = CreateApiAppResponse.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
|
+
# 本接口(CreateApiKey)用于创建一对新的 API 密钥。
|
277
|
+
|
278
|
+
# @param request: Request instance for CreateApiKey.
|
279
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::CreateApiKeyRequest`
|
280
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::CreateApiKeyResponse`
|
281
|
+
def CreateApiKey(request)
|
282
|
+
body = send_request('CreateApiKey', request.serialize)
|
283
|
+
response = JSON.parse(body)
|
284
|
+
if response['Response'].key?('Error') == false
|
285
|
+
model = CreateApiKeyResponse.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
|
+
# 本接口(CreateIPStrategy)用于创建服务IP策略。
|
301
|
+
|
302
|
+
# @param request: Request instance for CreateIPStrategy.
|
303
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::CreateIPStrategyRequest`
|
304
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::CreateIPStrategyResponse`
|
305
|
+
def CreateIPStrategy(request)
|
306
|
+
body = send_request('CreateIPStrategy', request.serialize)
|
307
|
+
response = JSON.parse(body)
|
308
|
+
if response['Response'].key?('Error') == false
|
309
|
+
model = CreateIPStrategyResponse.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
|
+
# 创建API网关插件。
|
325
|
+
|
326
|
+
# @param request: Request instance for CreatePlugin.
|
327
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::CreatePluginRequest`
|
328
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::CreatePluginResponse`
|
329
|
+
def CreatePlugin(request)
|
330
|
+
body = send_request('CreatePlugin', request.serialize)
|
331
|
+
response = JSON.parse(body)
|
332
|
+
if response['Response'].key?('Error') == false
|
333
|
+
model = CreatePluginResponse.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
|
+
# 本接口(CreateService)用于创建服务。
|
349
|
+
# API 网关使用的最大单元为服务,每个服务中可创建多个 API 接口。每个服务有一个默认域名供客户调用,用户也可绑定自定义域名到此服务中。
|
350
|
+
|
351
|
+
# @param request: Request instance for CreateService.
|
352
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::CreateServiceRequest`
|
353
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::CreateServiceResponse`
|
354
|
+
def CreateService(request)
|
355
|
+
body = send_request('CreateService', request.serialize)
|
356
|
+
response = JSON.parse(body)
|
357
|
+
if response['Response'].key?('Error') == false
|
358
|
+
model = CreateServiceResponse.new
|
359
|
+
model.deserialize(response['Response'])
|
360
|
+
model
|
361
|
+
else
|
362
|
+
code = response['Response']['Error']['Code']
|
363
|
+
message = response['Response']['Error']['Message']
|
364
|
+
reqid = response['Response']['RequestId']
|
365
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
366
|
+
end
|
367
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
368
|
+
raise e
|
369
|
+
rescue StandardError => e
|
370
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
371
|
+
end
|
372
|
+
|
373
|
+
# 本接口(CreateUsagePlan)用于创建使用计划。
|
374
|
+
# 用户在使用 API 网关时,需要创建使用计划并将其绑定到服务的环境中使用。
|
375
|
+
|
376
|
+
# @param request: Request instance for CreateUsagePlan.
|
377
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::CreateUsagePlanRequest`
|
378
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::CreateUsagePlanResponse`
|
379
|
+
def CreateUsagePlan(request)
|
380
|
+
body = send_request('CreateUsagePlan', request.serialize)
|
381
|
+
response = JSON.parse(body)
|
382
|
+
if response['Response'].key?('Error') == false
|
383
|
+
model = CreateUsagePlanResponse.new
|
384
|
+
model.deserialize(response['Response'])
|
385
|
+
model
|
386
|
+
else
|
387
|
+
code = response['Response']['Error']['Code']
|
388
|
+
message = response['Response']['Error']['Message']
|
389
|
+
reqid = response['Response']['RequestId']
|
390
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
391
|
+
end
|
392
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
393
|
+
raise e
|
394
|
+
rescue StandardError => e
|
395
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
396
|
+
end
|
397
|
+
|
398
|
+
# 删除 API 文档
|
399
|
+
|
400
|
+
# @param request: Request instance for DeleteAPIDoc.
|
401
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DeleteAPIDocRequest`
|
402
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DeleteAPIDocResponse`
|
403
|
+
def DeleteAPIDoc(request)
|
404
|
+
body = send_request('DeleteAPIDoc', request.serialize)
|
405
|
+
response = JSON.parse(body)
|
406
|
+
if response['Response'].key?('Error') == false
|
407
|
+
model = DeleteAPIDocResponse.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
|
+
# 本接口(DeleteApi)用于删除已经创建的API。
|
423
|
+
|
424
|
+
# @param request: Request instance for DeleteApi.
|
425
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DeleteApiRequest`
|
426
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DeleteApiResponse`
|
427
|
+
def DeleteApi(request)
|
428
|
+
body = send_request('DeleteApi', request.serialize)
|
429
|
+
response = JSON.parse(body)
|
430
|
+
if response['Response'].key?('Error') == false
|
431
|
+
model = DeleteApiResponse.new
|
432
|
+
model.deserialize(response['Response'])
|
433
|
+
model
|
434
|
+
else
|
435
|
+
code = response['Response']['Error']['Code']
|
436
|
+
message = response['Response']['Error']['Message']
|
437
|
+
reqid = response['Response']['RequestId']
|
438
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
439
|
+
end
|
440
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
441
|
+
raise e
|
442
|
+
rescue StandardError => e
|
443
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
444
|
+
end
|
445
|
+
|
446
|
+
# 本接口(DeleteApiApp)用于删除已经创建的应用。
|
447
|
+
|
448
|
+
# @param request: Request instance for DeleteApiApp.
|
449
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DeleteApiAppRequest`
|
450
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DeleteApiAppResponse`
|
451
|
+
def DeleteApiApp(request)
|
452
|
+
body = send_request('DeleteApiApp', request.serialize)
|
453
|
+
response = JSON.parse(body)
|
454
|
+
if response['Response'].key?('Error') == false
|
455
|
+
model = DeleteApiAppResponse.new
|
456
|
+
model.deserialize(response['Response'])
|
457
|
+
model
|
458
|
+
else
|
459
|
+
code = response['Response']['Error']['Code']
|
460
|
+
message = response['Response']['Error']['Message']
|
461
|
+
reqid = response['Response']['RequestId']
|
462
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
463
|
+
end
|
464
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
465
|
+
raise e
|
466
|
+
rescue StandardError => e
|
467
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
468
|
+
end
|
469
|
+
|
470
|
+
# 本接口(DeleteApiKey)用于删除一对 API 密钥。
|
471
|
+
|
472
|
+
# @param request: Request instance for DeleteApiKey.
|
473
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DeleteApiKeyRequest`
|
474
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DeleteApiKeyResponse`
|
475
|
+
def DeleteApiKey(request)
|
476
|
+
body = send_request('DeleteApiKey', request.serialize)
|
477
|
+
response = JSON.parse(body)
|
478
|
+
if response['Response'].key?('Error') == false
|
479
|
+
model = DeleteApiKeyResponse.new
|
480
|
+
model.deserialize(response['Response'])
|
481
|
+
model
|
482
|
+
else
|
483
|
+
code = response['Response']['Error']['Code']
|
484
|
+
message = response['Response']['Error']['Message']
|
485
|
+
reqid = response['Response']['RequestId']
|
486
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
487
|
+
end
|
488
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
489
|
+
raise e
|
490
|
+
rescue StandardError => e
|
491
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
492
|
+
end
|
493
|
+
|
494
|
+
# 本接口(DeleteIPStrategy)用于删除服务IP策略。
|
495
|
+
|
496
|
+
# @param request: Request instance for DeleteIPStrategy.
|
497
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DeleteIPStrategyRequest`
|
498
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DeleteIPStrategyResponse`
|
499
|
+
def DeleteIPStrategy(request)
|
500
|
+
body = send_request('DeleteIPStrategy', request.serialize)
|
501
|
+
response = JSON.parse(body)
|
502
|
+
if response['Response'].key?('Error') == false
|
503
|
+
model = DeleteIPStrategyResponse.new
|
504
|
+
model.deserialize(response['Response'])
|
505
|
+
model
|
506
|
+
else
|
507
|
+
code = response['Response']['Error']['Code']
|
508
|
+
message = response['Response']['Error']['Message']
|
509
|
+
reqid = response['Response']['RequestId']
|
510
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
511
|
+
end
|
512
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
513
|
+
raise e
|
514
|
+
rescue StandardError => e
|
515
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
516
|
+
end
|
517
|
+
|
518
|
+
# 删除API网关插件
|
519
|
+
|
520
|
+
# @param request: Request instance for DeletePlugin.
|
521
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DeletePluginRequest`
|
522
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DeletePluginResponse`
|
523
|
+
def DeletePlugin(request)
|
524
|
+
body = send_request('DeletePlugin', request.serialize)
|
525
|
+
response = JSON.parse(body)
|
526
|
+
if response['Response'].key?('Error') == false
|
527
|
+
model = DeletePluginResponse.new
|
528
|
+
model.deserialize(response['Response'])
|
529
|
+
model
|
530
|
+
else
|
531
|
+
code = response['Response']['Error']['Code']
|
532
|
+
message = response['Response']['Error']['Message']
|
533
|
+
reqid = response['Response']['RequestId']
|
534
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
535
|
+
end
|
536
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
537
|
+
raise e
|
538
|
+
rescue StandardError => e
|
539
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
540
|
+
end
|
541
|
+
|
542
|
+
# 本接口(DeleteService)用于删除 API 网关中某个服务。
|
543
|
+
|
544
|
+
# @param request: Request instance for DeleteService.
|
545
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DeleteServiceRequest`
|
546
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DeleteServiceResponse`
|
547
|
+
def DeleteService(request)
|
548
|
+
body = send_request('DeleteService', request.serialize)
|
549
|
+
response = JSON.parse(body)
|
550
|
+
if response['Response'].key?('Error') == false
|
551
|
+
model = DeleteServiceResponse.new
|
552
|
+
model.deserialize(response['Response'])
|
553
|
+
model
|
554
|
+
else
|
555
|
+
code = response['Response']['Error']['Code']
|
556
|
+
message = response['Response']['Error']['Message']
|
557
|
+
reqid = response['Response']['RequestId']
|
558
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
559
|
+
end
|
560
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
561
|
+
raise e
|
562
|
+
rescue StandardError => e
|
563
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
564
|
+
end
|
565
|
+
|
566
|
+
# 本接口(DeleteServiceSubDomainMapping)用于删除服务中某个环境的自定义域名映射。
|
567
|
+
# 当用户使用自定义域名,并使用了自定义映射时,可使用此接口。但需注意,若删除了所有环境的映射时,调用此 API 均会返回失败。
|
568
|
+
|
569
|
+
# @param request: Request instance for DeleteServiceSubDomainMapping.
|
570
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DeleteServiceSubDomainMappingRequest`
|
571
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DeleteServiceSubDomainMappingResponse`
|
572
|
+
def DeleteServiceSubDomainMapping(request)
|
573
|
+
body = send_request('DeleteServiceSubDomainMapping', request.serialize)
|
574
|
+
response = JSON.parse(body)
|
575
|
+
if response['Response'].key?('Error') == false
|
576
|
+
model = DeleteServiceSubDomainMappingResponse.new
|
577
|
+
model.deserialize(response['Response'])
|
578
|
+
model
|
579
|
+
else
|
580
|
+
code = response['Response']['Error']['Code']
|
581
|
+
message = response['Response']['Error']['Message']
|
582
|
+
reqid = response['Response']['RequestId']
|
583
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
584
|
+
end
|
585
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
586
|
+
raise e
|
587
|
+
rescue StandardError => e
|
588
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
589
|
+
end
|
590
|
+
|
591
|
+
# 本接口(DeleteUsagePlan)用于删除使用计划。
|
592
|
+
|
593
|
+
# @param request: Request instance for DeleteUsagePlan.
|
594
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DeleteUsagePlanRequest`
|
595
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DeleteUsagePlanResponse`
|
596
|
+
def DeleteUsagePlan(request)
|
597
|
+
body = send_request('DeleteUsagePlan', request.serialize)
|
598
|
+
response = JSON.parse(body)
|
599
|
+
if response['Response'].key?('Error') == false
|
600
|
+
model = DeleteUsagePlanResponse.new
|
601
|
+
model.deserialize(response['Response'])
|
602
|
+
model
|
603
|
+
else
|
604
|
+
code = response['Response']['Error']['Code']
|
605
|
+
message = response['Response']['Error']['Message']
|
606
|
+
reqid = response['Response']['RequestId']
|
607
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
608
|
+
end
|
609
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
610
|
+
raise e
|
611
|
+
rescue StandardError => e
|
612
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
613
|
+
end
|
614
|
+
|
615
|
+
# 本接口(DemoteServiceUsagePlan)用于将某个服务在某个环境的使用计划,降级到API上。
|
616
|
+
# 如果服务内没有API不允许进行此操作。
|
617
|
+
# 如果当前环境没有发布,不允许进行此操作。
|
618
|
+
|
619
|
+
# @param request: Request instance for DemoteServiceUsagePlan.
|
620
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DemoteServiceUsagePlanRequest`
|
621
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DemoteServiceUsagePlanResponse`
|
622
|
+
def DemoteServiceUsagePlan(request)
|
623
|
+
body = send_request('DemoteServiceUsagePlan', request.serialize)
|
624
|
+
response = JSON.parse(body)
|
625
|
+
if response['Response'].key?('Error') == false
|
626
|
+
model = DemoteServiceUsagePlanResponse.new
|
627
|
+
model.deserialize(response['Response'])
|
628
|
+
model
|
629
|
+
else
|
630
|
+
code = response['Response']['Error']['Code']
|
631
|
+
message = response['Response']['Error']['Message']
|
632
|
+
reqid = response['Response']['RequestId']
|
633
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
634
|
+
end
|
635
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
636
|
+
raise e
|
637
|
+
rescue StandardError => e
|
638
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
639
|
+
end
|
640
|
+
|
641
|
+
# 查询 API 文档详情
|
642
|
+
|
643
|
+
# @param request: Request instance for DescribeAPIDocDetail.
|
644
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeAPIDocDetailRequest`
|
645
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeAPIDocDetailResponse`
|
646
|
+
def DescribeAPIDocDetail(request)
|
647
|
+
body = send_request('DescribeAPIDocDetail', request.serialize)
|
648
|
+
response = JSON.parse(body)
|
649
|
+
if response['Response'].key?('Error') == false
|
650
|
+
model = DescribeAPIDocDetailResponse.new
|
651
|
+
model.deserialize(response['Response'])
|
652
|
+
model
|
653
|
+
else
|
654
|
+
code = response['Response']['Error']['Code']
|
655
|
+
message = response['Response']['Error']['Message']
|
656
|
+
reqid = response['Response']['RequestId']
|
657
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
658
|
+
end
|
659
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
660
|
+
raise e
|
661
|
+
rescue StandardError => e
|
662
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
663
|
+
end
|
664
|
+
|
665
|
+
# 查询 API 文档列表
|
666
|
+
|
667
|
+
# @param request: Request instance for DescribeAPIDocs.
|
668
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeAPIDocsRequest`
|
669
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeAPIDocsResponse`
|
670
|
+
def DescribeAPIDocs(request)
|
671
|
+
body = send_request('DescribeAPIDocs', request.serialize)
|
672
|
+
response = JSON.parse(body)
|
673
|
+
if response['Response'].key?('Error') == false
|
674
|
+
model = DescribeAPIDocsResponse.new
|
675
|
+
model.deserialize(response['Response'])
|
676
|
+
model
|
677
|
+
else
|
678
|
+
code = response['Response']['Error']['Code']
|
679
|
+
message = response['Response']['Error']['Message']
|
680
|
+
reqid = response['Response']['RequestId']
|
681
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
682
|
+
end
|
683
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
684
|
+
raise e
|
685
|
+
rescue StandardError => e
|
686
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
687
|
+
end
|
688
|
+
|
689
|
+
# 展示插件相关的API列表,包括已绑定的和未绑定的API信息。
|
690
|
+
|
691
|
+
# @param request: Request instance for DescribeAllPluginApis.
|
692
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeAllPluginApisRequest`
|
693
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeAllPluginApisResponse`
|
694
|
+
def DescribeAllPluginApis(request)
|
695
|
+
body = send_request('DescribeAllPluginApis', request.serialize)
|
696
|
+
response = JSON.parse(body)
|
697
|
+
if response['Response'].key?('Error') == false
|
698
|
+
model = DescribeAllPluginApisResponse.new
|
699
|
+
model.deserialize(response['Response'])
|
700
|
+
model
|
701
|
+
else
|
702
|
+
code = response['Response']['Error']['Code']
|
703
|
+
message = response['Response']['Error']['Message']
|
704
|
+
reqid = response['Response']['RequestId']
|
705
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
706
|
+
end
|
707
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
708
|
+
raise e
|
709
|
+
rescue StandardError => e
|
710
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
711
|
+
end
|
712
|
+
|
713
|
+
# 本接口(DescribeApi)用于查询用户 API 网关的 API 接口的详细信息。
|
714
|
+
|
715
|
+
# @param request: Request instance for DescribeApi.
|
716
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeApiRequest`
|
717
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeApiResponse`
|
718
|
+
def DescribeApi(request)
|
719
|
+
body = send_request('DescribeApi', request.serialize)
|
720
|
+
response = JSON.parse(body)
|
721
|
+
if response['Response'].key?('Error') == false
|
722
|
+
model = DescribeApiResponse.new
|
723
|
+
model.deserialize(response['Response'])
|
724
|
+
model
|
725
|
+
else
|
726
|
+
code = response['Response']['Error']['Code']
|
727
|
+
message = response['Response']['Error']['Message']
|
728
|
+
reqid = response['Response']['RequestId']
|
729
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
730
|
+
end
|
731
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
732
|
+
raise e
|
733
|
+
rescue StandardError => e
|
734
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
735
|
+
end
|
736
|
+
|
737
|
+
# 本接口(DescribeApiApp)用于根据应用ID搜索应用。
|
738
|
+
|
739
|
+
# @param request: Request instance for DescribeApiApp.
|
740
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeApiAppRequest`
|
741
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeApiAppResponse`
|
742
|
+
def DescribeApiApp(request)
|
743
|
+
body = send_request('DescribeApiApp', request.serialize)
|
744
|
+
response = JSON.parse(body)
|
745
|
+
if response['Response'].key?('Error') == false
|
746
|
+
model = DescribeApiAppResponse.new
|
747
|
+
model.deserialize(response['Response'])
|
748
|
+
model
|
749
|
+
else
|
750
|
+
code = response['Response']['Error']['Code']
|
751
|
+
message = response['Response']['Error']['Message']
|
752
|
+
reqid = response['Response']['RequestId']
|
753
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
754
|
+
end
|
755
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
756
|
+
raise e
|
757
|
+
rescue StandardError => e
|
758
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
759
|
+
end
|
760
|
+
|
761
|
+
# 本接口(DescribeApiAppBindApisStatus)查询应用绑定的Api列表。
|
762
|
+
|
763
|
+
# @param request: Request instance for DescribeApiAppBindApisStatus.
|
764
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeApiAppBindApisStatusRequest`
|
765
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeApiAppBindApisStatusResponse`
|
766
|
+
def DescribeApiAppBindApisStatus(request)
|
767
|
+
body = send_request('DescribeApiAppBindApisStatus', request.serialize)
|
768
|
+
response = JSON.parse(body)
|
769
|
+
if response['Response'].key?('Error') == false
|
770
|
+
model = DescribeApiAppBindApisStatusResponse.new
|
771
|
+
model.deserialize(response['Response'])
|
772
|
+
model
|
773
|
+
else
|
774
|
+
code = response['Response']['Error']['Code']
|
775
|
+
message = response['Response']['Error']['Message']
|
776
|
+
reqid = response['Response']['RequestId']
|
777
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
778
|
+
end
|
779
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
780
|
+
raise e
|
781
|
+
rescue StandardError => e
|
782
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
783
|
+
end
|
784
|
+
|
785
|
+
# 本接口(DescribeApiAppsStatus)查询应用列表。
|
786
|
+
|
787
|
+
# @param request: Request instance for DescribeApiAppsStatus.
|
788
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeApiAppsStatusRequest`
|
789
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeApiAppsStatusResponse`
|
790
|
+
def DescribeApiAppsStatus(request)
|
791
|
+
body = send_request('DescribeApiAppsStatus', request.serialize)
|
792
|
+
response = JSON.parse(body)
|
793
|
+
if response['Response'].key?('Error') == false
|
794
|
+
model = DescribeApiAppsStatusResponse.new
|
795
|
+
model.deserialize(response['Response'])
|
796
|
+
model
|
797
|
+
else
|
798
|
+
code = response['Response']['Error']['Code']
|
799
|
+
message = response['Response']['Error']['Message']
|
800
|
+
reqid = response['Response']['RequestId']
|
801
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
802
|
+
end
|
803
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
804
|
+
raise e
|
805
|
+
rescue StandardError => e
|
806
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
807
|
+
end
|
808
|
+
|
809
|
+
# 本接口(DescribeApiBindApiAppsStatus)查询Api绑定的应用列表。
|
810
|
+
|
811
|
+
# @param request: Request instance for DescribeApiBindApiAppsStatus.
|
812
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeApiBindApiAppsStatusRequest`
|
813
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeApiBindApiAppsStatusResponse`
|
814
|
+
def DescribeApiBindApiAppsStatus(request)
|
815
|
+
body = send_request('DescribeApiBindApiAppsStatus', request.serialize)
|
816
|
+
response = JSON.parse(body)
|
817
|
+
if response['Response'].key?('Error') == false
|
818
|
+
model = DescribeApiBindApiAppsStatusResponse.new
|
819
|
+
model.deserialize(response['Response'])
|
820
|
+
model
|
821
|
+
else
|
822
|
+
code = response['Response']['Error']['Code']
|
823
|
+
message = response['Response']['Error']['Message']
|
824
|
+
reqid = response['Response']['RequestId']
|
825
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
826
|
+
end
|
827
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
828
|
+
raise e
|
829
|
+
rescue StandardError => e
|
830
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
831
|
+
end
|
832
|
+
|
833
|
+
# 本接口(DescribeApiEnvironmentStrategy)用于展示API绑定的限流策略。
|
834
|
+
|
835
|
+
# @param request: Request instance for DescribeApiEnvironmentStrategy.
|
836
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeApiEnvironmentStrategyRequest`
|
837
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeApiEnvironmentStrategyResponse`
|
838
|
+
def DescribeApiEnvironmentStrategy(request)
|
839
|
+
body = send_request('DescribeApiEnvironmentStrategy', request.serialize)
|
840
|
+
response = JSON.parse(body)
|
841
|
+
if response['Response'].key?('Error') == false
|
842
|
+
model = DescribeApiEnvironmentStrategyResponse.new
|
843
|
+
model.deserialize(response['Response'])
|
844
|
+
model
|
845
|
+
else
|
846
|
+
code = response['Response']['Error']['Code']
|
847
|
+
message = response['Response']['Error']['Message']
|
848
|
+
reqid = response['Response']['RequestId']
|
849
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
850
|
+
end
|
851
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
852
|
+
raise e
|
853
|
+
rescue StandardError => e
|
854
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
855
|
+
end
|
856
|
+
|
857
|
+
# 本接口(DescribeApiForApiApp)用于应用使用者查询部署于 API 网关的 API 接口的详细信息。
|
858
|
+
|
859
|
+
# @param request: Request instance for DescribeApiForApiApp.
|
860
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeApiForApiAppRequest`
|
861
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeApiForApiAppResponse`
|
862
|
+
def DescribeApiForApiApp(request)
|
863
|
+
body = send_request('DescribeApiForApiApp', request.serialize)
|
864
|
+
response = JSON.parse(body)
|
865
|
+
if response['Response'].key?('Error') == false
|
866
|
+
model = DescribeApiForApiAppResponse.new
|
867
|
+
model.deserialize(response['Response'])
|
868
|
+
model
|
869
|
+
else
|
870
|
+
code = response['Response']['Error']['Code']
|
871
|
+
message = response['Response']['Error']['Message']
|
872
|
+
reqid = response['Response']['RequestId']
|
873
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
874
|
+
end
|
875
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
876
|
+
raise e
|
877
|
+
rescue StandardError => e
|
878
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
879
|
+
end
|
880
|
+
|
881
|
+
# 本接口(DescribeApiKey)用于查询密钥详情。
|
882
|
+
# 用户在创建密钥后,可用此接口查询一个 API 密钥的详情,该接口会显示密钥 Key。
|
883
|
+
|
884
|
+
# @param request: Request instance for DescribeApiKey.
|
885
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeApiKeyRequest`
|
886
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeApiKeyResponse`
|
887
|
+
def DescribeApiKey(request)
|
888
|
+
body = send_request('DescribeApiKey', request.serialize)
|
889
|
+
response = JSON.parse(body)
|
890
|
+
if response['Response'].key?('Error') == false
|
891
|
+
model = DescribeApiKeyResponse.new
|
892
|
+
model.deserialize(response['Response'])
|
893
|
+
model
|
894
|
+
else
|
895
|
+
code = response['Response']['Error']['Code']
|
896
|
+
message = response['Response']['Error']['Message']
|
897
|
+
reqid = response['Response']['RequestId']
|
898
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
899
|
+
end
|
900
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
901
|
+
raise e
|
902
|
+
rescue StandardError => e
|
903
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
904
|
+
end
|
905
|
+
|
906
|
+
# 本接口(DescribeApiKeysStatus)用于查询密钥列表。
|
907
|
+
# 当用户创建了多个密钥对时,可使用本接口查询一个或多个 API 密钥信息,本接口不会显示密钥 Key。
|
908
|
+
|
909
|
+
# @param request: Request instance for DescribeApiKeysStatus.
|
910
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeApiKeysStatusRequest`
|
911
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeApiKeysStatusResponse`
|
912
|
+
def DescribeApiKeysStatus(request)
|
913
|
+
body = send_request('DescribeApiKeysStatus', request.serialize)
|
914
|
+
response = JSON.parse(body)
|
915
|
+
if response['Response'].key?('Error') == false
|
916
|
+
model = DescribeApiKeysStatusResponse.new
|
917
|
+
model.deserialize(response['Response'])
|
918
|
+
model
|
919
|
+
else
|
920
|
+
code = response['Response']['Error']['Code']
|
921
|
+
message = response['Response']['Error']['Message']
|
922
|
+
reqid = response['Response']['RequestId']
|
923
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
924
|
+
end
|
925
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
926
|
+
raise e
|
927
|
+
rescue StandardError => e
|
928
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
929
|
+
end
|
930
|
+
|
931
|
+
# 本接口(DescribeApiUsagePlan)用于查询服务中 API 使用计划详情。
|
932
|
+
# 服务若需要鉴权限流生效,则需要绑定使用计划到此服务中,本接口用于查询绑定到一个服务及其中 API 的所有使用计划。
|
933
|
+
|
934
|
+
# @param request: Request instance for DescribeApiUsagePlan.
|
935
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeApiUsagePlanRequest`
|
936
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeApiUsagePlanResponse`
|
937
|
+
def DescribeApiUsagePlan(request)
|
938
|
+
body = send_request('DescribeApiUsagePlan', request.serialize)
|
939
|
+
response = JSON.parse(body)
|
940
|
+
if response['Response'].key?('Error') == false
|
941
|
+
model = DescribeApiUsagePlanResponse.new
|
942
|
+
model.deserialize(response['Response'])
|
943
|
+
model
|
944
|
+
else
|
945
|
+
code = response['Response']['Error']['Code']
|
946
|
+
message = response['Response']['Error']['Message']
|
947
|
+
reqid = response['Response']['RequestId']
|
948
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
949
|
+
end
|
950
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
951
|
+
raise e
|
952
|
+
rescue StandardError => e
|
953
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
954
|
+
end
|
955
|
+
|
956
|
+
# 本接口(DescribeApisStatus)用于查看一个服务下的某个 API 或所有 API 列表及其相关信息。
|
957
|
+
|
958
|
+
# @param request: Request instance for DescribeApisStatus.
|
959
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeApisStatusRequest`
|
960
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeApisStatusResponse`
|
961
|
+
def DescribeApisStatus(request)
|
962
|
+
body = send_request('DescribeApisStatus', request.serialize)
|
963
|
+
response = JSON.parse(body)
|
964
|
+
if response['Response'].key?('Error') == false
|
965
|
+
model = DescribeApisStatusResponse.new
|
966
|
+
model.deserialize(response['Response'])
|
967
|
+
model
|
968
|
+
else
|
969
|
+
code = response['Response']['Error']['Code']
|
970
|
+
message = response['Response']['Error']['Message']
|
971
|
+
reqid = response['Response']['RequestId']
|
972
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
973
|
+
end
|
974
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
975
|
+
raise e
|
976
|
+
rescue StandardError => e
|
977
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
978
|
+
end
|
979
|
+
|
980
|
+
# 本接口(DescribeExclusiveInstanceDetail)用于查询独享实例详情信息。
|
981
|
+
|
982
|
+
# @param request: Request instance for DescribeExclusiveInstanceDetail.
|
983
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeExclusiveInstanceDetailRequest`
|
984
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeExclusiveInstanceDetailResponse`
|
985
|
+
def DescribeExclusiveInstanceDetail(request)
|
986
|
+
body = send_request('DescribeExclusiveInstanceDetail', request.serialize)
|
987
|
+
response = JSON.parse(body)
|
988
|
+
if response['Response'].key?('Error') == false
|
989
|
+
model = DescribeExclusiveInstanceDetailResponse.new
|
990
|
+
model.deserialize(response['Response'])
|
991
|
+
model
|
992
|
+
else
|
993
|
+
code = response['Response']['Error']['Code']
|
994
|
+
message = response['Response']['Error']['Message']
|
995
|
+
reqid = response['Response']['RequestId']
|
996
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
997
|
+
end
|
998
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
999
|
+
raise e
|
1000
|
+
rescue StandardError => e
|
1001
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1002
|
+
end
|
1003
|
+
|
1004
|
+
# 本接口(DescribeExclusiveInstances)用于查询独享实例列表信息。
|
1005
|
+
|
1006
|
+
# @param request: Request instance for DescribeExclusiveInstances.
|
1007
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeExclusiveInstancesRequest`
|
1008
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeExclusiveInstancesResponse`
|
1009
|
+
def DescribeExclusiveInstances(request)
|
1010
|
+
body = send_request('DescribeExclusiveInstances', request.serialize)
|
1011
|
+
response = JSON.parse(body)
|
1012
|
+
if response['Response'].key?('Error') == false
|
1013
|
+
model = DescribeExclusiveInstancesResponse.new
|
1014
|
+
model.deserialize(response['Response'])
|
1015
|
+
model
|
1016
|
+
else
|
1017
|
+
code = response['Response']['Error']['Code']
|
1018
|
+
message = response['Response']['Error']['Message']
|
1019
|
+
reqid = response['Response']['RequestId']
|
1020
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1021
|
+
end
|
1022
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1023
|
+
raise e
|
1024
|
+
rescue StandardError => e
|
1025
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1026
|
+
end
|
1027
|
+
|
1028
|
+
# 本接口(DescribeIPStrategy)用于查询IP策略详情。
|
1029
|
+
|
1030
|
+
# @param request: Request instance for DescribeIPStrategy.
|
1031
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeIPStrategyRequest`
|
1032
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeIPStrategyResponse`
|
1033
|
+
def DescribeIPStrategy(request)
|
1034
|
+
body = send_request('DescribeIPStrategy', request.serialize)
|
1035
|
+
response = JSON.parse(body)
|
1036
|
+
if response['Response'].key?('Error') == false
|
1037
|
+
model = DescribeIPStrategyResponse.new
|
1038
|
+
model.deserialize(response['Response'])
|
1039
|
+
model
|
1040
|
+
else
|
1041
|
+
code = response['Response']['Error']['Code']
|
1042
|
+
message = response['Response']['Error']['Message']
|
1043
|
+
reqid = response['Response']['RequestId']
|
1044
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1045
|
+
end
|
1046
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1047
|
+
raise e
|
1048
|
+
rescue StandardError => e
|
1049
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
# 本接口(DescribeIPStrategyApisStatus)用于查询IP策略可以绑定的API列表。即服务下所有API和该策略已绑定API的差集。
|
1053
|
+
|
1054
|
+
# @param request: Request instance for DescribeIPStrategyApisStatus.
|
1055
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeIPStrategyApisStatusRequest`
|
1056
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeIPStrategyApisStatusResponse`
|
1057
|
+
def DescribeIPStrategyApisStatus(request)
|
1058
|
+
body = send_request('DescribeIPStrategyApisStatus', request.serialize)
|
1059
|
+
response = JSON.parse(body)
|
1060
|
+
if response['Response'].key?('Error') == false
|
1061
|
+
model = DescribeIPStrategyApisStatusResponse.new
|
1062
|
+
model.deserialize(response['Response'])
|
1063
|
+
model
|
1064
|
+
else
|
1065
|
+
code = response['Response']['Error']['Code']
|
1066
|
+
message = response['Response']['Error']['Message']
|
1067
|
+
reqid = response['Response']['RequestId']
|
1068
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1069
|
+
end
|
1070
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1071
|
+
raise e
|
1072
|
+
rescue StandardError => e
|
1073
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
# 本接口(DescribeIPStrategysStatus)用于查询服务IP策略列表。
|
1077
|
+
|
1078
|
+
# @param request: Request instance for DescribeIPStrategysStatus.
|
1079
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeIPStrategysStatusRequest`
|
1080
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeIPStrategysStatusResponse`
|
1081
|
+
def DescribeIPStrategysStatus(request)
|
1082
|
+
body = send_request('DescribeIPStrategysStatus', request.serialize)
|
1083
|
+
response = JSON.parse(body)
|
1084
|
+
if response['Response'].key?('Error') == false
|
1085
|
+
model = DescribeIPStrategysStatusResponse.new
|
1086
|
+
model.deserialize(response['Response'])
|
1087
|
+
model
|
1088
|
+
else
|
1089
|
+
code = response['Response']['Error']['Code']
|
1090
|
+
message = response['Response']['Error']['Message']
|
1091
|
+
reqid = response['Response']['RequestId']
|
1092
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1093
|
+
end
|
1094
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1095
|
+
raise e
|
1096
|
+
rescue StandardError => e
|
1097
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1098
|
+
end
|
1099
|
+
|
1100
|
+
# 本接口DescribeLogSearch用于搜索日志
|
1101
|
+
|
1102
|
+
# @param request: Request instance for DescribeLogSearch.
|
1103
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeLogSearchRequest`
|
1104
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeLogSearchResponse`
|
1105
|
+
def DescribeLogSearch(request)
|
1106
|
+
body = send_request('DescribeLogSearch', request.serialize)
|
1107
|
+
response = JSON.parse(body)
|
1108
|
+
if response['Response'].key?('Error') == false
|
1109
|
+
model = DescribeLogSearchResponse.new
|
1110
|
+
model.deserialize(response['Response'])
|
1111
|
+
model
|
1112
|
+
else
|
1113
|
+
code = response['Response']['Error']['Code']
|
1114
|
+
message = response['Response']['Error']['Message']
|
1115
|
+
reqid = response['Response']['RequestId']
|
1116
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1117
|
+
end
|
1118
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1119
|
+
raise e
|
1120
|
+
rescue StandardError => e
|
1121
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1122
|
+
end
|
1123
|
+
|
1124
|
+
# 展示插件详情,支持按照插件ID进行。
|
1125
|
+
|
1126
|
+
# @param request: Request instance for DescribePlugin.
|
1127
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribePluginRequest`
|
1128
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribePluginResponse`
|
1129
|
+
def DescribePlugin(request)
|
1130
|
+
body = send_request('DescribePlugin', request.serialize)
|
1131
|
+
response = JSON.parse(body)
|
1132
|
+
if response['Response'].key?('Error') == false
|
1133
|
+
model = DescribePluginResponse.new
|
1134
|
+
model.deserialize(response['Response'])
|
1135
|
+
model
|
1136
|
+
else
|
1137
|
+
code = response['Response']['Error']['Code']
|
1138
|
+
message = response['Response']['Error']['Message']
|
1139
|
+
reqid = response['Response']['RequestId']
|
1140
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1141
|
+
end
|
1142
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1143
|
+
raise e
|
1144
|
+
rescue StandardError => e
|
1145
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1146
|
+
end
|
1147
|
+
|
1148
|
+
# 查询指定插件下绑定的API信息
|
1149
|
+
|
1150
|
+
# @param request: Request instance for DescribePluginApis.
|
1151
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribePluginApisRequest`
|
1152
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribePluginApisResponse`
|
1153
|
+
def DescribePluginApis(request)
|
1154
|
+
body = send_request('DescribePluginApis', request.serialize)
|
1155
|
+
response = JSON.parse(body)
|
1156
|
+
if response['Response'].key?('Error') == false
|
1157
|
+
model = DescribePluginApisResponse.new
|
1158
|
+
model.deserialize(response['Response'])
|
1159
|
+
model
|
1160
|
+
else
|
1161
|
+
code = response['Response']['Error']['Code']
|
1162
|
+
message = response['Response']['Error']['Message']
|
1163
|
+
reqid = response['Response']['RequestId']
|
1164
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1165
|
+
end
|
1166
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1167
|
+
raise e
|
1168
|
+
rescue StandardError => e
|
1169
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1170
|
+
end
|
1171
|
+
|
1172
|
+
# 展示插件列表和详情,支持分页,支持按照插件类型查询,支持按照插件ID批量查询,支持按照插件名称查询。
|
1173
|
+
|
1174
|
+
# @param request: Request instance for DescribePlugins.
|
1175
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribePluginsRequest`
|
1176
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribePluginsResponse`
|
1177
|
+
def DescribePlugins(request)
|
1178
|
+
body = send_request('DescribePlugins', request.serialize)
|
1179
|
+
response = JSON.parse(body)
|
1180
|
+
if response['Response'].key?('Error') == false
|
1181
|
+
model = DescribePluginsResponse.new
|
1182
|
+
model.deserialize(response['Response'])
|
1183
|
+
model
|
1184
|
+
else
|
1185
|
+
code = response['Response']['Error']['Code']
|
1186
|
+
message = response['Response']['Error']['Message']
|
1187
|
+
reqid = response['Response']['RequestId']
|
1188
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1189
|
+
end
|
1190
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1191
|
+
raise e
|
1192
|
+
rescue StandardError => e
|
1193
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1194
|
+
end
|
1195
|
+
|
1196
|
+
# 本接口(DescribeService)用于查询一个服务的详细信息、包括服务的描述、域名、协议、创建时间、发布情况等信息。
|
1197
|
+
|
1198
|
+
# @param request: Request instance for DescribeService.
|
1199
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceRequest`
|
1200
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceResponse`
|
1201
|
+
def DescribeService(request)
|
1202
|
+
body = send_request('DescribeService', request.serialize)
|
1203
|
+
response = JSON.parse(body)
|
1204
|
+
if response['Response'].key?('Error') == false
|
1205
|
+
model = DescribeServiceResponse.new
|
1206
|
+
model.deserialize(response['Response'])
|
1207
|
+
model
|
1208
|
+
else
|
1209
|
+
code = response['Response']['Error']['Code']
|
1210
|
+
message = response['Response']['Error']['Message']
|
1211
|
+
reqid = response['Response']['RequestId']
|
1212
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1213
|
+
end
|
1214
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1215
|
+
raise e
|
1216
|
+
rescue StandardError => e
|
1217
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1218
|
+
end
|
1219
|
+
|
1220
|
+
# 本接口(DescribeServiceEnvironmentList)用于查询一个服务的环境列表,可查询到此服务下所有环境及其状态。
|
1221
|
+
|
1222
|
+
# @param request: Request instance for DescribeServiceEnvironmentList.
|
1223
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceEnvironmentListRequest`
|
1224
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceEnvironmentListResponse`
|
1225
|
+
def DescribeServiceEnvironmentList(request)
|
1226
|
+
body = send_request('DescribeServiceEnvironmentList', request.serialize)
|
1227
|
+
response = JSON.parse(body)
|
1228
|
+
if response['Response'].key?('Error') == false
|
1229
|
+
model = DescribeServiceEnvironmentListResponse.new
|
1230
|
+
model.deserialize(response['Response'])
|
1231
|
+
model
|
1232
|
+
else
|
1233
|
+
code = response['Response']['Error']['Code']
|
1234
|
+
message = response['Response']['Error']['Message']
|
1235
|
+
reqid = response['Response']['RequestId']
|
1236
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1237
|
+
end
|
1238
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1239
|
+
raise e
|
1240
|
+
rescue StandardError => e
|
1241
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1242
|
+
end
|
1243
|
+
|
1244
|
+
# 本接口(DescribeServiceEnvironmentReleaseHistory)用于查询服务环境的发布历史。
|
1245
|
+
# 用户在创建好服务后需要发布到某个环境中才能进行使用,本接口用于查询一个服务某个环境的发布记录。
|
1246
|
+
|
1247
|
+
# @param request: Request instance for DescribeServiceEnvironmentReleaseHistory.
|
1248
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceEnvironmentReleaseHistoryRequest`
|
1249
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceEnvironmentReleaseHistoryResponse`
|
1250
|
+
def DescribeServiceEnvironmentReleaseHistory(request)
|
1251
|
+
body = send_request('DescribeServiceEnvironmentReleaseHistory', request.serialize)
|
1252
|
+
response = JSON.parse(body)
|
1253
|
+
if response['Response'].key?('Error') == false
|
1254
|
+
model = DescribeServiceEnvironmentReleaseHistoryResponse.new
|
1255
|
+
model.deserialize(response['Response'])
|
1256
|
+
model
|
1257
|
+
else
|
1258
|
+
code = response['Response']['Error']['Code']
|
1259
|
+
message = response['Response']['Error']['Message']
|
1260
|
+
reqid = response['Response']['RequestId']
|
1261
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1262
|
+
end
|
1263
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1264
|
+
raise e
|
1265
|
+
rescue StandardError => e
|
1266
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1267
|
+
end
|
1268
|
+
|
1269
|
+
# 本接口(DescribeServiceEnvironmentStrategy)用于展示服务限流策略。
|
1270
|
+
|
1271
|
+
# @param request: Request instance for DescribeServiceEnvironmentStrategy.
|
1272
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceEnvironmentStrategyRequest`
|
1273
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceEnvironmentStrategyResponse`
|
1274
|
+
def DescribeServiceEnvironmentStrategy(request)
|
1275
|
+
body = send_request('DescribeServiceEnvironmentStrategy', request.serialize)
|
1276
|
+
response = JSON.parse(body)
|
1277
|
+
if response['Response'].key?('Error') == false
|
1278
|
+
model = DescribeServiceEnvironmentStrategyResponse.new
|
1279
|
+
model.deserialize(response['Response'])
|
1280
|
+
model
|
1281
|
+
else
|
1282
|
+
code = response['Response']['Error']['Code']
|
1283
|
+
message = response['Response']['Error']['Message']
|
1284
|
+
reqid = response['Response']['RequestId']
|
1285
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1286
|
+
end
|
1287
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1288
|
+
raise e
|
1289
|
+
rescue StandardError => e
|
1290
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1291
|
+
end
|
1292
|
+
|
1293
|
+
# 本接口(DescribeServiceForApiApp)用于应用使用者查询一个服务的详细信息、包括服务的描述、域名、协议等信息。
|
1294
|
+
|
1295
|
+
# @param request: Request instance for DescribeServiceForApiApp.
|
1296
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceForApiAppRequest`
|
1297
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceForApiAppResponse`
|
1298
|
+
def DescribeServiceForApiApp(request)
|
1299
|
+
body = send_request('DescribeServiceForApiApp', request.serialize)
|
1300
|
+
response = JSON.parse(body)
|
1301
|
+
if response['Response'].key?('Error') == false
|
1302
|
+
model = DescribeServiceForApiAppResponse.new
|
1303
|
+
model.deserialize(response['Response'])
|
1304
|
+
model
|
1305
|
+
else
|
1306
|
+
code = response['Response']['Error']['Code']
|
1307
|
+
message = response['Response']['Error']['Message']
|
1308
|
+
reqid = response['Response']['RequestId']
|
1309
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1310
|
+
end
|
1311
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1312
|
+
raise e
|
1313
|
+
rescue StandardError => e
|
1314
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1315
|
+
end
|
1316
|
+
|
1317
|
+
# 本接口(DescribeServiceReleaseVersion)查询一个服务下面所有已经发布的版本列表。
|
1318
|
+
# 用户在发布服务时,常有多个版本发布,可使用本接口查询已发布的版本。
|
1319
|
+
|
1320
|
+
# @param request: Request instance for DescribeServiceReleaseVersion.
|
1321
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceReleaseVersionRequest`
|
1322
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceReleaseVersionResponse`
|
1323
|
+
def DescribeServiceReleaseVersion(request)
|
1324
|
+
body = send_request('DescribeServiceReleaseVersion', request.serialize)
|
1325
|
+
response = JSON.parse(body)
|
1326
|
+
if response['Response'].key?('Error') == false
|
1327
|
+
model = DescribeServiceReleaseVersionResponse.new
|
1328
|
+
model.deserialize(response['Response'])
|
1329
|
+
model
|
1330
|
+
else
|
1331
|
+
code = response['Response']['Error']['Code']
|
1332
|
+
message = response['Response']['Error']['Message']
|
1333
|
+
reqid = response['Response']['RequestId']
|
1334
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1335
|
+
end
|
1336
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1337
|
+
raise e
|
1338
|
+
rescue StandardError => e
|
1339
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1340
|
+
end
|
1341
|
+
|
1342
|
+
# 本接口(DescribeServiceSubDomainMappings)用于查询自定义域名的路径映射。
|
1343
|
+
# API 网关可绑定自定义域名到服务,并且可以对自定义域名的路径进行映射,可自定义不同的路径映射到服务中的三个环境,本接口用于查询绑定服务的自定义域名的路径映射列表。
|
1344
|
+
|
1345
|
+
# @param request: Request instance for DescribeServiceSubDomainMappings.
|
1346
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceSubDomainMappingsRequest`
|
1347
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceSubDomainMappingsResponse`
|
1348
|
+
def DescribeServiceSubDomainMappings(request)
|
1349
|
+
body = send_request('DescribeServiceSubDomainMappings', request.serialize)
|
1350
|
+
response = JSON.parse(body)
|
1351
|
+
if response['Response'].key?('Error') == false
|
1352
|
+
model = DescribeServiceSubDomainMappingsResponse.new
|
1353
|
+
model.deserialize(response['Response'])
|
1354
|
+
model
|
1355
|
+
else
|
1356
|
+
code = response['Response']['Error']['Code']
|
1357
|
+
message = response['Response']['Error']['Message']
|
1358
|
+
reqid = response['Response']['RequestId']
|
1359
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1360
|
+
end
|
1361
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1362
|
+
raise e
|
1363
|
+
rescue StandardError => e
|
1364
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1365
|
+
end
|
1366
|
+
|
1367
|
+
# 本接口(DescribeServiceSubDomains)用于查询自定义域名列表。
|
1368
|
+
# API 网关可绑定自定义域名到服务,用于服务调用。此接口用于查询用户绑定在服务的自定义域名列表。
|
1369
|
+
|
1370
|
+
# @param request: Request instance for DescribeServiceSubDomains.
|
1371
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceSubDomainsRequest`
|
1372
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceSubDomainsResponse`
|
1373
|
+
def DescribeServiceSubDomains(request)
|
1374
|
+
body = send_request('DescribeServiceSubDomains', request.serialize)
|
1375
|
+
response = JSON.parse(body)
|
1376
|
+
if response['Response'].key?('Error') == false
|
1377
|
+
model = DescribeServiceSubDomainsResponse.new
|
1378
|
+
model.deserialize(response['Response'])
|
1379
|
+
model
|
1380
|
+
else
|
1381
|
+
code = response['Response']['Error']['Code']
|
1382
|
+
message = response['Response']['Error']['Message']
|
1383
|
+
reqid = response['Response']['RequestId']
|
1384
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1385
|
+
end
|
1386
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1387
|
+
raise e
|
1388
|
+
rescue StandardError => e
|
1389
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1390
|
+
end
|
1391
|
+
|
1392
|
+
# 本接口(DescribeServiceUsagePlan)用于查询服务使用计划详情。
|
1393
|
+
# 服务若需要鉴权限流生效,则需要绑定使用计划到此服务中,本接口用于查询绑定到一个服务的所有使用计划。
|
1394
|
+
|
1395
|
+
# @param request: Request instance for DescribeServiceUsagePlan.
|
1396
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceUsagePlanRequest`
|
1397
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeServiceUsagePlanResponse`
|
1398
|
+
def DescribeServiceUsagePlan(request)
|
1399
|
+
body = send_request('DescribeServiceUsagePlan', request.serialize)
|
1400
|
+
response = JSON.parse(body)
|
1401
|
+
if response['Response'].key?('Error') == false
|
1402
|
+
model = DescribeServiceUsagePlanResponse.new
|
1403
|
+
model.deserialize(response['Response'])
|
1404
|
+
model
|
1405
|
+
else
|
1406
|
+
code = response['Response']['Error']['Code']
|
1407
|
+
message = response['Response']['Error']['Message']
|
1408
|
+
reqid = response['Response']['RequestId']
|
1409
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1410
|
+
end
|
1411
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1412
|
+
raise e
|
1413
|
+
rescue StandardError => e
|
1414
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1415
|
+
end
|
1416
|
+
|
1417
|
+
# 本接口(DescribeServicesStatus)用于搜索查询某一个服务或多个服务的列表,并返回服务相关的域名、时间等信息。
|
1418
|
+
|
1419
|
+
# @param request: Request instance for DescribeServicesStatus.
|
1420
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeServicesStatusRequest`
|
1421
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeServicesStatusResponse`
|
1422
|
+
def DescribeServicesStatus(request)
|
1423
|
+
body = send_request('DescribeServicesStatus', request.serialize)
|
1424
|
+
response = JSON.parse(body)
|
1425
|
+
if response['Response'].key?('Error') == false
|
1426
|
+
model = DescribeServicesStatusResponse.new
|
1427
|
+
model.deserialize(response['Response'])
|
1428
|
+
model
|
1429
|
+
else
|
1430
|
+
code = response['Response']['Error']['Code']
|
1431
|
+
message = response['Response']['Error']['Message']
|
1432
|
+
reqid = response['Response']['RequestId']
|
1433
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1434
|
+
end
|
1435
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1436
|
+
raise e
|
1437
|
+
rescue StandardError => e
|
1438
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1439
|
+
end
|
1440
|
+
|
1441
|
+
# 本接口(DescribeUsagePlan)用于查询一个使用计划的详细信息,包括名称、QPS、创建时间绑定的环境等。
|
1442
|
+
|
1443
|
+
# @param request: Request instance for DescribeUsagePlan.
|
1444
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeUsagePlanRequest`
|
1445
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeUsagePlanResponse`
|
1446
|
+
def DescribeUsagePlan(request)
|
1447
|
+
body = send_request('DescribeUsagePlan', request.serialize)
|
1448
|
+
response = JSON.parse(body)
|
1449
|
+
if response['Response'].key?('Error') == false
|
1450
|
+
model = DescribeUsagePlanResponse.new
|
1451
|
+
model.deserialize(response['Response'])
|
1452
|
+
model
|
1453
|
+
else
|
1454
|
+
code = response['Response']['Error']['Code']
|
1455
|
+
message = response['Response']['Error']['Message']
|
1456
|
+
reqid = response['Response']['RequestId']
|
1457
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1458
|
+
end
|
1459
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1460
|
+
raise e
|
1461
|
+
rescue StandardError => e
|
1462
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1463
|
+
end
|
1464
|
+
|
1465
|
+
# 本接口(DescribeUsagePlanEnvironments)用于查询使用计划绑定的环境列表。
|
1466
|
+
# 用户在绑定了某个使用计划到环境后,可使用本接口查询这个使用计划绑定的所有服务的环境。
|
1467
|
+
|
1468
|
+
# @param request: Request instance for DescribeUsagePlanEnvironments.
|
1469
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeUsagePlanEnvironmentsRequest`
|
1470
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeUsagePlanEnvironmentsResponse`
|
1471
|
+
def DescribeUsagePlanEnvironments(request)
|
1472
|
+
body = send_request('DescribeUsagePlanEnvironments', request.serialize)
|
1473
|
+
response = JSON.parse(body)
|
1474
|
+
if response['Response'].key?('Error') == false
|
1475
|
+
model = DescribeUsagePlanEnvironmentsResponse.new
|
1476
|
+
model.deserialize(response['Response'])
|
1477
|
+
model
|
1478
|
+
else
|
1479
|
+
code = response['Response']['Error']['Code']
|
1480
|
+
message = response['Response']['Error']['Message']
|
1481
|
+
reqid = response['Response']['RequestId']
|
1482
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1483
|
+
end
|
1484
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1485
|
+
raise e
|
1486
|
+
rescue StandardError => e
|
1487
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1488
|
+
end
|
1489
|
+
|
1490
|
+
# 本接口(DescribeUsagePlanSecretIds)用于查询使用计划绑定的密钥列表。
|
1491
|
+
# 在 API 网关中,一个使用计划可绑定多个密钥对,可使用本接口查询使用计划绑定的密钥列表。
|
1492
|
+
|
1493
|
+
# @param request: Request instance for DescribeUsagePlanSecretIds.
|
1494
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeUsagePlanSecretIdsRequest`
|
1495
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeUsagePlanSecretIdsResponse`
|
1496
|
+
def DescribeUsagePlanSecretIds(request)
|
1497
|
+
body = send_request('DescribeUsagePlanSecretIds', request.serialize)
|
1498
|
+
response = JSON.parse(body)
|
1499
|
+
if response['Response'].key?('Error') == false
|
1500
|
+
model = DescribeUsagePlanSecretIdsResponse.new
|
1501
|
+
model.deserialize(response['Response'])
|
1502
|
+
model
|
1503
|
+
else
|
1504
|
+
code = response['Response']['Error']['Code']
|
1505
|
+
message = response['Response']['Error']['Message']
|
1506
|
+
reqid = response['Response']['RequestId']
|
1507
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1508
|
+
end
|
1509
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1510
|
+
raise e
|
1511
|
+
rescue StandardError => e
|
1512
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1513
|
+
end
|
1514
|
+
|
1515
|
+
# 本接口(DescribeUsagePlanStatus)用于查询使用计划的列表。
|
1516
|
+
|
1517
|
+
# @param request: Request instance for DescribeUsagePlansStatus.
|
1518
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DescribeUsagePlansStatusRequest`
|
1519
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DescribeUsagePlansStatusResponse`
|
1520
|
+
def DescribeUsagePlansStatus(request)
|
1521
|
+
body = send_request('DescribeUsagePlansStatus', request.serialize)
|
1522
|
+
response = JSON.parse(body)
|
1523
|
+
if response['Response'].key?('Error') == false
|
1524
|
+
model = DescribeUsagePlansStatusResponse.new
|
1525
|
+
model.deserialize(response['Response'])
|
1526
|
+
model
|
1527
|
+
else
|
1528
|
+
code = response['Response']['Error']['Code']
|
1529
|
+
message = response['Response']['Error']['Message']
|
1530
|
+
reqid = response['Response']['RequestId']
|
1531
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1532
|
+
end
|
1533
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1534
|
+
raise e
|
1535
|
+
rescue StandardError => e
|
1536
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1537
|
+
end
|
1538
|
+
|
1539
|
+
# 解除插件与API绑定
|
1540
|
+
|
1541
|
+
# @param request: Request instance for DetachPlugin.
|
1542
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DetachPluginRequest`
|
1543
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DetachPluginResponse`
|
1544
|
+
def DetachPlugin(request)
|
1545
|
+
body = send_request('DetachPlugin', request.serialize)
|
1546
|
+
response = JSON.parse(body)
|
1547
|
+
if response['Response'].key?('Error') == false
|
1548
|
+
model = DetachPluginResponse.new
|
1549
|
+
model.deserialize(response['Response'])
|
1550
|
+
model
|
1551
|
+
else
|
1552
|
+
code = response['Response']['Error']['Code']
|
1553
|
+
message = response['Response']['Error']['Message']
|
1554
|
+
reqid = response['Response']['RequestId']
|
1555
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1556
|
+
end
|
1557
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1558
|
+
raise e
|
1559
|
+
rescue StandardError => e
|
1560
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1561
|
+
end
|
1562
|
+
|
1563
|
+
# 本接口(DisableApiKey)用于禁用一对 API 密钥。
|
1564
|
+
|
1565
|
+
# @param request: Request instance for DisableApiKey.
|
1566
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::DisableApiKeyRequest`
|
1567
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::DisableApiKeyResponse`
|
1568
|
+
def DisableApiKey(request)
|
1569
|
+
body = send_request('DisableApiKey', request.serialize)
|
1570
|
+
response = JSON.parse(body)
|
1571
|
+
if response['Response'].key?('Error') == false
|
1572
|
+
model = DisableApiKeyResponse.new
|
1573
|
+
model.deserialize(response['Response'])
|
1574
|
+
model
|
1575
|
+
else
|
1576
|
+
code = response['Response']['Error']['Code']
|
1577
|
+
message = response['Response']['Error']['Message']
|
1578
|
+
reqid = response['Response']['RequestId']
|
1579
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1580
|
+
end
|
1581
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1582
|
+
raise e
|
1583
|
+
rescue StandardError => e
|
1584
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1585
|
+
end
|
1586
|
+
|
1587
|
+
# 本接口(EnableApiKey)用于启动一对被禁用的 API 密钥。
|
1588
|
+
|
1589
|
+
# @param request: Request instance for EnableApiKey.
|
1590
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::EnableApiKeyRequest`
|
1591
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::EnableApiKeyResponse`
|
1592
|
+
def EnableApiKey(request)
|
1593
|
+
body = send_request('EnableApiKey', request.serialize)
|
1594
|
+
response = JSON.parse(body)
|
1595
|
+
if response['Response'].key?('Error') == false
|
1596
|
+
model = EnableApiKeyResponse.new
|
1597
|
+
model.deserialize(response['Response'])
|
1598
|
+
model
|
1599
|
+
else
|
1600
|
+
code = response['Response']['Error']['Code']
|
1601
|
+
message = response['Response']['Error']['Message']
|
1602
|
+
reqid = response['Response']['RequestId']
|
1603
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1604
|
+
end
|
1605
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1606
|
+
raise e
|
1607
|
+
rescue StandardError => e
|
1608
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1609
|
+
end
|
1610
|
+
|
1611
|
+
# 本接口(GenerateApiDocument)用于自动生成 API 文档和 SDK,一个服务的一个环境生成一份文档和 SDK。
|
1612
|
+
|
1613
|
+
# @param request: Request instance for GenerateApiDocument.
|
1614
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::GenerateApiDocumentRequest`
|
1615
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::GenerateApiDocumentResponse`
|
1616
|
+
def GenerateApiDocument(request)
|
1617
|
+
body = send_request('GenerateApiDocument', request.serialize)
|
1618
|
+
response = JSON.parse(body)
|
1619
|
+
if response['Response'].key?('Error') == false
|
1620
|
+
model = GenerateApiDocumentResponse.new
|
1621
|
+
model.deserialize(response['Response'])
|
1622
|
+
model
|
1623
|
+
else
|
1624
|
+
code = response['Response']['Error']['Code']
|
1625
|
+
message = response['Response']['Error']['Message']
|
1626
|
+
reqid = response['Response']['RequestId']
|
1627
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1628
|
+
end
|
1629
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1630
|
+
raise e
|
1631
|
+
rescue StandardError => e
|
1632
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1633
|
+
end
|
1634
|
+
|
1635
|
+
# 修改 API 文档
|
1636
|
+
|
1637
|
+
# @param request: Request instance for ModifyAPIDoc.
|
1638
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ModifyAPIDocRequest`
|
1639
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ModifyAPIDocResponse`
|
1640
|
+
def ModifyAPIDoc(request)
|
1641
|
+
body = send_request('ModifyAPIDoc', request.serialize)
|
1642
|
+
response = JSON.parse(body)
|
1643
|
+
if response['Response'].key?('Error') == false
|
1644
|
+
model = ModifyAPIDocResponse.new
|
1645
|
+
model.deserialize(response['Response'])
|
1646
|
+
model
|
1647
|
+
else
|
1648
|
+
code = response['Response']['Error']['Code']
|
1649
|
+
message = response['Response']['Error']['Message']
|
1650
|
+
reqid = response['Response']['RequestId']
|
1651
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1652
|
+
end
|
1653
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1654
|
+
raise e
|
1655
|
+
rescue StandardError => e
|
1656
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1657
|
+
end
|
1658
|
+
|
1659
|
+
# 本接口(ModifyApi)用于修改 API 接口,可调用此接口对已经配置的 API 接口进行编辑修改。修改后的 API 需要重新发布 API 所在的服务到对应环境方能生效。
|
1660
|
+
|
1661
|
+
# @param request: Request instance for ModifyApi.
|
1662
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ModifyApiRequest`
|
1663
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ModifyApiResponse`
|
1664
|
+
def ModifyApi(request)
|
1665
|
+
body = send_request('ModifyApi', request.serialize)
|
1666
|
+
response = JSON.parse(body)
|
1667
|
+
if response['Response'].key?('Error') == false
|
1668
|
+
model = ModifyApiResponse.new
|
1669
|
+
model.deserialize(response['Response'])
|
1670
|
+
model
|
1671
|
+
else
|
1672
|
+
code = response['Response']['Error']['Code']
|
1673
|
+
message = response['Response']['Error']['Message']
|
1674
|
+
reqid = response['Response']['RequestId']
|
1675
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1676
|
+
end
|
1677
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1678
|
+
raise e
|
1679
|
+
rescue StandardError => e
|
1680
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1681
|
+
end
|
1682
|
+
|
1683
|
+
# 本接口(ModifyApiApp)用于修改已经创建的应用。
|
1684
|
+
|
1685
|
+
# @param request: Request instance for ModifyApiApp.
|
1686
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ModifyApiAppRequest`
|
1687
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ModifyApiAppResponse`
|
1688
|
+
def ModifyApiApp(request)
|
1689
|
+
body = send_request('ModifyApiApp', request.serialize)
|
1690
|
+
response = JSON.parse(body)
|
1691
|
+
if response['Response'].key?('Error') == false
|
1692
|
+
model = ModifyApiAppResponse.new
|
1693
|
+
model.deserialize(response['Response'])
|
1694
|
+
model
|
1695
|
+
else
|
1696
|
+
code = response['Response']['Error']['Code']
|
1697
|
+
message = response['Response']['Error']['Message']
|
1698
|
+
reqid = response['Response']['RequestId']
|
1699
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1700
|
+
end
|
1701
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1702
|
+
raise e
|
1703
|
+
rescue StandardError => e
|
1704
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1705
|
+
end
|
1706
|
+
|
1707
|
+
# 本接口(ModifyApiEnvironmentStrategy)用于修改API限流策略
|
1708
|
+
|
1709
|
+
# @param request: Request instance for ModifyApiEnvironmentStrategy.
|
1710
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ModifyApiEnvironmentStrategyRequest`
|
1711
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ModifyApiEnvironmentStrategyResponse`
|
1712
|
+
def ModifyApiEnvironmentStrategy(request)
|
1713
|
+
body = send_request('ModifyApiEnvironmentStrategy', request.serialize)
|
1714
|
+
response = JSON.parse(body)
|
1715
|
+
if response['Response'].key?('Error') == false
|
1716
|
+
model = ModifyApiEnvironmentStrategyResponse.new
|
1717
|
+
model.deserialize(response['Response'])
|
1718
|
+
model
|
1719
|
+
else
|
1720
|
+
code = response['Response']['Error']['Code']
|
1721
|
+
message = response['Response']['Error']['Message']
|
1722
|
+
reqid = response['Response']['RequestId']
|
1723
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1724
|
+
end
|
1725
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1726
|
+
raise e
|
1727
|
+
rescue StandardError => e
|
1728
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1729
|
+
end
|
1730
|
+
|
1731
|
+
# 提供增量更新API能力,主要是给程序调用(区别于ModifyApi,该接口是需要传入API的全量参数,对console使用较友好)
|
1732
|
+
|
1733
|
+
# @param request: Request instance for ModifyApiIncrement.
|
1734
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ModifyApiIncrementRequest`
|
1735
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ModifyApiIncrementResponse`
|
1736
|
+
def ModifyApiIncrement(request)
|
1737
|
+
body = send_request('ModifyApiIncrement', request.serialize)
|
1738
|
+
response = JSON.parse(body)
|
1739
|
+
if response['Response'].key?('Error') == false
|
1740
|
+
model = ModifyApiIncrementResponse.new
|
1741
|
+
model.deserialize(response['Response'])
|
1742
|
+
model
|
1743
|
+
else
|
1744
|
+
code = response['Response']['Error']['Code']
|
1745
|
+
message = response['Response']['Error']['Message']
|
1746
|
+
reqid = response['Response']['RequestId']
|
1747
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1748
|
+
end
|
1749
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1750
|
+
raise e
|
1751
|
+
rescue StandardError => e
|
1752
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1753
|
+
end
|
1754
|
+
|
1755
|
+
# 本接口(ModifyExclusiveInstance)用于修改独享实例信息。
|
1756
|
+
|
1757
|
+
# @param request: Request instance for ModifyExclusiveInstance.
|
1758
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ModifyExclusiveInstanceRequest`
|
1759
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ModifyExclusiveInstanceResponse`
|
1760
|
+
def ModifyExclusiveInstance(request)
|
1761
|
+
body = send_request('ModifyExclusiveInstance', request.serialize)
|
1762
|
+
response = JSON.parse(body)
|
1763
|
+
if response['Response'].key?('Error') == false
|
1764
|
+
model = ModifyExclusiveInstanceResponse.new
|
1765
|
+
model.deserialize(response['Response'])
|
1766
|
+
model
|
1767
|
+
else
|
1768
|
+
code = response['Response']['Error']['Code']
|
1769
|
+
message = response['Response']['Error']['Message']
|
1770
|
+
reqid = response['Response']['RequestId']
|
1771
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1772
|
+
end
|
1773
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1774
|
+
raise e
|
1775
|
+
rescue StandardError => e
|
1776
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1777
|
+
end
|
1778
|
+
|
1779
|
+
# 本接口(ModifyIPStrategy)用于修改服务IP策略。
|
1780
|
+
|
1781
|
+
# @param request: Request instance for ModifyIPStrategy.
|
1782
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ModifyIPStrategyRequest`
|
1783
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ModifyIPStrategyResponse`
|
1784
|
+
def ModifyIPStrategy(request)
|
1785
|
+
body = send_request('ModifyIPStrategy', request.serialize)
|
1786
|
+
response = JSON.parse(body)
|
1787
|
+
if response['Response'].key?('Error') == false
|
1788
|
+
model = ModifyIPStrategyResponse.new
|
1789
|
+
model.deserialize(response['Response'])
|
1790
|
+
model
|
1791
|
+
else
|
1792
|
+
code = response['Response']['Error']['Code']
|
1793
|
+
message = response['Response']['Error']['Message']
|
1794
|
+
reqid = response['Response']['RequestId']
|
1795
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1796
|
+
end
|
1797
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1798
|
+
raise e
|
1799
|
+
rescue StandardError => e
|
1800
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1801
|
+
end
|
1802
|
+
|
1803
|
+
# 修改API网关插件。
|
1804
|
+
|
1805
|
+
# @param request: Request instance for ModifyPlugin.
|
1806
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ModifyPluginRequest`
|
1807
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ModifyPluginResponse`
|
1808
|
+
def ModifyPlugin(request)
|
1809
|
+
body = send_request('ModifyPlugin', request.serialize)
|
1810
|
+
response = JSON.parse(body)
|
1811
|
+
if response['Response'].key?('Error') == false
|
1812
|
+
model = ModifyPluginResponse.new
|
1813
|
+
model.deserialize(response['Response'])
|
1814
|
+
model
|
1815
|
+
else
|
1816
|
+
code = response['Response']['Error']['Code']
|
1817
|
+
message = response['Response']['Error']['Message']
|
1818
|
+
reqid = response['Response']['RequestId']
|
1819
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1820
|
+
end
|
1821
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1822
|
+
raise e
|
1823
|
+
rescue StandardError => e
|
1824
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1825
|
+
end
|
1826
|
+
|
1827
|
+
# 本接口(ModifyService)用于修改服务的相关信息。当服务创建后,服务的名称、描述和服务类型均可被修改。
|
1828
|
+
|
1829
|
+
# @param request: Request instance for ModifyService.
|
1830
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ModifyServiceRequest`
|
1831
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ModifyServiceResponse`
|
1832
|
+
def ModifyService(request)
|
1833
|
+
body = send_request('ModifyService', request.serialize)
|
1834
|
+
response = JSON.parse(body)
|
1835
|
+
if response['Response'].key?('Error') == false
|
1836
|
+
model = ModifyServiceResponse.new
|
1837
|
+
model.deserialize(response['Response'])
|
1838
|
+
model
|
1839
|
+
else
|
1840
|
+
code = response['Response']['Error']['Code']
|
1841
|
+
message = response['Response']['Error']['Message']
|
1842
|
+
reqid = response['Response']['RequestId']
|
1843
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1844
|
+
end
|
1845
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1846
|
+
raise e
|
1847
|
+
rescue StandardError => e
|
1848
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1849
|
+
end
|
1850
|
+
|
1851
|
+
# 本接口(ModifyServiceEnvironmentStrategy)用于修改服务限流策略
|
1852
|
+
|
1853
|
+
# @param request: Request instance for ModifyServiceEnvironmentStrategy.
|
1854
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ModifyServiceEnvironmentStrategyRequest`
|
1855
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ModifyServiceEnvironmentStrategyResponse`
|
1856
|
+
def ModifyServiceEnvironmentStrategy(request)
|
1857
|
+
body = send_request('ModifyServiceEnvironmentStrategy', request.serialize)
|
1858
|
+
response = JSON.parse(body)
|
1859
|
+
if response['Response'].key?('Error') == false
|
1860
|
+
model = ModifyServiceEnvironmentStrategyResponse.new
|
1861
|
+
model.deserialize(response['Response'])
|
1862
|
+
model
|
1863
|
+
else
|
1864
|
+
code = response['Response']['Error']['Code']
|
1865
|
+
message = response['Response']['Error']['Message']
|
1866
|
+
reqid = response['Response']['RequestId']
|
1867
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1868
|
+
end
|
1869
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1870
|
+
raise e
|
1871
|
+
rescue StandardError => e
|
1872
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1873
|
+
end
|
1874
|
+
|
1875
|
+
# 本接口(ModifySubDomain)用于修改服务的自定义域名设置中的路径映射,可以修改绑定自定义域名之前的路径映射规则。
|
1876
|
+
|
1877
|
+
# @param request: Request instance for ModifySubDomain.
|
1878
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ModifySubDomainRequest`
|
1879
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ModifySubDomainResponse`
|
1880
|
+
def ModifySubDomain(request)
|
1881
|
+
body = send_request('ModifySubDomain', request.serialize)
|
1882
|
+
response = JSON.parse(body)
|
1883
|
+
if response['Response'].key?('Error') == false
|
1884
|
+
model = ModifySubDomainResponse.new
|
1885
|
+
model.deserialize(response['Response'])
|
1886
|
+
model
|
1887
|
+
else
|
1888
|
+
code = response['Response']['Error']['Code']
|
1889
|
+
message = response['Response']['Error']['Message']
|
1890
|
+
reqid = response['Response']['RequestId']
|
1891
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1892
|
+
end
|
1893
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1894
|
+
raise e
|
1895
|
+
rescue StandardError => e
|
1896
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1897
|
+
end
|
1898
|
+
|
1899
|
+
# 本接口(ModifyUsagePlan)用于修改使用计划的名称,描述及 QPS。
|
1900
|
+
|
1901
|
+
# @param request: Request instance for ModifyUsagePlan.
|
1902
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ModifyUsagePlanRequest`
|
1903
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ModifyUsagePlanResponse`
|
1904
|
+
def ModifyUsagePlan(request)
|
1905
|
+
body = send_request('ModifyUsagePlan', request.serialize)
|
1906
|
+
response = JSON.parse(body)
|
1907
|
+
if response['Response'].key?('Error') == false
|
1908
|
+
model = ModifyUsagePlanResponse.new
|
1909
|
+
model.deserialize(response['Response'])
|
1910
|
+
model
|
1911
|
+
else
|
1912
|
+
code = response['Response']['Error']['Code']
|
1913
|
+
message = response['Response']['Error']['Message']
|
1914
|
+
reqid = response['Response']['RequestId']
|
1915
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1916
|
+
end
|
1917
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1918
|
+
raise e
|
1919
|
+
rescue StandardError => e
|
1920
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1921
|
+
end
|
1922
|
+
|
1923
|
+
# 本接口(ReleaseService)用于发布服务。
|
1924
|
+
# API 网关的服务创建后,需要发布到某个环境方生效后,使用者才能进行调用,此接口用于发布服务到环境,如 release 环境。
|
1925
|
+
|
1926
|
+
# @param request: Request instance for ReleaseService.
|
1927
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ReleaseServiceRequest`
|
1928
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ReleaseServiceResponse`
|
1929
|
+
def ReleaseService(request)
|
1930
|
+
body = send_request('ReleaseService', request.serialize)
|
1931
|
+
response = JSON.parse(body)
|
1932
|
+
if response['Response'].key?('Error') == false
|
1933
|
+
model = ReleaseServiceResponse.new
|
1934
|
+
model.deserialize(response['Response'])
|
1935
|
+
model
|
1936
|
+
else
|
1937
|
+
code = response['Response']['Error']['Code']
|
1938
|
+
message = response['Response']['Error']['Message']
|
1939
|
+
reqid = response['Response']['RequestId']
|
1940
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1941
|
+
end
|
1942
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1943
|
+
raise e
|
1944
|
+
rescue StandardError => e
|
1945
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1946
|
+
end
|
1947
|
+
|
1948
|
+
# 重置API文档密码
|
1949
|
+
|
1950
|
+
# @param request: Request instance for ResetAPIDocPassword.
|
1951
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::ResetAPIDocPasswordRequest`
|
1952
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::ResetAPIDocPasswordResponse`
|
1953
|
+
def ResetAPIDocPassword(request)
|
1954
|
+
body = send_request('ResetAPIDocPassword', request.serialize)
|
1955
|
+
response = JSON.parse(body)
|
1956
|
+
if response['Response'].key?('Error') == false
|
1957
|
+
model = ResetAPIDocPasswordResponse.new
|
1958
|
+
model.deserialize(response['Response'])
|
1959
|
+
model
|
1960
|
+
else
|
1961
|
+
code = response['Response']['Error']['Code']
|
1962
|
+
message = response['Response']['Error']['Message']
|
1963
|
+
reqid = response['Response']['RequestId']
|
1964
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1965
|
+
end
|
1966
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1967
|
+
raise e
|
1968
|
+
rescue StandardError => e
|
1969
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1970
|
+
end
|
1971
|
+
|
1972
|
+
# 本接口(UnBindEnvironment)用于将使用计划从特定环境解绑。
|
1973
|
+
|
1974
|
+
# @param request: Request instance for UnBindEnvironment.
|
1975
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::UnBindEnvironmentRequest`
|
1976
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::UnBindEnvironmentResponse`
|
1977
|
+
def UnBindEnvironment(request)
|
1978
|
+
body = send_request('UnBindEnvironment', request.serialize)
|
1979
|
+
response = JSON.parse(body)
|
1980
|
+
if response['Response'].key?('Error') == false
|
1981
|
+
model = UnBindEnvironmentResponse.new
|
1982
|
+
model.deserialize(response['Response'])
|
1983
|
+
model
|
1984
|
+
else
|
1985
|
+
code = response['Response']['Error']['Code']
|
1986
|
+
message = response['Response']['Error']['Message']
|
1987
|
+
reqid = response['Response']['RequestId']
|
1988
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1989
|
+
end
|
1990
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1991
|
+
raise e
|
1992
|
+
rescue StandardError => e
|
1993
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1994
|
+
end
|
1995
|
+
|
1996
|
+
# 本接口(UnBindIPStrategy)用于服务解绑IP策略。
|
1997
|
+
|
1998
|
+
# @param request: Request instance for UnBindIPStrategy.
|
1999
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::UnBindIPStrategyRequest`
|
2000
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::UnBindIPStrategyResponse`
|
2001
|
+
def UnBindIPStrategy(request)
|
2002
|
+
body = send_request('UnBindIPStrategy', request.serialize)
|
2003
|
+
response = JSON.parse(body)
|
2004
|
+
if response['Response'].key?('Error') == false
|
2005
|
+
model = UnBindIPStrategyResponse.new
|
2006
|
+
model.deserialize(response['Response'])
|
2007
|
+
model
|
2008
|
+
else
|
2009
|
+
code = response['Response']['Error']['Code']
|
2010
|
+
message = response['Response']['Error']['Message']
|
2011
|
+
reqid = response['Response']['RequestId']
|
2012
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
2013
|
+
end
|
2014
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
2015
|
+
raise e
|
2016
|
+
rescue StandardError => e
|
2017
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2018
|
+
end
|
2019
|
+
|
2020
|
+
# 本接口(UnBindSecretIds)用于为使用计划解绑密钥。
|
2021
|
+
|
2022
|
+
# @param request: Request instance for UnBindSecretIds.
|
2023
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::UnBindSecretIdsRequest`
|
2024
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::UnBindSecretIdsResponse`
|
2025
|
+
def UnBindSecretIds(request)
|
2026
|
+
body = send_request('UnBindSecretIds', request.serialize)
|
2027
|
+
response = JSON.parse(body)
|
2028
|
+
if response['Response'].key?('Error') == false
|
2029
|
+
model = UnBindSecretIdsResponse.new
|
2030
|
+
model.deserialize(response['Response'])
|
2031
|
+
model
|
2032
|
+
else
|
2033
|
+
code = response['Response']['Error']['Code']
|
2034
|
+
message = response['Response']['Error']['Message']
|
2035
|
+
reqid = response['Response']['RequestId']
|
2036
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
2037
|
+
end
|
2038
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
2039
|
+
raise e
|
2040
|
+
rescue StandardError => e
|
2041
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2042
|
+
end
|
2043
|
+
|
2044
|
+
# 本接口(UnBindSubDomain)用于解绑自定义域名。
|
2045
|
+
# 用户使用 API 网关绑定了自定义域名到服务中后,若想要解绑此自定义域名,可使用此接口。
|
2046
|
+
|
2047
|
+
# @param request: Request instance for UnBindSubDomain.
|
2048
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::UnBindSubDomainRequest`
|
2049
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::UnBindSubDomainResponse`
|
2050
|
+
def UnBindSubDomain(request)
|
2051
|
+
body = send_request('UnBindSubDomain', request.serialize)
|
2052
|
+
response = JSON.parse(body)
|
2053
|
+
if response['Response'].key?('Error') == false
|
2054
|
+
model = UnBindSubDomainResponse.new
|
2055
|
+
model.deserialize(response['Response'])
|
2056
|
+
model
|
2057
|
+
else
|
2058
|
+
code = response['Response']['Error']['Code']
|
2059
|
+
message = response['Response']['Error']['Message']
|
2060
|
+
reqid = response['Response']['RequestId']
|
2061
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
2062
|
+
end
|
2063
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
2064
|
+
raise e
|
2065
|
+
rescue StandardError => e
|
2066
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2067
|
+
end
|
2068
|
+
|
2069
|
+
# 本接口(UnReleaseService)用于下线服务。
|
2070
|
+
# 用户发布服务到某个环境后,此服务中的 API 方可被调用者进行调用,当用户需要将此服务从发布环境中下线时,可调用此 API。下线后的服务不可被调用。
|
2071
|
+
|
2072
|
+
# @param request: Request instance for UnReleaseService.
|
2073
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::UnReleaseServiceRequest`
|
2074
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::UnReleaseServiceResponse`
|
2075
|
+
def UnReleaseService(request)
|
2076
|
+
body = send_request('UnReleaseService', request.serialize)
|
2077
|
+
response = JSON.parse(body)
|
2078
|
+
if response['Response'].key?('Error') == false
|
2079
|
+
model = UnReleaseServiceResponse.new
|
2080
|
+
model.deserialize(response['Response'])
|
2081
|
+
model
|
2082
|
+
else
|
2083
|
+
code = response['Response']['Error']['Code']
|
2084
|
+
message = response['Response']['Error']['Message']
|
2085
|
+
reqid = response['Response']['RequestId']
|
2086
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
2087
|
+
end
|
2088
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
2089
|
+
raise e
|
2090
|
+
rescue StandardError => e
|
2091
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2092
|
+
end
|
2093
|
+
|
2094
|
+
# 本接口(UnbindApiApp)用于解除应用和API绑定。
|
2095
|
+
|
2096
|
+
# @param request: Request instance for UnbindApiApp.
|
2097
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::UnbindApiAppRequest`
|
2098
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::UnbindApiAppResponse`
|
2099
|
+
def UnbindApiApp(request)
|
2100
|
+
body = send_request('UnbindApiApp', request.serialize)
|
2101
|
+
response = JSON.parse(body)
|
2102
|
+
if response['Response'].key?('Error') == false
|
2103
|
+
model = UnbindApiAppResponse.new
|
2104
|
+
model.deserialize(response['Response'])
|
2105
|
+
model
|
2106
|
+
else
|
2107
|
+
code = response['Response']['Error']['Code']
|
2108
|
+
message = response['Response']['Error']['Message']
|
2109
|
+
reqid = response['Response']['RequestId']
|
2110
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
2111
|
+
end
|
2112
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
2113
|
+
raise e
|
2114
|
+
rescue StandardError => e
|
2115
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2116
|
+
end
|
2117
|
+
|
2118
|
+
# 本接口(UpdateApiAppKey)用于更新应用秘钥。
|
2119
|
+
|
2120
|
+
# @param request: Request instance for UpdateApiAppKey.
|
2121
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::UpdateApiAppKeyRequest`
|
2122
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::UpdateApiAppKeyResponse`
|
2123
|
+
def UpdateApiAppKey(request)
|
2124
|
+
body = send_request('UpdateApiAppKey', request.serialize)
|
2125
|
+
response = JSON.parse(body)
|
2126
|
+
if response['Response'].key?('Error') == false
|
2127
|
+
model = UpdateApiAppKeyResponse.new
|
2128
|
+
model.deserialize(response['Response'])
|
2129
|
+
model
|
2130
|
+
else
|
2131
|
+
code = response['Response']['Error']['Code']
|
2132
|
+
message = response['Response']['Error']['Message']
|
2133
|
+
reqid = response['Response']['RequestId']
|
2134
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
2135
|
+
end
|
2136
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
2137
|
+
raise e
|
2138
|
+
rescue StandardError => e
|
2139
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2140
|
+
end
|
2141
|
+
|
2142
|
+
# 本接口(UpdateApiKey)用于更换用户已创建的一对 API 密钥。
|
2143
|
+
|
2144
|
+
# @param request: Request instance for UpdateApiKey.
|
2145
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::UpdateApiKeyRequest`
|
2146
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::UpdateApiKeyResponse`
|
2147
|
+
def UpdateApiKey(request)
|
2148
|
+
body = send_request('UpdateApiKey', request.serialize)
|
2149
|
+
response = JSON.parse(body)
|
2150
|
+
if response['Response'].key?('Error') == false
|
2151
|
+
model = UpdateApiKeyResponse.new
|
2152
|
+
model.deserialize(response['Response'])
|
2153
|
+
model
|
2154
|
+
else
|
2155
|
+
code = response['Response']['Error']['Code']
|
2156
|
+
message = response['Response']['Error']['Message']
|
2157
|
+
reqid = response['Response']['RequestId']
|
2158
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
2159
|
+
end
|
2160
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
2161
|
+
raise e
|
2162
|
+
rescue StandardError => e
|
2163
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2164
|
+
end
|
2165
|
+
|
2166
|
+
# 本接口(UpdateService)用于从服务发布的环境中运行版本切换到特定版本。用户在使用 API 网关创建服务并发布服务到某个环境后,多因为开发过程会产生多个版本,此时可调用本接口。
|
2167
|
+
|
2168
|
+
# @param request: Request instance for UpdateService.
|
2169
|
+
# @type request: :class:`Tencentcloud::apigateway::V20180808::UpdateServiceRequest`
|
2170
|
+
# @rtype: :class:`Tencentcloud::apigateway::V20180808::UpdateServiceResponse`
|
2171
|
+
def UpdateService(request)
|
2172
|
+
body = send_request('UpdateService', request.serialize)
|
2173
|
+
response = JSON.parse(body)
|
2174
|
+
if response['Response'].key?('Error') == false
|
2175
|
+
model = UpdateServiceResponse.new
|
2176
|
+
model.deserialize(response['Response'])
|
2177
|
+
model
|
2178
|
+
else
|
2179
|
+
code = response['Response']['Error']['Code']
|
2180
|
+
message = response['Response']['Error']['Message']
|
2181
|
+
reqid = response['Response']['RequestId']
|
2182
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
2183
|
+
end
|
2184
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
2185
|
+
raise e
|
2186
|
+
rescue StandardError => e
|
2187
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
2188
|
+
end
|
2189
|
+
|
2190
|
+
|
2191
|
+
end
|
2192
|
+
end
|
2193
|
+
end
|
2194
|
+
end
|