tencentcloud-sdk-gwlb 3.0.925
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-gwlb.rb +11 -0
- data/lib/v20240906/client.rb +476 -0
- data/lib/v20240906/models.rb +1390 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a53312f09af8e8fb4169282da66f81dfb0cfe250
|
4
|
+
data.tar.gz: 3c1b3cc5f862f287f3d257d202c909cc7a316d98
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fcd7a4f493c410ae53add3523366cb3ff210f527fb27b72aa85ecdb82d502f0c609e0b208b4cb7759c0c2d69361ab2a18a4190a42c4b5b0b2ebd31c144e04ed1
|
7
|
+
data.tar.gz: 716de574f826b0a09021ad66d7df3f44c9f03d3ed987f903556674b1acad5e6b9c050d3ac128283d4a20b0095dccbc0dd5a3e7a8f261324d0c1de04fa3572315
|
data/lib/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.0.925
|
@@ -0,0 +1,476 @@
|
|
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 Gwlb
|
21
|
+
module V20240906
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
23
|
+
|
24
|
+
def initialize(credential, region, profile = nil)
|
25
|
+
api_version = '2024-09-06'
|
26
|
+
api_endpoint = 'gwlb.tencentcloudapi.com'
|
27
|
+
sdk_version = 'GWLB_' + File.read(File.expand_path('../VERSION', __dir__)).strip
|
28
|
+
super(credential, region, api_version, api_endpoint, sdk_version, profile)
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# 本接口(AssociateTargetGroups)用来将目标组绑定到负载均衡。
|
33
|
+
# 本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
|
34
|
+
|
35
|
+
# @param request: Request instance for AssociateTargetGroups.
|
36
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::AssociateTargetGroupsRequest`
|
37
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::AssociateTargetGroupsResponse`
|
38
|
+
def AssociateTargetGroups(request)
|
39
|
+
body = send_request('AssociateTargetGroups', request.serialize)
|
40
|
+
response = JSON.parse(body)
|
41
|
+
if response['Response'].key?('Error') == false
|
42
|
+
model = AssociateTargetGroupsResponse.new
|
43
|
+
model.deserialize(response['Response'])
|
44
|
+
model
|
45
|
+
else
|
46
|
+
code = response['Response']['Error']['Code']
|
47
|
+
message = response['Response']['Error']['Message']
|
48
|
+
reqid = response['Response']['RequestId']
|
49
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
50
|
+
end
|
51
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
52
|
+
raise e
|
53
|
+
rescue StandardError => e
|
54
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
55
|
+
end
|
56
|
+
|
57
|
+
# 本接口(CreateGatewayLoadBalancer)用来创建网关负载均衡实例。为了使用网关负载均衡服务,您必须购买一个或多个网关负载均衡实例。成功调用该接口后,会返回网关负载均衡实例的唯一 ID。
|
58
|
+
# 注意:单个账号在每个地域的默认购买配额为:10个。
|
59
|
+
# 本接口为异步接口,接口成功返回后,可使用 DescribeGatewayLoadBalancers 接口查询负载均衡实例的状态(如创建中、正常),以确定是否创建成功。
|
60
|
+
|
61
|
+
# @param request: Request instance for CreateGatewayLoadBalancer.
|
62
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::CreateGatewayLoadBalancerRequest`
|
63
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::CreateGatewayLoadBalancerResponse`
|
64
|
+
def CreateGatewayLoadBalancer(request)
|
65
|
+
body = send_request('CreateGatewayLoadBalancer', request.serialize)
|
66
|
+
response = JSON.parse(body)
|
67
|
+
if response['Response'].key?('Error') == false
|
68
|
+
model = CreateGatewayLoadBalancerResponse.new
|
69
|
+
model.deserialize(response['Response'])
|
70
|
+
model
|
71
|
+
else
|
72
|
+
code = response['Response']['Error']['Code']
|
73
|
+
message = response['Response']['Error']['Message']
|
74
|
+
reqid = response['Response']['RequestId']
|
75
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
76
|
+
end
|
77
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
78
|
+
raise e
|
79
|
+
rescue StandardError => e
|
80
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
81
|
+
end
|
82
|
+
|
83
|
+
# 创建目标组。该功能正在内测中,如需使用,请通过[工单申请](https://console.cloud.tencent.com/workorder/category?level1_id=6&level2_id=163&source=0&data_title=%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1%20LB&step=1)。
|
84
|
+
|
85
|
+
# @param request: Request instance for CreateTargetGroup.
|
86
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::CreateTargetGroupRequest`
|
87
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::CreateTargetGroupResponse`
|
88
|
+
def CreateTargetGroup(request)
|
89
|
+
body = send_request('CreateTargetGroup', request.serialize)
|
90
|
+
response = JSON.parse(body)
|
91
|
+
if response['Response'].key?('Error') == false
|
92
|
+
model = CreateTargetGroupResponse.new
|
93
|
+
model.deserialize(response['Response'])
|
94
|
+
model
|
95
|
+
else
|
96
|
+
code = response['Response']['Error']['Code']
|
97
|
+
message = response['Response']['Error']['Message']
|
98
|
+
reqid = response['Response']['RequestId']
|
99
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
100
|
+
end
|
101
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
102
|
+
raise e
|
103
|
+
rescue StandardError => e
|
104
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
105
|
+
end
|
106
|
+
|
107
|
+
# DeleteGatewayLoadBalancer 接口用以删除指定的一个或多个网关负载均衡实例。成功删除后,会把网关负载均衡实例与后端服务解绑。
|
108
|
+
# 本接口为异步接口,接口返回成功后,需以返回的 RequestId 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
|
109
|
+
|
110
|
+
# @param request: Request instance for DeleteGatewayLoadBalancer.
|
111
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::DeleteGatewayLoadBalancerRequest`
|
112
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::DeleteGatewayLoadBalancerResponse`
|
113
|
+
def DeleteGatewayLoadBalancer(request)
|
114
|
+
body = send_request('DeleteGatewayLoadBalancer', request.serialize)
|
115
|
+
response = JSON.parse(body)
|
116
|
+
if response['Response'].key?('Error') == false
|
117
|
+
model = DeleteGatewayLoadBalancerResponse.new
|
118
|
+
model.deserialize(response['Response'])
|
119
|
+
model
|
120
|
+
else
|
121
|
+
code = response['Response']['Error']['Code']
|
122
|
+
message = response['Response']['Error']['Message']
|
123
|
+
reqid = response['Response']['RequestId']
|
124
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
125
|
+
end
|
126
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
127
|
+
raise e
|
128
|
+
rescue StandardError => e
|
129
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
130
|
+
end
|
131
|
+
|
132
|
+
# 删除目标组
|
133
|
+
|
134
|
+
# @param request: Request instance for DeleteTargetGroups.
|
135
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::DeleteTargetGroupsRequest`
|
136
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::DeleteTargetGroupsResponse`
|
137
|
+
def DeleteTargetGroups(request)
|
138
|
+
body = send_request('DeleteTargetGroups', request.serialize)
|
139
|
+
response = JSON.parse(body)
|
140
|
+
if response['Response'].key?('Error') == false
|
141
|
+
model = DeleteTargetGroupsResponse.new
|
142
|
+
model.deserialize(response['Response'])
|
143
|
+
model
|
144
|
+
else
|
145
|
+
code = response['Response']['Error']['Code']
|
146
|
+
message = response['Response']['Error']['Message']
|
147
|
+
reqid = response['Response']['RequestId']
|
148
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
149
|
+
end
|
150
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
151
|
+
raise e
|
152
|
+
rescue StandardError => e
|
153
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
154
|
+
end
|
155
|
+
|
156
|
+
# 从目标组中解绑服务器。
|
157
|
+
# 本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
|
158
|
+
|
159
|
+
# @param request: Request instance for DeregisterTargetGroupInstances.
|
160
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::DeregisterTargetGroupInstancesRequest`
|
161
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::DeregisterTargetGroupInstancesResponse`
|
162
|
+
def DeregisterTargetGroupInstances(request)
|
163
|
+
body = send_request('DeregisterTargetGroupInstances', request.serialize)
|
164
|
+
response = JSON.parse(body)
|
165
|
+
if response['Response'].key?('Error') == false
|
166
|
+
model = DeregisterTargetGroupInstancesResponse.new
|
167
|
+
model.deserialize(response['Response'])
|
168
|
+
model
|
169
|
+
else
|
170
|
+
code = response['Response']['Error']['Code']
|
171
|
+
message = response['Response']['Error']['Message']
|
172
|
+
reqid = response['Response']['RequestId']
|
173
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
174
|
+
end
|
175
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
176
|
+
raise e
|
177
|
+
rescue StandardError => e
|
178
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
179
|
+
end
|
180
|
+
|
181
|
+
# 查询一个地域的网关负载均衡实例列表。
|
182
|
+
|
183
|
+
# @param request: Request instance for DescribeGatewayLoadBalancers.
|
184
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::DescribeGatewayLoadBalancersRequest`
|
185
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::DescribeGatewayLoadBalancersResponse`
|
186
|
+
def DescribeGatewayLoadBalancers(request)
|
187
|
+
body = send_request('DescribeGatewayLoadBalancers', request.serialize)
|
188
|
+
response = JSON.parse(body)
|
189
|
+
if response['Response'].key?('Error') == false
|
190
|
+
model = DescribeGatewayLoadBalancersResponse.new
|
191
|
+
model.deserialize(response['Response'])
|
192
|
+
model
|
193
|
+
else
|
194
|
+
code = response['Response']['Error']['Code']
|
195
|
+
message = response['Response']['Error']['Message']
|
196
|
+
reqid = response['Response']['RequestId']
|
197
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
198
|
+
end
|
199
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
200
|
+
raise e
|
201
|
+
rescue StandardError => e
|
202
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
203
|
+
end
|
204
|
+
|
205
|
+
# 查询目标组后端服务状态。目前仅支持网关负载均衡类型的目标组支持查询后端服务状态。
|
206
|
+
|
207
|
+
# @param request: Request instance for DescribeTargetGroupInstanceStatus.
|
208
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::DescribeTargetGroupInstanceStatusRequest`
|
209
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::DescribeTargetGroupInstanceStatusResponse`
|
210
|
+
def DescribeTargetGroupInstanceStatus(request)
|
211
|
+
body = send_request('DescribeTargetGroupInstanceStatus', request.serialize)
|
212
|
+
response = JSON.parse(body)
|
213
|
+
if response['Response'].key?('Error') == false
|
214
|
+
model = DescribeTargetGroupInstanceStatusResponse.new
|
215
|
+
model.deserialize(response['Response'])
|
216
|
+
model
|
217
|
+
else
|
218
|
+
code = response['Response']['Error']['Code']
|
219
|
+
message = response['Response']['Error']['Message']
|
220
|
+
reqid = response['Response']['RequestId']
|
221
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
222
|
+
end
|
223
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
224
|
+
raise e
|
225
|
+
rescue StandardError => e
|
226
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
227
|
+
end
|
228
|
+
|
229
|
+
# 获取目标组绑定的服务器信息。
|
230
|
+
|
231
|
+
# @param request: Request instance for DescribeTargetGroupInstances.
|
232
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::DescribeTargetGroupInstancesRequest`
|
233
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::DescribeTargetGroupInstancesResponse`
|
234
|
+
def DescribeTargetGroupInstances(request)
|
235
|
+
body = send_request('DescribeTargetGroupInstances', request.serialize)
|
236
|
+
response = JSON.parse(body)
|
237
|
+
if response['Response'].key?('Error') == false
|
238
|
+
model = DescribeTargetGroupInstancesResponse.new
|
239
|
+
model.deserialize(response['Response'])
|
240
|
+
model
|
241
|
+
else
|
242
|
+
code = response['Response']['Error']['Code']
|
243
|
+
message = response['Response']['Error']['Message']
|
244
|
+
reqid = response['Response']['RequestId']
|
245
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
246
|
+
end
|
247
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
248
|
+
raise e
|
249
|
+
rescue StandardError => e
|
250
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
251
|
+
end
|
252
|
+
|
253
|
+
# 获取目标组列表
|
254
|
+
|
255
|
+
# @param request: Request instance for DescribeTargetGroupList.
|
256
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::DescribeTargetGroupListRequest`
|
257
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::DescribeTargetGroupListResponse`
|
258
|
+
def DescribeTargetGroupList(request)
|
259
|
+
body = send_request('DescribeTargetGroupList', request.serialize)
|
260
|
+
response = JSON.parse(body)
|
261
|
+
if response['Response'].key?('Error') == false
|
262
|
+
model = DescribeTargetGroupListResponse.new
|
263
|
+
model.deserialize(response['Response'])
|
264
|
+
model
|
265
|
+
else
|
266
|
+
code = response['Response']['Error']['Code']
|
267
|
+
message = response['Response']['Error']['Message']
|
268
|
+
reqid = response['Response']['RequestId']
|
269
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
270
|
+
end
|
271
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
272
|
+
raise e
|
273
|
+
rescue StandardError => e
|
274
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
275
|
+
end
|
276
|
+
|
277
|
+
# 查询目标组信息
|
278
|
+
|
279
|
+
# @param request: Request instance for DescribeTargetGroups.
|
280
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::DescribeTargetGroupsRequest`
|
281
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::DescribeTargetGroupsResponse`
|
282
|
+
def DescribeTargetGroups(request)
|
283
|
+
body = send_request('DescribeTargetGroups', request.serialize)
|
284
|
+
response = JSON.parse(body)
|
285
|
+
if response['Response'].key?('Error') == false
|
286
|
+
model = DescribeTargetGroupsResponse.new
|
287
|
+
model.deserialize(response['Response'])
|
288
|
+
model
|
289
|
+
else
|
290
|
+
code = response['Response']['Error']['Code']
|
291
|
+
message = response['Response']['Error']['Message']
|
292
|
+
reqid = response['Response']['RequestId']
|
293
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
294
|
+
end
|
295
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
296
|
+
raise e
|
297
|
+
rescue StandardError => e
|
298
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
299
|
+
end
|
300
|
+
|
301
|
+
# 本接口用于查询异步任务的执行状态,对于非查询类的接口(创建/删除负载均衡实例等),在接口调用成功后,都需要使用本接口查询任务最终是否执行成功。
|
302
|
+
|
303
|
+
# @param request: Request instance for DescribeTaskStatus.
|
304
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::DescribeTaskStatusRequest`
|
305
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::DescribeTaskStatusResponse`
|
306
|
+
def DescribeTaskStatus(request)
|
307
|
+
body = send_request('DescribeTaskStatus', request.serialize)
|
308
|
+
response = JSON.parse(body)
|
309
|
+
if response['Response'].key?('Error') == false
|
310
|
+
model = DescribeTaskStatusResponse.new
|
311
|
+
model.deserialize(response['Response'])
|
312
|
+
model
|
313
|
+
else
|
314
|
+
code = response['Response']['Error']['Code']
|
315
|
+
message = response['Response']['Error']['Message']
|
316
|
+
reqid = response['Response']['RequestId']
|
317
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
318
|
+
end
|
319
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
320
|
+
raise e
|
321
|
+
rescue StandardError => e
|
322
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
323
|
+
end
|
324
|
+
|
325
|
+
# 解除负载均衡和目标组的关联关系。
|
326
|
+
# 本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
|
327
|
+
|
328
|
+
# @param request: Request instance for DisassociateTargetGroups.
|
329
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::DisassociateTargetGroupsRequest`
|
330
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::DisassociateTargetGroupsResponse`
|
331
|
+
def DisassociateTargetGroups(request)
|
332
|
+
body = send_request('DisassociateTargetGroups', request.serialize)
|
333
|
+
response = JSON.parse(body)
|
334
|
+
if response['Response'].key?('Error') == false
|
335
|
+
model = DisassociateTargetGroupsResponse.new
|
336
|
+
model.deserialize(response['Response'])
|
337
|
+
model
|
338
|
+
else
|
339
|
+
code = response['Response']['Error']['Code']
|
340
|
+
message = response['Response']['Error']['Message']
|
341
|
+
reqid = response['Response']['RequestId']
|
342
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
343
|
+
end
|
344
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
345
|
+
raise e
|
346
|
+
rescue StandardError => e
|
347
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
348
|
+
end
|
349
|
+
|
350
|
+
# InquirePriceCreateGatewayLoadBalancer接口查询创建网关负载均衡的价格。
|
351
|
+
|
352
|
+
# @param request: Request instance for InquirePriceCreateGatewayLoadBalancer.
|
353
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::InquirePriceCreateGatewayLoadBalancerRequest`
|
354
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::InquirePriceCreateGatewayLoadBalancerResponse`
|
355
|
+
def InquirePriceCreateGatewayLoadBalancer(request)
|
356
|
+
body = send_request('InquirePriceCreateGatewayLoadBalancer', request.serialize)
|
357
|
+
response = JSON.parse(body)
|
358
|
+
if response['Response'].key?('Error') == false
|
359
|
+
model = InquirePriceCreateGatewayLoadBalancerResponse.new
|
360
|
+
model.deserialize(response['Response'])
|
361
|
+
model
|
362
|
+
else
|
363
|
+
code = response['Response']['Error']['Code']
|
364
|
+
message = response['Response']['Error']['Message']
|
365
|
+
reqid = response['Response']['RequestId']
|
366
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
367
|
+
end
|
368
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
369
|
+
raise e
|
370
|
+
rescue StandardError => e
|
371
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
372
|
+
end
|
373
|
+
|
374
|
+
# ModifyGatewayLoadBalancerAttribute 接口用于修改负载均衡实例的属性。支持修改负载均衡实例的名称、带宽上限。
|
375
|
+
|
376
|
+
# @param request: Request instance for ModifyGatewayLoadBalancerAttribute.
|
377
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::ModifyGatewayLoadBalancerAttributeRequest`
|
378
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::ModifyGatewayLoadBalancerAttributeResponse`
|
379
|
+
def ModifyGatewayLoadBalancerAttribute(request)
|
380
|
+
body = send_request('ModifyGatewayLoadBalancerAttribute', request.serialize)
|
381
|
+
response = JSON.parse(body)
|
382
|
+
if response['Response'].key?('Error') == false
|
383
|
+
model = ModifyGatewayLoadBalancerAttributeResponse.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
|
+
# 修改目标组的名称、健康探测等属性。
|
399
|
+
|
400
|
+
# @param request: Request instance for ModifyTargetGroupAttribute.
|
401
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::ModifyTargetGroupAttributeRequest`
|
402
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::ModifyTargetGroupAttributeResponse`
|
403
|
+
def ModifyTargetGroupAttribute(request)
|
404
|
+
body = send_request('ModifyTargetGroupAttribute', request.serialize)
|
405
|
+
response = JSON.parse(body)
|
406
|
+
if response['Response'].key?('Error') == false
|
407
|
+
model = ModifyTargetGroupAttributeResponse.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
|
+
# 修改目标组的服务器权重。
|
423
|
+
# 本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
|
424
|
+
|
425
|
+
# @param request: Request instance for ModifyTargetGroupInstancesWeight.
|
426
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::ModifyTargetGroupInstancesWeightRequest`
|
427
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::ModifyTargetGroupInstancesWeightResponse`
|
428
|
+
def ModifyTargetGroupInstancesWeight(request)
|
429
|
+
body = send_request('ModifyTargetGroupInstancesWeight', request.serialize)
|
430
|
+
response = JSON.parse(body)
|
431
|
+
if response['Response'].key?('Error') == false
|
432
|
+
model = ModifyTargetGroupInstancesWeightResponse.new
|
433
|
+
model.deserialize(response['Response'])
|
434
|
+
model
|
435
|
+
else
|
436
|
+
code = response['Response']['Error']['Code']
|
437
|
+
message = response['Response']['Error']['Message']
|
438
|
+
reqid = response['Response']['RequestId']
|
439
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
440
|
+
end
|
441
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
442
|
+
raise e
|
443
|
+
rescue StandardError => e
|
444
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
445
|
+
end
|
446
|
+
|
447
|
+
# 注册服务器到目标组。
|
448
|
+
# 本接口为异步接口,本接口返回成功后需以返回的 RequestID 为入参,调用 DescribeTaskStatus 接口查询本次任务是否成功。
|
449
|
+
|
450
|
+
# @param request: Request instance for RegisterTargetGroupInstances.
|
451
|
+
# @type request: :class:`Tencentcloud::gwlb::V20240906::RegisterTargetGroupInstancesRequest`
|
452
|
+
# @rtype: :class:`Tencentcloud::gwlb::V20240906::RegisterTargetGroupInstancesResponse`
|
453
|
+
def RegisterTargetGroupInstances(request)
|
454
|
+
body = send_request('RegisterTargetGroupInstances', request.serialize)
|
455
|
+
response = JSON.parse(body)
|
456
|
+
if response['Response'].key?('Error') == false
|
457
|
+
model = RegisterTargetGroupInstancesResponse.new
|
458
|
+
model.deserialize(response['Response'])
|
459
|
+
model
|
460
|
+
else
|
461
|
+
code = response['Response']['Error']['Code']
|
462
|
+
message = response['Response']['Error']['Message']
|
463
|
+
reqid = response['Response']['RequestId']
|
464
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
465
|
+
end
|
466
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
467
|
+
raise e
|
468
|
+
rescue StandardError => e
|
469
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
470
|
+
end
|
471
|
+
|
472
|
+
|
473
|
+
end
|
474
|
+
end
|
475
|
+
end
|
476
|
+
end
|