tencentcloud-sdk-bmvpc 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-bmvpc.rb +11 -0
- data/lib/v20180625/client.rb +1511 -0
- data/lib/v20180625/models.rb +4121 -0
- metadata +66 -0
@@ -0,0 +1,1511 @@
|
|
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 Bmvpc
|
21
|
+
module V20180625
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
23
|
+
|
24
|
+
def initialize(credential, region, profile = nil)
|
25
|
+
api_version = '2018-06-25'
|
26
|
+
api_endpoint = 'bmvpc.tencentcloudapi.com'
|
27
|
+
sdk_version = 'BMVPC_' + File.read(File.expand_path('../VERSION', __dir__)).strip
|
28
|
+
super(credential, region, api_version, api_endpoint, sdk_version, profile)
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# 接受黑石对等连接
|
33
|
+
|
34
|
+
# @param request: Request instance for AcceptVpcPeerConnection.
|
35
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::AcceptVpcPeerConnectionRequest`
|
36
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::AcceptVpcPeerConnectionResponse`
|
37
|
+
def AcceptVpcPeerConnection(request)
|
38
|
+
body = send_request('AcceptVpcPeerConnection', request.serialize)
|
39
|
+
response = JSON.parse(body)
|
40
|
+
if response['Response'].key?('Error') == false
|
41
|
+
model = AcceptVpcPeerConnectionResponse.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
|
+
# 批量注册虚拟IP,异步接口。通过接口来查询任务进度。每次请求最多注册256个IP
|
57
|
+
|
58
|
+
# @param request: Request instance for AsyncRegisterIps.
|
59
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::AsyncRegisterIpsRequest`
|
60
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::AsyncRegisterIpsResponse`
|
61
|
+
def AsyncRegisterIps(request)
|
62
|
+
body = send_request('AsyncRegisterIps', request.serialize)
|
63
|
+
response = JSON.parse(body)
|
64
|
+
if response['Response'].key?('Error') == false
|
65
|
+
model = AsyncRegisterIpsResponse.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
|
+
# NAT网关绑定EIP接口,可将EIP绑定到NAT网关,该EIP作为访问外网的源IP地址,将流量发送到Internet
|
81
|
+
|
82
|
+
# @param request: Request instance for BindEipsToNatGateway.
|
83
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::BindEipsToNatGatewayRequest`
|
84
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::BindEipsToNatGatewayResponse`
|
85
|
+
def BindEipsToNatGateway(request)
|
86
|
+
body = send_request('BindEipsToNatGateway', request.serialize)
|
87
|
+
response = JSON.parse(body)
|
88
|
+
if response['Response'].key?('Error') == false
|
89
|
+
model = BindEipsToNatGatewayResponse.new
|
90
|
+
model.deserialize(response['Response'])
|
91
|
+
model
|
92
|
+
else
|
93
|
+
code = response['Response']['Error']['Code']
|
94
|
+
message = response['Response']['Error']['Message']
|
95
|
+
reqid = response['Response']['RequestId']
|
96
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
97
|
+
end
|
98
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
99
|
+
raise e
|
100
|
+
rescue StandardError => e
|
101
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
102
|
+
end
|
103
|
+
|
104
|
+
# 可用于将子网的部分IP绑定到NAT网关
|
105
|
+
|
106
|
+
# @param request: Request instance for BindIpsToNatGateway.
|
107
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::BindIpsToNatGatewayRequest`
|
108
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::BindIpsToNatGatewayResponse`
|
109
|
+
def BindIpsToNatGateway(request)
|
110
|
+
body = send_request('BindIpsToNatGateway', request.serialize)
|
111
|
+
response = JSON.parse(body)
|
112
|
+
if response['Response'].key?('Error') == false
|
113
|
+
model = BindIpsToNatGatewayResponse.new
|
114
|
+
model.deserialize(response['Response'])
|
115
|
+
model
|
116
|
+
else
|
117
|
+
code = response['Response']['Error']['Code']
|
118
|
+
message = response['Response']['Error']['Message']
|
119
|
+
reqid = response['Response']['RequestId']
|
120
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
121
|
+
end
|
122
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
123
|
+
raise e
|
124
|
+
rescue StandardError => e
|
125
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
126
|
+
end
|
127
|
+
|
128
|
+
# NAT网关绑定子网后,该子网内全部IP可出公网
|
129
|
+
|
130
|
+
# @param request: Request instance for BindSubnetsToNatGateway.
|
131
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::BindSubnetsToNatGatewayRequest`
|
132
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::BindSubnetsToNatGatewayResponse`
|
133
|
+
def BindSubnetsToNatGateway(request)
|
134
|
+
body = send_request('BindSubnetsToNatGateway', request.serialize)
|
135
|
+
response = JSON.parse(body)
|
136
|
+
if response['Response'].key?('Error') == false
|
137
|
+
model = BindSubnetsToNatGatewayResponse.new
|
138
|
+
model.deserialize(response['Response'])
|
139
|
+
model
|
140
|
+
else
|
141
|
+
code = response['Response']['Error']['Code']
|
142
|
+
message = response['Response']['Error']['Message']
|
143
|
+
reqid = response['Response']['RequestId']
|
144
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
145
|
+
end
|
146
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
147
|
+
raise e
|
148
|
+
rescue StandardError => e
|
149
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
150
|
+
end
|
151
|
+
|
152
|
+
# 本接口(CreateCustomerGateway)用于创建对端网关。
|
153
|
+
|
154
|
+
# @param request: Request instance for CreateCustomerGateway.
|
155
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::CreateCustomerGatewayRequest`
|
156
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::CreateCustomerGatewayResponse`
|
157
|
+
def CreateCustomerGateway(request)
|
158
|
+
body = send_request('CreateCustomerGateway', request.serialize)
|
159
|
+
response = JSON.parse(body)
|
160
|
+
if response['Response'].key?('Error') == false
|
161
|
+
model = CreateCustomerGatewayResponse.new
|
162
|
+
model.deserialize(response['Response'])
|
163
|
+
model
|
164
|
+
else
|
165
|
+
code = response['Response']['Error']['Code']
|
166
|
+
message = response['Response']['Error']['Message']
|
167
|
+
reqid = response['Response']['RequestId']
|
168
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
169
|
+
end
|
170
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
171
|
+
raise e
|
172
|
+
rescue StandardError => e
|
173
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
174
|
+
end
|
175
|
+
|
176
|
+
# 创建黑石Docker子网, 如果不指定VlanId,将会分配2000--2999范围的VlanId; 子网会关闭分布式网关
|
177
|
+
|
178
|
+
# @param request: Request instance for CreateDockerSubnetWithVlan.
|
179
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::CreateDockerSubnetWithVlanRequest`
|
180
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::CreateDockerSubnetWithVlanResponse`
|
181
|
+
def CreateDockerSubnetWithVlan(request)
|
182
|
+
body = send_request('CreateDockerSubnetWithVlan', request.serialize)
|
183
|
+
response = JSON.parse(body)
|
184
|
+
if response['Response'].key?('Error') == false
|
185
|
+
model = CreateDockerSubnetWithVlanResponse.new
|
186
|
+
model.deserialize(response['Response'])
|
187
|
+
model
|
188
|
+
else
|
189
|
+
code = response['Response']['Error']['Code']
|
190
|
+
message = response['Response']['Error']['Message']
|
191
|
+
reqid = response['Response']['RequestId']
|
192
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
193
|
+
end
|
194
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
195
|
+
raise e
|
196
|
+
rescue StandardError => e
|
197
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
198
|
+
end
|
199
|
+
|
200
|
+
# 本接口(CreateHostedInterface)用于黑石托管机器加入带VLANID不为5的子网。
|
201
|
+
|
202
|
+
# 1) 不能加入vlanId 为5的子网,只能加入VLANID范围为2000-2999的子网。
|
203
|
+
# 2) 每台托管机器最多可以加入20个子网。
|
204
|
+
# 3) 每次调用最多能支持传入10台托管机器。
|
205
|
+
|
206
|
+
# @param request: Request instance for CreateHostedInterface.
|
207
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::CreateHostedInterfaceRequest`
|
208
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::CreateHostedInterfaceResponse`
|
209
|
+
def CreateHostedInterface(request)
|
210
|
+
body = send_request('CreateHostedInterface', request.serialize)
|
211
|
+
response = JSON.parse(body)
|
212
|
+
if response['Response'].key?('Error') == false
|
213
|
+
model = CreateHostedInterfaceResponse.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
|
+
# 物理机加入子网
|
229
|
+
|
230
|
+
# @param request: Request instance for CreateInterfaces.
|
231
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::CreateInterfacesRequest`
|
232
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::CreateInterfacesResponse`
|
233
|
+
def CreateInterfaces(request)
|
234
|
+
body = send_request('CreateInterfaces', request.serialize)
|
235
|
+
response = JSON.parse(body)
|
236
|
+
if response['Response'].key?('Error') == false
|
237
|
+
model = CreateInterfacesResponse.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
|
+
# 创建NAT网关接口,可针对网段方式、子网全部IP、子网部分IP这三种方式创建NAT网关
|
253
|
+
|
254
|
+
# @param request: Request instance for CreateNatGateway.
|
255
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::CreateNatGatewayRequest`
|
256
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::CreateNatGatewayResponse`
|
257
|
+
def CreateNatGateway(request)
|
258
|
+
body = send_request('CreateNatGateway', request.serialize)
|
259
|
+
response = JSON.parse(body)
|
260
|
+
if response['Response'].key?('Error') == false
|
261
|
+
model = CreateNatGatewayResponse.new
|
262
|
+
model.deserialize(response['Response'])
|
263
|
+
model
|
264
|
+
else
|
265
|
+
code = response['Response']['Error']['Code']
|
266
|
+
message = response['Response']['Error']['Message']
|
267
|
+
reqid = response['Response']['RequestId']
|
268
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
269
|
+
end
|
270
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
271
|
+
raise e
|
272
|
+
rescue StandardError => e
|
273
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
274
|
+
end
|
275
|
+
|
276
|
+
# 创建黑石路由表的路由规则
|
277
|
+
|
278
|
+
# @param request: Request instance for CreateRoutePolicies.
|
279
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::CreateRoutePoliciesRequest`
|
280
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::CreateRoutePoliciesResponse`
|
281
|
+
def CreateRoutePolicies(request)
|
282
|
+
body = send_request('CreateRoutePolicies', request.serialize)
|
283
|
+
response = JSON.parse(body)
|
284
|
+
if response['Response'].key?('Error') == false
|
285
|
+
model = CreateRoutePoliciesResponse.new
|
286
|
+
model.deserialize(response['Response'])
|
287
|
+
model
|
288
|
+
else
|
289
|
+
code = response['Response']['Error']['Code']
|
290
|
+
message = response['Response']['Error']['Message']
|
291
|
+
reqid = response['Response']['RequestId']
|
292
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
293
|
+
end
|
294
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
295
|
+
raise e
|
296
|
+
rescue StandardError => e
|
297
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
298
|
+
end
|
299
|
+
|
300
|
+
# 创建黑石私有网络的子网
|
301
|
+
# 访问管理: 用户可以对VpcId进行授权操作。例如设置资源为["qcs::bmvpc:::unVpc/vpc-xxxxx"]
|
302
|
+
|
303
|
+
# @param request: Request instance for CreateSubnet.
|
304
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::CreateSubnetRequest`
|
305
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::CreateSubnetResponse`
|
306
|
+
def CreateSubnet(request)
|
307
|
+
body = send_request('CreateSubnet', request.serialize)
|
308
|
+
response = JSON.parse(body)
|
309
|
+
if response['Response'].key?('Error') == false
|
310
|
+
model = CreateSubnetResponse.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
|
+
# 创建黑石虚拟子网, 虚拟子网用于在黑石上创建虚拟网络,与黑石子网要做好规划。虚拟子网会分配2000-2999的VlanId。
|
326
|
+
|
327
|
+
# @param request: Request instance for CreateVirtualSubnetWithVlan.
|
328
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::CreateVirtualSubnetWithVlanRequest`
|
329
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::CreateVirtualSubnetWithVlanResponse`
|
330
|
+
def CreateVirtualSubnetWithVlan(request)
|
331
|
+
body = send_request('CreateVirtualSubnetWithVlan', request.serialize)
|
332
|
+
response = JSON.parse(body)
|
333
|
+
if response['Response'].key?('Error') == false
|
334
|
+
model = CreateVirtualSubnetWithVlanResponse.new
|
335
|
+
model.deserialize(response['Response'])
|
336
|
+
model
|
337
|
+
else
|
338
|
+
code = response['Response']['Error']['Code']
|
339
|
+
message = response['Response']['Error']['Message']
|
340
|
+
reqid = response['Response']['RequestId']
|
341
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
342
|
+
end
|
343
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
344
|
+
raise e
|
345
|
+
rescue StandardError => e
|
346
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
347
|
+
end
|
348
|
+
|
349
|
+
# 创建黑石私有网络
|
350
|
+
|
351
|
+
# @param request: Request instance for CreateVpc.
|
352
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::CreateVpcRequest`
|
353
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::CreateVpcResponse`
|
354
|
+
def CreateVpc(request)
|
355
|
+
body = send_request('CreateVpc', request.serialize)
|
356
|
+
response = JSON.parse(body)
|
357
|
+
if response['Response'].key?('Error') == false
|
358
|
+
model = CreateVpcResponse.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
|
+
# 创建对等连接
|
374
|
+
|
375
|
+
# @param request: Request instance for CreateVpcPeerConnection.
|
376
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::CreateVpcPeerConnectionRequest`
|
377
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::CreateVpcPeerConnectionResponse`
|
378
|
+
def CreateVpcPeerConnection(request)
|
379
|
+
body = send_request('CreateVpcPeerConnection', request.serialize)
|
380
|
+
response = JSON.parse(body)
|
381
|
+
if response['Response'].key?('Error') == false
|
382
|
+
model = CreateVpcPeerConnectionResponse.new
|
383
|
+
model.deserialize(response['Response'])
|
384
|
+
model
|
385
|
+
else
|
386
|
+
code = response['Response']['Error']['Code']
|
387
|
+
message = response['Response']['Error']['Message']
|
388
|
+
reqid = response['Response']['RequestId']
|
389
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
390
|
+
end
|
391
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
392
|
+
raise e
|
393
|
+
rescue StandardError => e
|
394
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
395
|
+
end
|
396
|
+
|
397
|
+
# 本接口(DeleteCustomerGateway)用于删除对端网关。
|
398
|
+
|
399
|
+
# @param request: Request instance for DeleteCustomerGateway.
|
400
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DeleteCustomerGatewayRequest`
|
401
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DeleteCustomerGatewayResponse`
|
402
|
+
def DeleteCustomerGateway(request)
|
403
|
+
body = send_request('DeleteCustomerGateway', request.serialize)
|
404
|
+
response = JSON.parse(body)
|
405
|
+
if response['Response'].key?('Error') == false
|
406
|
+
model = DeleteCustomerGatewayResponse.new
|
407
|
+
model.deserialize(response['Response'])
|
408
|
+
model
|
409
|
+
else
|
410
|
+
code = response['Response']['Error']['Code']
|
411
|
+
message = response['Response']['Error']['Message']
|
412
|
+
reqid = response['Response']['RequestId']
|
413
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
414
|
+
end
|
415
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
416
|
+
raise e
|
417
|
+
rescue StandardError => e
|
418
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
419
|
+
end
|
420
|
+
|
421
|
+
# 本接口用于托管机器从VLANID不为5的子网中移除。
|
422
|
+
# 1) 不能从vlanId 为5的子网中移除。
|
423
|
+
# 2) 每次调用最多能支持传入10台物理机。
|
424
|
+
|
425
|
+
# @param request: Request instance for DeleteHostedInterface.
|
426
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DeleteHostedInterfaceRequest`
|
427
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DeleteHostedInterfaceResponse`
|
428
|
+
def DeleteHostedInterface(request)
|
429
|
+
body = send_request('DeleteHostedInterface', request.serialize)
|
430
|
+
response = JSON.parse(body)
|
431
|
+
if response['Response'].key?('Error') == false
|
432
|
+
model = DeleteHostedInterfaceResponse.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
|
+
# 托管机器移除子网批量接口,传入一台托管机器和多个子网,批量移除这些子网。异步接口,接口返回TaskId。
|
448
|
+
|
449
|
+
# @param request: Request instance for DeleteHostedInterfaces.
|
450
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DeleteHostedInterfacesRequest`
|
451
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DeleteHostedInterfacesResponse`
|
452
|
+
def DeleteHostedInterfaces(request)
|
453
|
+
body = send_request('DeleteHostedInterfaces', request.serialize)
|
454
|
+
response = JSON.parse(body)
|
455
|
+
if response['Response'].key?('Error') == false
|
456
|
+
model = DeleteHostedInterfacesResponse.new
|
457
|
+
model.deserialize(response['Response'])
|
458
|
+
model
|
459
|
+
else
|
460
|
+
code = response['Response']['Error']['Code']
|
461
|
+
message = response['Response']['Error']['Message']
|
462
|
+
reqid = response['Response']['RequestId']
|
463
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
464
|
+
end
|
465
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
466
|
+
raise e
|
467
|
+
rescue StandardError => e
|
468
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
469
|
+
end
|
470
|
+
|
471
|
+
# 物理机移除子网批量接口,传入一台物理机和多个子网,批量移除这些子网。异步接口,接口返回TaskId。
|
472
|
+
|
473
|
+
# @param request: Request instance for DeleteInterfaces.
|
474
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DeleteInterfacesRequest`
|
475
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DeleteInterfacesResponse`
|
476
|
+
def DeleteInterfaces(request)
|
477
|
+
body = send_request('DeleteInterfaces', request.serialize)
|
478
|
+
response = JSON.parse(body)
|
479
|
+
if response['Response'].key?('Error') == false
|
480
|
+
model = DeleteInterfacesResponse.new
|
481
|
+
model.deserialize(response['Response'])
|
482
|
+
model
|
483
|
+
else
|
484
|
+
code = response['Response']['Error']['Code']
|
485
|
+
message = response['Response']['Error']['Message']
|
486
|
+
reqid = response['Response']['RequestId']
|
487
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
488
|
+
end
|
489
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
490
|
+
raise e
|
491
|
+
rescue StandardError => e
|
492
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
493
|
+
end
|
494
|
+
|
495
|
+
# 删除NAT网关
|
496
|
+
|
497
|
+
# @param request: Request instance for DeleteNatGateway.
|
498
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DeleteNatGatewayRequest`
|
499
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DeleteNatGatewayResponse`
|
500
|
+
def DeleteNatGateway(request)
|
501
|
+
body = send_request('DeleteNatGateway', request.serialize)
|
502
|
+
response = JSON.parse(body)
|
503
|
+
if response['Response'].key?('Error') == false
|
504
|
+
model = DeleteNatGatewayResponse.new
|
505
|
+
model.deserialize(response['Response'])
|
506
|
+
model
|
507
|
+
else
|
508
|
+
code = response['Response']['Error']['Code']
|
509
|
+
message = response['Response']['Error']['Message']
|
510
|
+
reqid = response['Response']['RequestId']
|
511
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
512
|
+
end
|
513
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
514
|
+
raise e
|
515
|
+
rescue StandardError => e
|
516
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
517
|
+
end
|
518
|
+
|
519
|
+
# 删除黑石路由表路由规则
|
520
|
+
|
521
|
+
# @param request: Request instance for DeleteRoutePolicy.
|
522
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DeleteRoutePolicyRequest`
|
523
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DeleteRoutePolicyResponse`
|
524
|
+
def DeleteRoutePolicy(request)
|
525
|
+
body = send_request('DeleteRoutePolicy', request.serialize)
|
526
|
+
response = JSON.parse(body)
|
527
|
+
if response['Response'].key?('Error') == false
|
528
|
+
model = DeleteRoutePolicyResponse.new
|
529
|
+
model.deserialize(response['Response'])
|
530
|
+
model
|
531
|
+
else
|
532
|
+
code = response['Response']['Error']['Code']
|
533
|
+
message = response['Response']['Error']['Message']
|
534
|
+
reqid = response['Response']['RequestId']
|
535
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
536
|
+
end
|
537
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
538
|
+
raise e
|
539
|
+
rescue StandardError => e
|
540
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
541
|
+
end
|
542
|
+
|
543
|
+
# 本接口(DeleteSubnet)用于删除黑石私有网络子网。
|
544
|
+
# 删除子网前,请清理该子网下所有资源,包括物理机、负载均衡、黑石数据库、弹性IP、NAT网关等资源
|
545
|
+
|
546
|
+
# @param request: Request instance for DeleteSubnet.
|
547
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DeleteSubnetRequest`
|
548
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DeleteSubnetResponse`
|
549
|
+
def DeleteSubnet(request)
|
550
|
+
body = send_request('DeleteSubnet', request.serialize)
|
551
|
+
response = JSON.parse(body)
|
552
|
+
if response['Response'].key?('Error') == false
|
553
|
+
model = DeleteSubnetResponse.new
|
554
|
+
model.deserialize(response['Response'])
|
555
|
+
model
|
556
|
+
else
|
557
|
+
code = response['Response']['Error']['Code']
|
558
|
+
message = response['Response']['Error']['Message']
|
559
|
+
reqid = response['Response']['RequestId']
|
560
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
561
|
+
end
|
562
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
563
|
+
raise e
|
564
|
+
rescue StandardError => e
|
565
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
566
|
+
end
|
567
|
+
|
568
|
+
# 退还虚拟IP。此接口只能退还虚拟IP,物理机IP不能退还。
|
569
|
+
|
570
|
+
# @param request: Request instance for DeleteVirtualIp.
|
571
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DeleteVirtualIpRequest`
|
572
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DeleteVirtualIpResponse`
|
573
|
+
def DeleteVirtualIp(request)
|
574
|
+
body = send_request('DeleteVirtualIp', request.serialize)
|
575
|
+
response = JSON.parse(body)
|
576
|
+
if response['Response'].key?('Error') == false
|
577
|
+
model = DeleteVirtualIpResponse.new
|
578
|
+
model.deserialize(response['Response'])
|
579
|
+
model
|
580
|
+
else
|
581
|
+
code = response['Response']['Error']['Code']
|
582
|
+
message = response['Response']['Error']['Message']
|
583
|
+
reqid = response['Response']['RequestId']
|
584
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
585
|
+
end
|
586
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
587
|
+
raise e
|
588
|
+
rescue StandardError => e
|
589
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
590
|
+
end
|
591
|
+
|
592
|
+
# 本接口(DeleteVpc)用于删除黑石私有网络(VPC)。
|
593
|
+
|
594
|
+
# 删除私有网络前,请清理该私有网络下所有资源,包括子网、负载均衡、弹性 IP、对等连接、NAT 网关、专线通道、SSLVPN 等资源。
|
595
|
+
|
596
|
+
# @param request: Request instance for DeleteVpc.
|
597
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DeleteVpcRequest`
|
598
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DeleteVpcResponse`
|
599
|
+
def DeleteVpc(request)
|
600
|
+
body = send_request('DeleteVpc', request.serialize)
|
601
|
+
response = JSON.parse(body)
|
602
|
+
if response['Response'].key?('Error') == false
|
603
|
+
model = DeleteVpcResponse.new
|
604
|
+
model.deserialize(response['Response'])
|
605
|
+
model
|
606
|
+
else
|
607
|
+
code = response['Response']['Error']['Code']
|
608
|
+
message = response['Response']['Error']['Message']
|
609
|
+
reqid = response['Response']['RequestId']
|
610
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
611
|
+
end
|
612
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
613
|
+
raise e
|
614
|
+
rescue StandardError => e
|
615
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
616
|
+
end
|
617
|
+
|
618
|
+
# 删除黑石对等连接
|
619
|
+
|
620
|
+
# @param request: Request instance for DeleteVpcPeerConnection.
|
621
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DeleteVpcPeerConnectionRequest`
|
622
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DeleteVpcPeerConnectionResponse`
|
623
|
+
def DeleteVpcPeerConnection(request)
|
624
|
+
body = send_request('DeleteVpcPeerConnection', request.serialize)
|
625
|
+
response = JSON.parse(body)
|
626
|
+
if response['Response'].key?('Error') == false
|
627
|
+
model = DeleteVpcPeerConnectionResponse.new
|
628
|
+
model.deserialize(response['Response'])
|
629
|
+
model
|
630
|
+
else
|
631
|
+
code = response['Response']['Error']['Code']
|
632
|
+
message = response['Response']['Error']['Message']
|
633
|
+
reqid = response['Response']['RequestId']
|
634
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
635
|
+
end
|
636
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
637
|
+
raise e
|
638
|
+
rescue StandardError => e
|
639
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
640
|
+
end
|
641
|
+
|
642
|
+
# 本接口(DeleteVpnConnection)用于删除VPN通道。
|
643
|
+
|
644
|
+
# @param request: Request instance for DeleteVpnConnection.
|
645
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DeleteVpnConnectionRequest`
|
646
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DeleteVpnConnectionResponse`
|
647
|
+
def DeleteVpnConnection(request)
|
648
|
+
body = send_request('DeleteVpnConnection', request.serialize)
|
649
|
+
response = JSON.parse(body)
|
650
|
+
if response['Response'].key?('Error') == false
|
651
|
+
model = DeleteVpnConnectionResponse.new
|
652
|
+
model.deserialize(response['Response'])
|
653
|
+
model
|
654
|
+
else
|
655
|
+
code = response['Response']['Error']['Code']
|
656
|
+
message = response['Response']['Error']['Message']
|
657
|
+
reqid = response['Response']['RequestId']
|
658
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
659
|
+
end
|
660
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
661
|
+
raise e
|
662
|
+
rescue StandardError => e
|
663
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
664
|
+
end
|
665
|
+
|
666
|
+
# 本接口(DeleteVpnGateway)用于删除VPN网关。
|
667
|
+
|
668
|
+
# @param request: Request instance for DeleteVpnGateway.
|
669
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DeleteVpnGatewayRequest`
|
670
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DeleteVpnGatewayResponse`
|
671
|
+
def DeleteVpnGateway(request)
|
672
|
+
body = send_request('DeleteVpnGateway', request.serialize)
|
673
|
+
response = JSON.parse(body)
|
674
|
+
if response['Response'].key?('Error') == false
|
675
|
+
model = DeleteVpnGatewayResponse.new
|
676
|
+
model.deserialize(response['Response'])
|
677
|
+
model
|
678
|
+
else
|
679
|
+
code = response['Response']['Error']['Code']
|
680
|
+
message = response['Response']['Error']['Message']
|
681
|
+
reqid = response['Response']['RequestId']
|
682
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
683
|
+
end
|
684
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
685
|
+
raise e
|
686
|
+
rescue StandardError => e
|
687
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
688
|
+
end
|
689
|
+
|
690
|
+
# 注销私有网络IP为空闲
|
691
|
+
|
692
|
+
# @param request: Request instance for DeregisterIps.
|
693
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DeregisterIpsRequest`
|
694
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DeregisterIpsResponse`
|
695
|
+
def DeregisterIps(request)
|
696
|
+
body = send_request('DeregisterIps', request.serialize)
|
697
|
+
response = JSON.parse(body)
|
698
|
+
if response['Response'].key?('Error') == false
|
699
|
+
model = DeregisterIpsResponse.new
|
700
|
+
model.deserialize(response['Response'])
|
701
|
+
model
|
702
|
+
else
|
703
|
+
code = response['Response']['Error']['Code']
|
704
|
+
message = response['Response']['Error']['Message']
|
705
|
+
reqid = response['Response']['RequestId']
|
706
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
707
|
+
end
|
708
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
709
|
+
raise e
|
710
|
+
rescue StandardError => e
|
711
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
712
|
+
end
|
713
|
+
|
714
|
+
# 本接口(DescribeCustomerGateways)用于查询对端网关列表。
|
715
|
+
|
716
|
+
# @param request: Request instance for DescribeCustomerGateways.
|
717
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeCustomerGatewaysRequest`
|
718
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeCustomerGatewaysResponse`
|
719
|
+
def DescribeCustomerGateways(request)
|
720
|
+
body = send_request('DescribeCustomerGateways', request.serialize)
|
721
|
+
response = JSON.parse(body)
|
722
|
+
if response['Response'].key?('Error') == false
|
723
|
+
model = DescribeCustomerGatewaysResponse.new
|
724
|
+
model.deserialize(response['Response'])
|
725
|
+
model
|
726
|
+
else
|
727
|
+
code = response['Response']['Error']['Code']
|
728
|
+
message = response['Response']['Error']['Message']
|
729
|
+
reqid = response['Response']['RequestId']
|
730
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
731
|
+
end
|
732
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
733
|
+
raise e
|
734
|
+
rescue StandardError => e
|
735
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
736
|
+
end
|
737
|
+
|
738
|
+
# 获取NAT网关信息,包括NAT网关 ID、网关名称、私有网络、网关并发连接上限、绑定EIP列表等
|
739
|
+
|
740
|
+
# @param request: Request instance for DescribeNatGateways.
|
741
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeNatGatewaysRequest`
|
742
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeNatGatewaysResponse`
|
743
|
+
def DescribeNatGateways(request)
|
744
|
+
body = send_request('DescribeNatGateways', request.serialize)
|
745
|
+
response = JSON.parse(body)
|
746
|
+
if response['Response'].key?('Error') == false
|
747
|
+
model = DescribeNatGatewaysResponse.new
|
748
|
+
model.deserialize(response['Response'])
|
749
|
+
model
|
750
|
+
else
|
751
|
+
code = response['Response']['Error']['Code']
|
752
|
+
message = response['Response']['Error']['Message']
|
753
|
+
reqid = response['Response']['RequestId']
|
754
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
755
|
+
end
|
756
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
757
|
+
raise e
|
758
|
+
rescue StandardError => e
|
759
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
760
|
+
end
|
761
|
+
|
762
|
+
# 可获取NAT网关绑定的子网信息
|
763
|
+
|
764
|
+
# @param request: Request instance for DescribeNatSubnets.
|
765
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeNatSubnetsRequest`
|
766
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeNatSubnetsResponse`
|
767
|
+
def DescribeNatSubnets(request)
|
768
|
+
body = send_request('DescribeNatSubnets', request.serialize)
|
769
|
+
response = JSON.parse(body)
|
770
|
+
if response['Response'].key?('Error') == false
|
771
|
+
model = DescribeNatSubnetsResponse.new
|
772
|
+
model.deserialize(response['Response'])
|
773
|
+
model
|
774
|
+
else
|
775
|
+
code = response['Response']['Error']['Code']
|
776
|
+
message = response['Response']['Error']['Message']
|
777
|
+
reqid = response['Response']['RequestId']
|
778
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
779
|
+
end
|
780
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
781
|
+
raise e
|
782
|
+
rescue StandardError => e
|
783
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
784
|
+
end
|
785
|
+
|
786
|
+
# 本接口(DescribeRoutePolicies)用于查询路由表条目。
|
787
|
+
|
788
|
+
# @param request: Request instance for DescribeRoutePolicies.
|
789
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeRoutePoliciesRequest`
|
790
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeRoutePoliciesResponse`
|
791
|
+
def DescribeRoutePolicies(request)
|
792
|
+
body = send_request('DescribeRoutePolicies', request.serialize)
|
793
|
+
response = JSON.parse(body)
|
794
|
+
if response['Response'].key?('Error') == false
|
795
|
+
model = DescribeRoutePoliciesResponse.new
|
796
|
+
model.deserialize(response['Response'])
|
797
|
+
model
|
798
|
+
else
|
799
|
+
code = response['Response']['Error']['Code']
|
800
|
+
message = response['Response']['Error']['Message']
|
801
|
+
reqid = response['Response']['RequestId']
|
802
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
803
|
+
end
|
804
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
805
|
+
raise e
|
806
|
+
rescue StandardError => e
|
807
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
808
|
+
end
|
809
|
+
|
810
|
+
# 本接口(DescribeRouteTables)用于查询路由表。
|
811
|
+
|
812
|
+
# @param request: Request instance for DescribeRouteTables.
|
813
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeRouteTablesRequest`
|
814
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeRouteTablesResponse`
|
815
|
+
def DescribeRouteTables(request)
|
816
|
+
body = send_request('DescribeRouteTables', request.serialize)
|
817
|
+
response = JSON.parse(body)
|
818
|
+
if response['Response'].key?('Error') == false
|
819
|
+
model = DescribeRouteTablesResponse.new
|
820
|
+
model.deserialize(response['Response'])
|
821
|
+
model
|
822
|
+
else
|
823
|
+
code = response['Response']['Error']['Code']
|
824
|
+
message = response['Response']['Error']['Message']
|
825
|
+
reqid = response['Response']['RequestId']
|
826
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
827
|
+
end
|
828
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
829
|
+
raise e
|
830
|
+
rescue StandardError => e
|
831
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
832
|
+
end
|
833
|
+
|
834
|
+
# 获取子网内可用IP列表
|
835
|
+
|
836
|
+
# @param request: Request instance for DescribeSubnetAvailableIps.
|
837
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeSubnetAvailableIpsRequest`
|
838
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeSubnetAvailableIpsResponse`
|
839
|
+
def DescribeSubnetAvailableIps(request)
|
840
|
+
body = send_request('DescribeSubnetAvailableIps', request.serialize)
|
841
|
+
response = JSON.parse(body)
|
842
|
+
if response['Response'].key?('Error') == false
|
843
|
+
model = DescribeSubnetAvailableIpsResponse.new
|
844
|
+
model.deserialize(response['Response'])
|
845
|
+
model
|
846
|
+
else
|
847
|
+
code = response['Response']['Error']['Code']
|
848
|
+
message = response['Response']['Error']['Message']
|
849
|
+
reqid = response['Response']['RequestId']
|
850
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
851
|
+
end
|
852
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
853
|
+
raise e
|
854
|
+
rescue StandardError => e
|
855
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
856
|
+
end
|
857
|
+
|
858
|
+
# 物理机可以加入物理机子网,虚拟子网,DOCKER子网,通过此接口可以查询物理机加入的子网。
|
859
|
+
|
860
|
+
# @param request: Request instance for DescribeSubnetByDevice.
|
861
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeSubnetByDeviceRequest`
|
862
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeSubnetByDeviceResponse`
|
863
|
+
def DescribeSubnetByDevice(request)
|
864
|
+
body = send_request('DescribeSubnetByDevice', request.serialize)
|
865
|
+
response = JSON.parse(body)
|
866
|
+
if response['Response'].key?('Error') == false
|
867
|
+
model = DescribeSubnetByDeviceResponse.new
|
868
|
+
model.deserialize(response['Response'])
|
869
|
+
model
|
870
|
+
else
|
871
|
+
code = response['Response']['Error']['Code']
|
872
|
+
message = response['Response']['Error']['Message']
|
873
|
+
reqid = response['Response']['RequestId']
|
874
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
875
|
+
end
|
876
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
877
|
+
raise e
|
878
|
+
rescue StandardError => e
|
879
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
880
|
+
end
|
881
|
+
|
882
|
+
# 托管可以加入物理机子网,虚拟子网,DOCKER子网,通过此接口可以查询托管加入的子网。
|
883
|
+
|
884
|
+
# @param request: Request instance for DescribeSubnetByHostedDevice.
|
885
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeSubnetByHostedDeviceRequest`
|
886
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeSubnetByHostedDeviceResponse`
|
887
|
+
def DescribeSubnetByHostedDevice(request)
|
888
|
+
body = send_request('DescribeSubnetByHostedDevice', request.serialize)
|
889
|
+
response = JSON.parse(body)
|
890
|
+
if response['Response'].key?('Error') == false
|
891
|
+
model = DescribeSubnetByHostedDeviceResponse.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
|
+
# 本接口(DescribeSubnets)用于查询黑石子网列表。
|
907
|
+
|
908
|
+
# @param request: Request instance for DescribeSubnets.
|
909
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeSubnetsRequest`
|
910
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeSubnetsResponse`
|
911
|
+
def DescribeSubnets(request)
|
912
|
+
body = send_request('DescribeSubnets', request.serialize)
|
913
|
+
response = JSON.parse(body)
|
914
|
+
if response['Response'].key?('Error') == false
|
915
|
+
model = DescribeSubnetsResponse.new
|
916
|
+
model.deserialize(response['Response'])
|
917
|
+
model
|
918
|
+
else
|
919
|
+
code = response['Response']['Error']['Code']
|
920
|
+
message = response['Response']['Error']['Message']
|
921
|
+
reqid = response['Response']['RequestId']
|
922
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
923
|
+
end
|
924
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
925
|
+
raise e
|
926
|
+
rescue StandardError => e
|
927
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
928
|
+
end
|
929
|
+
|
930
|
+
# 根据任务ID,获取任务的执行状态
|
931
|
+
|
932
|
+
# @param request: Request instance for DescribeTaskStatus.
|
933
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeTaskStatusRequest`
|
934
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeTaskStatusResponse`
|
935
|
+
def DescribeTaskStatus(request)
|
936
|
+
body = send_request('DescribeTaskStatus', request.serialize)
|
937
|
+
response = JSON.parse(body)
|
938
|
+
if response['Response'].key?('Error') == false
|
939
|
+
model = DescribeTaskStatusResponse.new
|
940
|
+
model.deserialize(response['Response'])
|
941
|
+
model
|
942
|
+
else
|
943
|
+
code = response['Response']['Error']['Code']
|
944
|
+
message = response['Response']['Error']['Message']
|
945
|
+
reqid = response['Response']['RequestId']
|
946
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
947
|
+
end
|
948
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
949
|
+
raise e
|
950
|
+
rescue StandardError => e
|
951
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
952
|
+
end
|
953
|
+
|
954
|
+
# 获取对等连接列表
|
955
|
+
|
956
|
+
# @param request: Request instance for DescribeVpcPeerConnections.
|
957
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpcPeerConnectionsRequest`
|
958
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpcPeerConnectionsResponse`
|
959
|
+
def DescribeVpcPeerConnections(request)
|
960
|
+
body = send_request('DescribeVpcPeerConnections', request.serialize)
|
961
|
+
response = JSON.parse(body)
|
962
|
+
if response['Response'].key?('Error') == false
|
963
|
+
model = DescribeVpcPeerConnectionsResponse.new
|
964
|
+
model.deserialize(response['Response'])
|
965
|
+
model
|
966
|
+
else
|
967
|
+
code = response['Response']['Error']['Code']
|
968
|
+
message = response['Response']['Error']['Message']
|
969
|
+
reqid = response['Response']['RequestId']
|
970
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
971
|
+
end
|
972
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
973
|
+
raise e
|
974
|
+
rescue StandardError => e
|
975
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
976
|
+
end
|
977
|
+
|
978
|
+
# 本接口(DescribeVpcQuota)用于查询用户VPC相关配额限制。
|
979
|
+
|
980
|
+
# @param request: Request instance for DescribeVpcQuota.
|
981
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpcQuotaRequest`
|
982
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpcQuotaResponse`
|
983
|
+
def DescribeVpcQuota(request)
|
984
|
+
body = send_request('DescribeVpcQuota', request.serialize)
|
985
|
+
response = JSON.parse(body)
|
986
|
+
if response['Response'].key?('Error') == false
|
987
|
+
model = DescribeVpcQuotaResponse.new
|
988
|
+
model.deserialize(response['Response'])
|
989
|
+
model
|
990
|
+
else
|
991
|
+
code = response['Response']['Error']['Code']
|
992
|
+
message = response['Response']['Error']['Message']
|
993
|
+
reqid = response['Response']['RequestId']
|
994
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
995
|
+
end
|
996
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
997
|
+
raise e
|
998
|
+
rescue StandardError => e
|
999
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1000
|
+
end
|
1001
|
+
|
1002
|
+
# 查询黑石私有网络关联资源
|
1003
|
+
|
1004
|
+
# @param request: Request instance for DescribeVpcResource.
|
1005
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpcResourceRequest`
|
1006
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpcResourceResponse`
|
1007
|
+
def DescribeVpcResource(request)
|
1008
|
+
body = send_request('DescribeVpcResource', request.serialize)
|
1009
|
+
response = JSON.parse(body)
|
1010
|
+
if response['Response'].key?('Error') == false
|
1011
|
+
model = DescribeVpcResourceResponse.new
|
1012
|
+
model.deserialize(response['Response'])
|
1013
|
+
model
|
1014
|
+
else
|
1015
|
+
code = response['Response']['Error']['Code']
|
1016
|
+
message = response['Response']['Error']['Message']
|
1017
|
+
reqid = response['Response']['RequestId']
|
1018
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1019
|
+
end
|
1020
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1021
|
+
raise e
|
1022
|
+
rescue StandardError => e
|
1023
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
# 本接口(DescribeVpcView)用于查询VPC网络拓扑视图。
|
1027
|
+
|
1028
|
+
# @param request: Request instance for DescribeVpcView.
|
1029
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpcViewRequest`
|
1030
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpcViewResponse`
|
1031
|
+
def DescribeVpcView(request)
|
1032
|
+
body = send_request('DescribeVpcView', request.serialize)
|
1033
|
+
response = JSON.parse(body)
|
1034
|
+
if response['Response'].key?('Error') == false
|
1035
|
+
model = DescribeVpcViewResponse.new
|
1036
|
+
model.deserialize(response['Response'])
|
1037
|
+
model
|
1038
|
+
else
|
1039
|
+
code = response['Response']['Error']['Code']
|
1040
|
+
message = response['Response']['Error']['Message']
|
1041
|
+
reqid = response['Response']['RequestId']
|
1042
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1043
|
+
end
|
1044
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1045
|
+
raise e
|
1046
|
+
rescue StandardError => e
|
1047
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
# 本接口(DescribeVpcs)用于查询私有网络列表。
|
1051
|
+
# 本接口不传参数时,返回默认排序下的前20条VPC信息。
|
1052
|
+
|
1053
|
+
# @param request: Request instance for DescribeVpcs.
|
1054
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpcsRequest`
|
1055
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpcsResponse`
|
1056
|
+
def DescribeVpcs(request)
|
1057
|
+
body = send_request('DescribeVpcs', request.serialize)
|
1058
|
+
response = JSON.parse(body)
|
1059
|
+
if response['Response'].key?('Error') == false
|
1060
|
+
model = DescribeVpcsResponse.new
|
1061
|
+
model.deserialize(response['Response'])
|
1062
|
+
model
|
1063
|
+
else
|
1064
|
+
code = response['Response']['Error']['Code']
|
1065
|
+
message = response['Response']['Error']['Message']
|
1066
|
+
reqid = response['Response']['RequestId']
|
1067
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1068
|
+
end
|
1069
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1070
|
+
raise e
|
1071
|
+
rescue StandardError => e
|
1072
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1073
|
+
end
|
1074
|
+
|
1075
|
+
# 本接口(DescribeVpnConnections)查询VPN通道列表。
|
1076
|
+
|
1077
|
+
# @param request: Request instance for DescribeVpnConnections.
|
1078
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpnConnectionsRequest`
|
1079
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpnConnectionsResponse`
|
1080
|
+
def DescribeVpnConnections(request)
|
1081
|
+
body = send_request('DescribeVpnConnections', request.serialize)
|
1082
|
+
response = JSON.parse(body)
|
1083
|
+
if response['Response'].key?('Error') == false
|
1084
|
+
model = DescribeVpnConnectionsResponse.new
|
1085
|
+
model.deserialize(response['Response'])
|
1086
|
+
model
|
1087
|
+
else
|
1088
|
+
code = response['Response']['Error']['Code']
|
1089
|
+
message = response['Response']['Error']['Message']
|
1090
|
+
reqid = response['Response']['RequestId']
|
1091
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1092
|
+
end
|
1093
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1094
|
+
raise e
|
1095
|
+
rescue StandardError => e
|
1096
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1097
|
+
end
|
1098
|
+
|
1099
|
+
# 本接口(DescribeVpnGateways)用于查询VPN网关列表。
|
1100
|
+
|
1101
|
+
# @param request: Request instance for DescribeVpnGateways.
|
1102
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpnGatewaysRequest`
|
1103
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DescribeVpnGatewaysResponse`
|
1104
|
+
def DescribeVpnGateways(request)
|
1105
|
+
body = send_request('DescribeVpnGateways', request.serialize)
|
1106
|
+
response = JSON.parse(body)
|
1107
|
+
if response['Response'].key?('Error') == false
|
1108
|
+
model = DescribeVpnGatewaysResponse.new
|
1109
|
+
model.deserialize(response['Response'])
|
1110
|
+
model
|
1111
|
+
else
|
1112
|
+
code = response['Response']['Error']['Code']
|
1113
|
+
message = response['Response']['Error']['Message']
|
1114
|
+
reqid = response['Response']['RequestId']
|
1115
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1116
|
+
end
|
1117
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1118
|
+
raise e
|
1119
|
+
rescue StandardError => e
|
1120
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1121
|
+
end
|
1122
|
+
|
1123
|
+
# 本接口(DownloadCustomerGatewayConfiguration)用于下载VPN通道配置。
|
1124
|
+
|
1125
|
+
# @param request: Request instance for DownloadCustomerGatewayConfiguration.
|
1126
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::DownloadCustomerGatewayConfigurationRequest`
|
1127
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::DownloadCustomerGatewayConfigurationResponse`
|
1128
|
+
def DownloadCustomerGatewayConfiguration(request)
|
1129
|
+
body = send_request('DownloadCustomerGatewayConfiguration', request.serialize)
|
1130
|
+
response = JSON.parse(body)
|
1131
|
+
if response['Response'].key?('Error') == false
|
1132
|
+
model = DownloadCustomerGatewayConfigurationResponse.new
|
1133
|
+
model.deserialize(response['Response'])
|
1134
|
+
model
|
1135
|
+
else
|
1136
|
+
code = response['Response']['Error']['Code']
|
1137
|
+
message = response['Response']['Error']['Message']
|
1138
|
+
reqid = response['Response']['RequestId']
|
1139
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1140
|
+
end
|
1141
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1142
|
+
raise e
|
1143
|
+
rescue StandardError => e
|
1144
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1145
|
+
end
|
1146
|
+
|
1147
|
+
# 本接口(ModifyCustomerGatewayAttribute)用于修改对端网关信息。
|
1148
|
+
|
1149
|
+
# @param request: Request instance for ModifyCustomerGatewayAttribute.
|
1150
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::ModifyCustomerGatewayAttributeRequest`
|
1151
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::ModifyCustomerGatewayAttributeResponse`
|
1152
|
+
def ModifyCustomerGatewayAttribute(request)
|
1153
|
+
body = send_request('ModifyCustomerGatewayAttribute', request.serialize)
|
1154
|
+
response = JSON.parse(body)
|
1155
|
+
if response['Response'].key?('Error') == false
|
1156
|
+
model = ModifyCustomerGatewayAttributeResponse.new
|
1157
|
+
model.deserialize(response['Response'])
|
1158
|
+
model
|
1159
|
+
else
|
1160
|
+
code = response['Response']['Error']['Code']
|
1161
|
+
message = response['Response']['Error']['Message']
|
1162
|
+
reqid = response['Response']['RequestId']
|
1163
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1164
|
+
end
|
1165
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1166
|
+
raise e
|
1167
|
+
rescue StandardError => e
|
1168
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1169
|
+
end
|
1170
|
+
|
1171
|
+
# 修改自定义路由
|
1172
|
+
|
1173
|
+
# @param request: Request instance for ModifyRoutePolicy.
|
1174
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::ModifyRoutePolicyRequest`
|
1175
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::ModifyRoutePolicyResponse`
|
1176
|
+
def ModifyRoutePolicy(request)
|
1177
|
+
body = send_request('ModifyRoutePolicy', request.serialize)
|
1178
|
+
response = JSON.parse(body)
|
1179
|
+
if response['Response'].key?('Error') == false
|
1180
|
+
model = ModifyRoutePolicyResponse.new
|
1181
|
+
model.deserialize(response['Response'])
|
1182
|
+
model
|
1183
|
+
else
|
1184
|
+
code = response['Response']['Error']['Code']
|
1185
|
+
message = response['Response']['Error']['Message']
|
1186
|
+
reqid = response['Response']['RequestId']
|
1187
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1188
|
+
end
|
1189
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1190
|
+
raise e
|
1191
|
+
rescue StandardError => e
|
1192
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1193
|
+
end
|
1194
|
+
|
1195
|
+
# 修改路由表
|
1196
|
+
|
1197
|
+
# @param request: Request instance for ModifyRouteTable.
|
1198
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::ModifyRouteTableRequest`
|
1199
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::ModifyRouteTableResponse`
|
1200
|
+
def ModifyRouteTable(request)
|
1201
|
+
body = send_request('ModifyRouteTable', request.serialize)
|
1202
|
+
response = JSON.parse(body)
|
1203
|
+
if response['Response'].key?('Error') == false
|
1204
|
+
model = ModifyRouteTableResponse.new
|
1205
|
+
model.deserialize(response['Response'])
|
1206
|
+
model
|
1207
|
+
else
|
1208
|
+
code = response['Response']['Error']['Code']
|
1209
|
+
message = response['Response']['Error']['Message']
|
1210
|
+
reqid = response['Response']['RequestId']
|
1211
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1212
|
+
end
|
1213
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1214
|
+
raise e
|
1215
|
+
rescue StandardError => e
|
1216
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1217
|
+
end
|
1218
|
+
|
1219
|
+
# 修改子网属性
|
1220
|
+
|
1221
|
+
# @param request: Request instance for ModifySubnetAttribute.
|
1222
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::ModifySubnetAttributeRequest`
|
1223
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::ModifySubnetAttributeResponse`
|
1224
|
+
def ModifySubnetAttribute(request)
|
1225
|
+
body = send_request('ModifySubnetAttribute', request.serialize)
|
1226
|
+
response = JSON.parse(body)
|
1227
|
+
if response['Response'].key?('Error') == false
|
1228
|
+
model = ModifySubnetAttributeResponse.new
|
1229
|
+
model.deserialize(response['Response'])
|
1230
|
+
model
|
1231
|
+
else
|
1232
|
+
code = response['Response']['Error']['Code']
|
1233
|
+
message = response['Response']['Error']['Message']
|
1234
|
+
reqid = response['Response']['RequestId']
|
1235
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1236
|
+
end
|
1237
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1238
|
+
raise e
|
1239
|
+
rescue StandardError => e
|
1240
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1241
|
+
end
|
1242
|
+
|
1243
|
+
# 修改子网DHCP Relay属性
|
1244
|
+
|
1245
|
+
# @param request: Request instance for ModifySubnetDHCPRelay.
|
1246
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::ModifySubnetDHCPRelayRequest`
|
1247
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::ModifySubnetDHCPRelayResponse`
|
1248
|
+
def ModifySubnetDHCPRelay(request)
|
1249
|
+
body = send_request('ModifySubnetDHCPRelay', request.serialize)
|
1250
|
+
response = JSON.parse(body)
|
1251
|
+
if response['Response'].key?('Error') == false
|
1252
|
+
model = ModifySubnetDHCPRelayResponse.new
|
1253
|
+
model.deserialize(response['Response'])
|
1254
|
+
model
|
1255
|
+
else
|
1256
|
+
code = response['Response']['Error']['Code']
|
1257
|
+
message = response['Response']['Error']['Message']
|
1258
|
+
reqid = response['Response']['RequestId']
|
1259
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1260
|
+
end
|
1261
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1262
|
+
raise e
|
1263
|
+
rescue StandardError => e
|
1264
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1265
|
+
end
|
1266
|
+
|
1267
|
+
# 本接口(ModifyVpcAttribute)用于修改VPC的标识名称和控制VPC的监控起停。
|
1268
|
+
|
1269
|
+
# @param request: Request instance for ModifyVpcAttribute.
|
1270
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::ModifyVpcAttributeRequest`
|
1271
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::ModifyVpcAttributeResponse`
|
1272
|
+
def ModifyVpcAttribute(request)
|
1273
|
+
body = send_request('ModifyVpcAttribute', request.serialize)
|
1274
|
+
response = JSON.parse(body)
|
1275
|
+
if response['Response'].key?('Error') == false
|
1276
|
+
model = ModifyVpcAttributeResponse.new
|
1277
|
+
model.deserialize(response['Response'])
|
1278
|
+
model
|
1279
|
+
else
|
1280
|
+
code = response['Response']['Error']['Code']
|
1281
|
+
message = response['Response']['Error']['Message']
|
1282
|
+
reqid = response['Response']['RequestId']
|
1283
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1284
|
+
end
|
1285
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1286
|
+
raise e
|
1287
|
+
rescue StandardError => e
|
1288
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
# 修改黑石对等连接
|
1292
|
+
|
1293
|
+
# @param request: Request instance for ModifyVpcPeerConnection.
|
1294
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::ModifyVpcPeerConnectionRequest`
|
1295
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::ModifyVpcPeerConnectionResponse`
|
1296
|
+
def ModifyVpcPeerConnection(request)
|
1297
|
+
body = send_request('ModifyVpcPeerConnection', request.serialize)
|
1298
|
+
response = JSON.parse(body)
|
1299
|
+
if response['Response'].key?('Error') == false
|
1300
|
+
model = ModifyVpcPeerConnectionResponse.new
|
1301
|
+
model.deserialize(response['Response'])
|
1302
|
+
model
|
1303
|
+
else
|
1304
|
+
code = response['Response']['Error']['Code']
|
1305
|
+
message = response['Response']['Error']['Message']
|
1306
|
+
reqid = response['Response']['RequestId']
|
1307
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1308
|
+
end
|
1309
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1310
|
+
raise e
|
1311
|
+
rescue StandardError => e
|
1312
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1313
|
+
end
|
1314
|
+
|
1315
|
+
# 本接口(ModifyVpnConnectionAttribute)用于修改VPN通道。
|
1316
|
+
|
1317
|
+
# @param request: Request instance for ModifyVpnConnectionAttribute.
|
1318
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::ModifyVpnConnectionAttributeRequest`
|
1319
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::ModifyVpnConnectionAttributeResponse`
|
1320
|
+
def ModifyVpnConnectionAttribute(request)
|
1321
|
+
body = send_request('ModifyVpnConnectionAttribute', request.serialize)
|
1322
|
+
response = JSON.parse(body)
|
1323
|
+
if response['Response'].key?('Error') == false
|
1324
|
+
model = ModifyVpnConnectionAttributeResponse.new
|
1325
|
+
model.deserialize(response['Response'])
|
1326
|
+
model
|
1327
|
+
else
|
1328
|
+
code = response['Response']['Error']['Code']
|
1329
|
+
message = response['Response']['Error']['Message']
|
1330
|
+
reqid = response['Response']['RequestId']
|
1331
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1332
|
+
end
|
1333
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1334
|
+
raise e
|
1335
|
+
rescue StandardError => e
|
1336
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1337
|
+
end
|
1338
|
+
|
1339
|
+
# 本接口(ModifyVpnGatewayAttribute)用于修改VPN网关属性。
|
1340
|
+
|
1341
|
+
# @param request: Request instance for ModifyVpnGatewayAttribute.
|
1342
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::ModifyVpnGatewayAttributeRequest`
|
1343
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::ModifyVpnGatewayAttributeResponse`
|
1344
|
+
def ModifyVpnGatewayAttribute(request)
|
1345
|
+
body = send_request('ModifyVpnGatewayAttribute', request.serialize)
|
1346
|
+
response = JSON.parse(body)
|
1347
|
+
if response['Response'].key?('Error') == false
|
1348
|
+
model = ModifyVpnGatewayAttributeResponse.new
|
1349
|
+
model.deserialize(response['Response'])
|
1350
|
+
model
|
1351
|
+
else
|
1352
|
+
code = response['Response']['Error']['Code']
|
1353
|
+
message = response['Response']['Error']['Message']
|
1354
|
+
reqid = response['Response']['RequestId']
|
1355
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1356
|
+
end
|
1357
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1358
|
+
raise e
|
1359
|
+
rescue StandardError => e
|
1360
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1361
|
+
end
|
1362
|
+
|
1363
|
+
# 拒绝黑石对等连接申请
|
1364
|
+
|
1365
|
+
# @param request: Request instance for RejectVpcPeerConnection.
|
1366
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::RejectVpcPeerConnectionRequest`
|
1367
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::RejectVpcPeerConnectionResponse`
|
1368
|
+
def RejectVpcPeerConnection(request)
|
1369
|
+
body = send_request('RejectVpcPeerConnection', request.serialize)
|
1370
|
+
response = JSON.parse(body)
|
1371
|
+
if response['Response'].key?('Error') == false
|
1372
|
+
model = RejectVpcPeerConnectionResponse.new
|
1373
|
+
model.deserialize(response['Response'])
|
1374
|
+
model
|
1375
|
+
else
|
1376
|
+
code = response['Response']['Error']['Code']
|
1377
|
+
message = response['Response']['Error']['Message']
|
1378
|
+
reqid = response['Response']['RequestId']
|
1379
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1380
|
+
end
|
1381
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1382
|
+
raise e
|
1383
|
+
rescue StandardError => e
|
1384
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1385
|
+
end
|
1386
|
+
|
1387
|
+
# 本接口(ResetVpnConnection)用于重置VPN通道。
|
1388
|
+
|
1389
|
+
# @param request: Request instance for ResetVpnConnection.
|
1390
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::ResetVpnConnectionRequest`
|
1391
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::ResetVpnConnectionResponse`
|
1392
|
+
def ResetVpnConnection(request)
|
1393
|
+
body = send_request('ResetVpnConnection', request.serialize)
|
1394
|
+
response = JSON.parse(body)
|
1395
|
+
if response['Response'].key?('Error') == false
|
1396
|
+
model = ResetVpnConnectionResponse.new
|
1397
|
+
model.deserialize(response['Response'])
|
1398
|
+
model
|
1399
|
+
else
|
1400
|
+
code = response['Response']['Error']['Code']
|
1401
|
+
message = response['Response']['Error']['Message']
|
1402
|
+
reqid = response['Response']['RequestId']
|
1403
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1404
|
+
end
|
1405
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1406
|
+
raise e
|
1407
|
+
rescue StandardError => e
|
1408
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1409
|
+
end
|
1410
|
+
|
1411
|
+
# NAT网关解绑该EIP后,NAT网关将不会使用该EIP作为访问外网的源IP地址
|
1412
|
+
|
1413
|
+
# @param request: Request instance for UnbindEipsFromNatGateway.
|
1414
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::UnbindEipsFromNatGatewayRequest`
|
1415
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::UnbindEipsFromNatGatewayResponse`
|
1416
|
+
def UnbindEipsFromNatGateway(request)
|
1417
|
+
body = send_request('UnbindEipsFromNatGateway', request.serialize)
|
1418
|
+
response = JSON.parse(body)
|
1419
|
+
if response['Response'].key?('Error') == false
|
1420
|
+
model = UnbindEipsFromNatGatewayResponse.new
|
1421
|
+
model.deserialize(response['Response'])
|
1422
|
+
model
|
1423
|
+
else
|
1424
|
+
code = response['Response']['Error']['Code']
|
1425
|
+
message = response['Response']['Error']['Message']
|
1426
|
+
reqid = response['Response']['RequestId']
|
1427
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1428
|
+
end
|
1429
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1430
|
+
raise e
|
1431
|
+
rescue StandardError => e
|
1432
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1433
|
+
end
|
1434
|
+
|
1435
|
+
# NAT网关解绑IP接口,可将子网的部分IP从NAT网关中解绑
|
1436
|
+
|
1437
|
+
# @param request: Request instance for UnbindIpsFromNatGateway.
|
1438
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::UnbindIpsFromNatGatewayRequest`
|
1439
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::UnbindIpsFromNatGatewayResponse`
|
1440
|
+
def UnbindIpsFromNatGateway(request)
|
1441
|
+
body = send_request('UnbindIpsFromNatGateway', request.serialize)
|
1442
|
+
response = JSON.parse(body)
|
1443
|
+
if response['Response'].key?('Error') == false
|
1444
|
+
model = UnbindIpsFromNatGatewayResponse.new
|
1445
|
+
model.deserialize(response['Response'])
|
1446
|
+
model
|
1447
|
+
else
|
1448
|
+
code = response['Response']['Error']['Code']
|
1449
|
+
message = response['Response']['Error']['Message']
|
1450
|
+
reqid = response['Response']['RequestId']
|
1451
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1452
|
+
end
|
1453
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1454
|
+
raise e
|
1455
|
+
rescue StandardError => e
|
1456
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1457
|
+
end
|
1458
|
+
|
1459
|
+
# NAT网关解绑子网接口,可将子网解绑NAT网关
|
1460
|
+
|
1461
|
+
# @param request: Request instance for UnbindSubnetsFromNatGateway.
|
1462
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::UnbindSubnetsFromNatGatewayRequest`
|
1463
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::UnbindSubnetsFromNatGatewayResponse`
|
1464
|
+
def UnbindSubnetsFromNatGateway(request)
|
1465
|
+
body = send_request('UnbindSubnetsFromNatGateway', request.serialize)
|
1466
|
+
response = JSON.parse(body)
|
1467
|
+
if response['Response'].key?('Error') == false
|
1468
|
+
model = UnbindSubnetsFromNatGatewayResponse.new
|
1469
|
+
model.deserialize(response['Response'])
|
1470
|
+
model
|
1471
|
+
else
|
1472
|
+
code = response['Response']['Error']['Code']
|
1473
|
+
message = response['Response']['Error']['Message']
|
1474
|
+
reqid = response['Response']['RequestId']
|
1475
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1476
|
+
end
|
1477
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1478
|
+
raise e
|
1479
|
+
rescue StandardError => e
|
1480
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1481
|
+
end
|
1482
|
+
|
1483
|
+
# 升级NAT网关接口,可NAT网关修改为小型NAT网关、中型NAT网关、以及大型NAT网关
|
1484
|
+
|
1485
|
+
# @param request: Request instance for UpgradeNatGateway.
|
1486
|
+
# @type request: :class:`Tencentcloud::bmvpc::V20180625::UpgradeNatGatewayRequest`
|
1487
|
+
# @rtype: :class:`Tencentcloud::bmvpc::V20180625::UpgradeNatGatewayResponse`
|
1488
|
+
def UpgradeNatGateway(request)
|
1489
|
+
body = send_request('UpgradeNatGateway', request.serialize)
|
1490
|
+
response = JSON.parse(body)
|
1491
|
+
if response['Response'].key?('Error') == false
|
1492
|
+
model = UpgradeNatGatewayResponse.new
|
1493
|
+
model.deserialize(response['Response'])
|
1494
|
+
model
|
1495
|
+
else
|
1496
|
+
code = response['Response']['Error']['Code']
|
1497
|
+
message = response['Response']['Error']['Message']
|
1498
|
+
reqid = response['Response']['RequestId']
|
1499
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
1500
|
+
end
|
1501
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
1502
|
+
raise e
|
1503
|
+
rescue StandardError => e
|
1504
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
1505
|
+
end
|
1506
|
+
|
1507
|
+
|
1508
|
+
end
|
1509
|
+
end
|
1510
|
+
end
|
1511
|
+
end
|