tencentcloud-sdk-lighthouse 1.0.200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/VERSION +1 -0
- data/lib/tencentcloud-sdk-lighthouse.rb +11 -0
- data/lib/v20200324/client.rb +1386 -0
- data/lib/v20200324/models.rb +3616 -0
- metadata +66 -0
|
@@ -0,0 +1,1386 @@
|
|
|
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 Lighthouse
|
|
21
|
+
module V20200324
|
|
22
|
+
class Client < TencentCloud::Common::AbstractClient
|
|
23
|
+
|
|
24
|
+
def initialize(credential, region, profile = nil)
|
|
25
|
+
api_version = '2020-03-24'
|
|
26
|
+
api_endpoint = 'lighthouse.tencentcloudapi.com'
|
|
27
|
+
sdk_version = 'LIGHTHOUSE_' + File.read(File.expand_path('../VERSION', __dir__)).strip
|
|
28
|
+
super(credential, region, api_version, api_endpoint, sdk_version, profile)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# 本接口(ApplyInstanceSnapshot)用于回滚指定实例的系统盘快照。
|
|
33
|
+
# <li>仅支持回滚到原系统盘。</li>
|
|
34
|
+
# <li>用于回滚的快照必须处于 NORMAL 状态。快照状态可以通 DescribeSnapshots 接口查询,见输出参数中 SnapshotState 字段解释。</li>
|
|
35
|
+
# <li>回滚快照时,实例的状态必须为 STOPPED 或 RUNNING,可通过 DescribeInstances 接口查询实例状态。处于 RUNNING 状态的实例会强制关机,然后回滚快照。</li>
|
|
36
|
+
|
|
37
|
+
# @param request: Request instance for ApplyInstanceSnapshot.
|
|
38
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::ApplyInstanceSnapshotRequest`
|
|
39
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::ApplyInstanceSnapshotResponse`
|
|
40
|
+
def ApplyInstanceSnapshot(request)
|
|
41
|
+
body = send_request('ApplyInstanceSnapshot', request.serialize)
|
|
42
|
+
response = JSON.parse(body)
|
|
43
|
+
if response['Response'].key?('Error') == false
|
|
44
|
+
model = ApplyInstanceSnapshotResponse.new
|
|
45
|
+
model.deserialize(response['Response'])
|
|
46
|
+
model
|
|
47
|
+
else
|
|
48
|
+
code = response['Response']['Error']['Code']
|
|
49
|
+
message = response['Response']['Error']['Message']
|
|
50
|
+
reqid = response['Response']['RequestId']
|
|
51
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
52
|
+
end
|
|
53
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
54
|
+
raise e
|
|
55
|
+
rescue StandardError => e
|
|
56
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# 本接口(AssociateInstancesKeyPairs)用于绑定用户指定密钥对到实例。
|
|
60
|
+
# * 只支持 [RUNNING, STOPPED] 状态的 LINUX_UNIX 操作系统的实例。处于 RUNNING 状态的实例会强制关机,然后绑定。
|
|
61
|
+
# * 将密钥的公钥写入到实例的 SSH 配置当中,用户就可以通过该密钥的私钥来登录实例。
|
|
62
|
+
# * 如果实例原来绑定过密钥,那么原来的密钥将失效。
|
|
63
|
+
# * 如果实例原来是通过密码登录,绑定密钥后无法使用密码登录。
|
|
64
|
+
# * 支持批量操作。每次请求批量实例的上限为 100。如果批量实例存在不允许操作的实例,操作会以特定错误码返回。
|
|
65
|
+
# * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。
|
|
66
|
+
|
|
67
|
+
# @param request: Request instance for AssociateInstancesKeyPairs.
|
|
68
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::AssociateInstancesKeyPairsRequest`
|
|
69
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::AssociateInstancesKeyPairsResponse`
|
|
70
|
+
def AssociateInstancesKeyPairs(request)
|
|
71
|
+
body = send_request('AssociateInstancesKeyPairs', request.serialize)
|
|
72
|
+
response = JSON.parse(body)
|
|
73
|
+
if response['Response'].key?('Error') == false
|
|
74
|
+
model = AssociateInstancesKeyPairsResponse.new
|
|
75
|
+
model.deserialize(response['Response'])
|
|
76
|
+
model
|
|
77
|
+
else
|
|
78
|
+
code = response['Response']['Error']['Code']
|
|
79
|
+
message = response['Response']['Error']['Message']
|
|
80
|
+
reqid = response['Response']['RequestId']
|
|
81
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
82
|
+
end
|
|
83
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
84
|
+
raise e
|
|
85
|
+
rescue StandardError => e
|
|
86
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# 本接口 (AttachCcn) 用于建立与云联网的关联。
|
|
90
|
+
|
|
91
|
+
# @param request: Request instance for AttachCcn.
|
|
92
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::AttachCcnRequest`
|
|
93
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::AttachCcnResponse`
|
|
94
|
+
def AttachCcn(request)
|
|
95
|
+
body = send_request('AttachCcn', request.serialize)
|
|
96
|
+
response = JSON.parse(body)
|
|
97
|
+
if response['Response'].key?('Error') == false
|
|
98
|
+
model = AttachCcnResponse.new
|
|
99
|
+
model.deserialize(response['Response'])
|
|
100
|
+
model
|
|
101
|
+
else
|
|
102
|
+
code = response['Response']['Error']['Code']
|
|
103
|
+
message = response['Response']['Error']['Message']
|
|
104
|
+
reqid = response['Response']['RequestId']
|
|
105
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
106
|
+
end
|
|
107
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
108
|
+
raise e
|
|
109
|
+
rescue StandardError => e
|
|
110
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# 本接口 (CreateBlueprint) 用于创建镜像。
|
|
114
|
+
|
|
115
|
+
# @param request: Request instance for CreateBlueprint.
|
|
116
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::CreateBlueprintRequest`
|
|
117
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::CreateBlueprintResponse`
|
|
118
|
+
def CreateBlueprint(request)
|
|
119
|
+
body = send_request('CreateBlueprint', request.serialize)
|
|
120
|
+
response = JSON.parse(body)
|
|
121
|
+
if response['Response'].key?('Error') == false
|
|
122
|
+
model = CreateBlueprintResponse.new
|
|
123
|
+
model.deserialize(response['Response'])
|
|
124
|
+
model
|
|
125
|
+
else
|
|
126
|
+
code = response['Response']['Error']['Code']
|
|
127
|
+
message = response['Response']['Error']['Message']
|
|
128
|
+
reqid = response['Response']['RequestId']
|
|
129
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
130
|
+
end
|
|
131
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
132
|
+
raise e
|
|
133
|
+
rescue StandardError => e
|
|
134
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# 本接口(CreateFirewallRules)用于在实例上添加防火墙规则。
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
# * FirewallVersion 为防火墙版本号,用户每次更新防火墙规则版本会自动加1,防止您更新的规则已过期,不填不考虑冲突。
|
|
141
|
+
|
|
142
|
+
# 在 FirewallRules 参数中:
|
|
143
|
+
# * Protocol 字段支持输入 TCP,UDP,ICMP,ALL。
|
|
144
|
+
# * Port 字段允许输入 ALL,或者一个单独的端口号,或者用逗号分隔的离散端口号,或者用减号分隔的两个端口号代表的端口范围。当 Port 为范围时,减号分隔的第一个端口号小于第二个端口号。当 Protocol 字段不是 TCP 或 UDP 时,Port 字段只能为空或 ALL。Port 字段长度不得超过 64。
|
|
145
|
+
# * CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。租户之间网络隔离规则优先于防火墙中的内网规则。
|
|
146
|
+
# * Action 字段只允许输入 ACCEPT 或 DROP。
|
|
147
|
+
# * FirewallRuleDescription 字段长度不得超过 64。
|
|
148
|
+
|
|
149
|
+
# @param request: Request instance for CreateFirewallRules.
|
|
150
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::CreateFirewallRulesRequest`
|
|
151
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::CreateFirewallRulesResponse`
|
|
152
|
+
def CreateFirewallRules(request)
|
|
153
|
+
body = send_request('CreateFirewallRules', request.serialize)
|
|
154
|
+
response = JSON.parse(body)
|
|
155
|
+
if response['Response'].key?('Error') == false
|
|
156
|
+
model = CreateFirewallRulesResponse.new
|
|
157
|
+
model.deserialize(response['Response'])
|
|
158
|
+
model
|
|
159
|
+
else
|
|
160
|
+
code = response['Response']['Error']['Code']
|
|
161
|
+
message = response['Response']['Error']['Message']
|
|
162
|
+
reqid = response['Response']['RequestId']
|
|
163
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
164
|
+
end
|
|
165
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
166
|
+
raise e
|
|
167
|
+
rescue StandardError => e
|
|
168
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# 本接口(CreateInstanceSnapshot)用于创建指定实例的系统盘快照。
|
|
172
|
+
|
|
173
|
+
# @param request: Request instance for CreateInstanceSnapshot.
|
|
174
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::CreateInstanceSnapshotRequest`
|
|
175
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::CreateInstanceSnapshotResponse`
|
|
176
|
+
def CreateInstanceSnapshot(request)
|
|
177
|
+
body = send_request('CreateInstanceSnapshot', request.serialize)
|
|
178
|
+
response = JSON.parse(body)
|
|
179
|
+
if response['Response'].key?('Error') == false
|
|
180
|
+
model = CreateInstanceSnapshotResponse.new
|
|
181
|
+
model.deserialize(response['Response'])
|
|
182
|
+
model
|
|
183
|
+
else
|
|
184
|
+
code = response['Response']['Error']['Code']
|
|
185
|
+
message = response['Response']['Error']['Message']
|
|
186
|
+
reqid = response['Response']['RequestId']
|
|
187
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
188
|
+
end
|
|
189
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
190
|
+
raise e
|
|
191
|
+
rescue StandardError => e
|
|
192
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# 本接口(CreateKeyPair)用于创建一个密钥对。
|
|
196
|
+
|
|
197
|
+
# @param request: Request instance for CreateKeyPair.
|
|
198
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::CreateKeyPairRequest`
|
|
199
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::CreateKeyPairResponse`
|
|
200
|
+
def CreateKeyPair(request)
|
|
201
|
+
body = send_request('CreateKeyPair', request.serialize)
|
|
202
|
+
response = JSON.parse(body)
|
|
203
|
+
if response['Response'].key?('Error') == false
|
|
204
|
+
model = CreateKeyPairResponse.new
|
|
205
|
+
model.deserialize(response['Response'])
|
|
206
|
+
model
|
|
207
|
+
else
|
|
208
|
+
code = response['Response']['Error']['Code']
|
|
209
|
+
message = response['Response']['Error']['Message']
|
|
210
|
+
reqid = response['Response']['RequestId']
|
|
211
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
212
|
+
end
|
|
213
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
214
|
+
raise e
|
|
215
|
+
rescue StandardError => e
|
|
216
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# 本接口 (DeleteBlueprints) 用于删除镜像。
|
|
220
|
+
|
|
221
|
+
# @param request: Request instance for DeleteBlueprints.
|
|
222
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DeleteBlueprintsRequest`
|
|
223
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DeleteBlueprintsResponse`
|
|
224
|
+
def DeleteBlueprints(request)
|
|
225
|
+
body = send_request('DeleteBlueprints', request.serialize)
|
|
226
|
+
response = JSON.parse(body)
|
|
227
|
+
if response['Response'].key?('Error') == false
|
|
228
|
+
model = DeleteBlueprintsResponse.new
|
|
229
|
+
model.deserialize(response['Response'])
|
|
230
|
+
model
|
|
231
|
+
else
|
|
232
|
+
code = response['Response']['Error']['Code']
|
|
233
|
+
message = response['Response']['Error']['Message']
|
|
234
|
+
reqid = response['Response']['RequestId']
|
|
235
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
236
|
+
end
|
|
237
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
238
|
+
raise e
|
|
239
|
+
rescue StandardError => e
|
|
240
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# 本接口(DeleteFirewallRules)用于删除实例的防火墙规则。
|
|
244
|
+
|
|
245
|
+
# * FirewallVersion 用于指定要操作的防火墙的版本。传入 FirewallVersion 版本号若不等于当前防火墙的最新版本,将返回失败;若不传 FirewallVersion 则直接删除指定的规则。
|
|
246
|
+
|
|
247
|
+
# 在 FirewallRules 参数中:
|
|
248
|
+
# * Protocol 字段支持输入 TCP,UDP,ICMP,ALL。
|
|
249
|
+
# * Port 字段允许输入 ALL,或者一个单独的端口号,或者用逗号分隔的离散端口号,或者用减号分隔的两个端口号代表的端口范围。当 Port 为范围时,减号分隔的第一个端口号小于第二个端口号。当 Protocol 字段不是 TCP 或 UDP 时,Port 字段只能为空或 ALL。Port 字段长度不得超过 64。
|
|
250
|
+
# * CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。租户之间网络隔离规则优先于防火墙中的内网规则。
|
|
251
|
+
# * Action 字段只允许输入 ACCEPT 或 DROP。
|
|
252
|
+
# * FirewallRuleDescription 字段长度不得超过 64。
|
|
253
|
+
|
|
254
|
+
# @param request: Request instance for DeleteFirewallRules.
|
|
255
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DeleteFirewallRulesRequest`
|
|
256
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DeleteFirewallRulesResponse`
|
|
257
|
+
def DeleteFirewallRules(request)
|
|
258
|
+
body = send_request('DeleteFirewallRules', request.serialize)
|
|
259
|
+
response = JSON.parse(body)
|
|
260
|
+
if response['Response'].key?('Error') == false
|
|
261
|
+
model = DeleteFirewallRulesResponse.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
|
+
# 本接口(DeleteKeyPairs)用于删除密钥对。
|
|
277
|
+
|
|
278
|
+
# @param request: Request instance for DeleteKeyPairs.
|
|
279
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DeleteKeyPairsRequest`
|
|
280
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DeleteKeyPairsResponse`
|
|
281
|
+
def DeleteKeyPairs(request)
|
|
282
|
+
body = send_request('DeleteKeyPairs', request.serialize)
|
|
283
|
+
response = JSON.parse(body)
|
|
284
|
+
if response['Response'].key?('Error') == false
|
|
285
|
+
model = DeleteKeyPairsResponse.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
|
+
# 本接口(DeleteSnapshots)用于删除快照。
|
|
301
|
+
# 快照必须处于 NORMAL 状态,快照状态可以通过 DescribeSnapshots 接口查询,见输出参数中 SnapshotState 字段解释。
|
|
302
|
+
|
|
303
|
+
# @param request: Request instance for DeleteSnapshots.
|
|
304
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DeleteSnapshotsRequest`
|
|
305
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DeleteSnapshotsResponse`
|
|
306
|
+
def DeleteSnapshots(request)
|
|
307
|
+
body = send_request('DeleteSnapshots', request.serialize)
|
|
308
|
+
response = JSON.parse(body)
|
|
309
|
+
if response['Response'].key?('Error') == false
|
|
310
|
+
model = DeleteSnapshotsResponse.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
|
+
# 本接口(DescribeBlueprintInstances)用于查询镜像实例信息。
|
|
326
|
+
|
|
327
|
+
# @param request: Request instance for DescribeBlueprintInstances.
|
|
328
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeBlueprintInstancesRequest`
|
|
329
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeBlueprintInstancesResponse`
|
|
330
|
+
def DescribeBlueprintInstances(request)
|
|
331
|
+
body = send_request('DescribeBlueprintInstances', request.serialize)
|
|
332
|
+
response = JSON.parse(body)
|
|
333
|
+
if response['Response'].key?('Error') == false
|
|
334
|
+
model = DescribeBlueprintInstancesResponse.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
|
+
# 本接口(DescribeBlueprints)用于查询镜像信息。
|
|
350
|
+
|
|
351
|
+
# @param request: Request instance for DescribeBlueprints.
|
|
352
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeBlueprintsRequest`
|
|
353
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeBlueprintsResponse`
|
|
354
|
+
def DescribeBlueprints(request)
|
|
355
|
+
body = send_request('DescribeBlueprints', request.serialize)
|
|
356
|
+
response = JSON.parse(body)
|
|
357
|
+
if response['Response'].key?('Error') == false
|
|
358
|
+
model = DescribeBlueprintsResponse.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
|
+
# 本接口(DescribeBundleDiscount)用于查询套餐折扣信息。
|
|
374
|
+
|
|
375
|
+
# @param request: Request instance for DescribeBundleDiscount.
|
|
376
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeBundleDiscountRequest`
|
|
377
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeBundleDiscountResponse`
|
|
378
|
+
def DescribeBundleDiscount(request)
|
|
379
|
+
body = send_request('DescribeBundleDiscount', request.serialize)
|
|
380
|
+
response = JSON.parse(body)
|
|
381
|
+
if response['Response'].key?('Error') == false
|
|
382
|
+
model = DescribeBundleDiscountResponse.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
|
+
# 本接口(DescribeBundles)用于查询套餐信息。
|
|
398
|
+
|
|
399
|
+
# @param request: Request instance for DescribeBundles.
|
|
400
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeBundlesRequest`
|
|
401
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeBundlesResponse`
|
|
402
|
+
def DescribeBundles(request)
|
|
403
|
+
body = send_request('DescribeBundles', request.serialize)
|
|
404
|
+
response = JSON.parse(body)
|
|
405
|
+
if response['Response'].key?('Error') == false
|
|
406
|
+
model = DescribeBundlesResponse.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
|
+
# 本接口 (DescribeCcnAttachedInstances) 用于查询云联网关联的实例信息。
|
|
422
|
+
|
|
423
|
+
# @param request: Request instance for DescribeCcnAttachedInstances.
|
|
424
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeCcnAttachedInstancesRequest`
|
|
425
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeCcnAttachedInstancesResponse`
|
|
426
|
+
def DescribeCcnAttachedInstances(request)
|
|
427
|
+
body = send_request('DescribeCcnAttachedInstances', request.serialize)
|
|
428
|
+
response = JSON.parse(body)
|
|
429
|
+
if response['Response'].key?('Error') == false
|
|
430
|
+
model = DescribeCcnAttachedInstancesResponse.new
|
|
431
|
+
model.deserialize(response['Response'])
|
|
432
|
+
model
|
|
433
|
+
else
|
|
434
|
+
code = response['Response']['Error']['Code']
|
|
435
|
+
message = response['Response']['Error']['Message']
|
|
436
|
+
reqid = response['Response']['RequestId']
|
|
437
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
438
|
+
end
|
|
439
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
440
|
+
raise e
|
|
441
|
+
rescue StandardError => e
|
|
442
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
# 本接口(DescribeFirewallRules)用于查询实例的防火墙规则。
|
|
446
|
+
|
|
447
|
+
# @param request: Request instance for DescribeFirewallRules.
|
|
448
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeFirewallRulesRequest`
|
|
449
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeFirewallRulesResponse`
|
|
450
|
+
def DescribeFirewallRules(request)
|
|
451
|
+
body = send_request('DescribeFirewallRules', request.serialize)
|
|
452
|
+
response = JSON.parse(body)
|
|
453
|
+
if response['Response'].key?('Error') == false
|
|
454
|
+
model = DescribeFirewallRulesResponse.new
|
|
455
|
+
model.deserialize(response['Response'])
|
|
456
|
+
model
|
|
457
|
+
else
|
|
458
|
+
code = response['Response']['Error']['Code']
|
|
459
|
+
message = response['Response']['Error']['Message']
|
|
460
|
+
reqid = response['Response']['RequestId']
|
|
461
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
462
|
+
end
|
|
463
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
464
|
+
raise e
|
|
465
|
+
rescue StandardError => e
|
|
466
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
# 本接口(DescribeFirewallRulesTemplate)用于查询防火墙规则模版。
|
|
470
|
+
|
|
471
|
+
# @param request: Request instance for DescribeFirewallRulesTemplate.
|
|
472
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeFirewallRulesTemplateRequest`
|
|
473
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeFirewallRulesTemplateResponse`
|
|
474
|
+
def DescribeFirewallRulesTemplate(request)
|
|
475
|
+
body = send_request('DescribeFirewallRulesTemplate', request.serialize)
|
|
476
|
+
response = JSON.parse(body)
|
|
477
|
+
if response['Response'].key?('Error') == false
|
|
478
|
+
model = DescribeFirewallRulesTemplateResponse.new
|
|
479
|
+
model.deserialize(response['Response'])
|
|
480
|
+
model
|
|
481
|
+
else
|
|
482
|
+
code = response['Response']['Error']['Code']
|
|
483
|
+
message = response['Response']['Error']['Message']
|
|
484
|
+
reqid = response['Response']['RequestId']
|
|
485
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
486
|
+
end
|
|
487
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
488
|
+
raise e
|
|
489
|
+
rescue StandardError => e
|
|
490
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
# 本接口(DescribeGeneralResourceQuotas)用于查询通用资源配额信息。
|
|
494
|
+
|
|
495
|
+
# @param request: Request instance for DescribeGeneralResourceQuotas.
|
|
496
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeGeneralResourceQuotasRequest`
|
|
497
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeGeneralResourceQuotasResponse`
|
|
498
|
+
def DescribeGeneralResourceQuotas(request)
|
|
499
|
+
body = send_request('DescribeGeneralResourceQuotas', request.serialize)
|
|
500
|
+
response = JSON.parse(body)
|
|
501
|
+
if response['Response'].key?('Error') == false
|
|
502
|
+
model = DescribeGeneralResourceQuotasResponse.new
|
|
503
|
+
model.deserialize(response['Response'])
|
|
504
|
+
model
|
|
505
|
+
else
|
|
506
|
+
code = response['Response']['Error']['Code']
|
|
507
|
+
message = response['Response']['Error']['Message']
|
|
508
|
+
reqid = response['Response']['RequestId']
|
|
509
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
510
|
+
end
|
|
511
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
512
|
+
raise e
|
|
513
|
+
rescue StandardError => e
|
|
514
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
515
|
+
end
|
|
516
|
+
|
|
517
|
+
# 本接口用于查询实例默认登录密钥属性。
|
|
518
|
+
|
|
519
|
+
# @param request: Request instance for DescribeInstanceLoginKeyPairAttribute.
|
|
520
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeInstanceLoginKeyPairAttributeRequest`
|
|
521
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeInstanceLoginKeyPairAttributeResponse`
|
|
522
|
+
def DescribeInstanceLoginKeyPairAttribute(request)
|
|
523
|
+
body = send_request('DescribeInstanceLoginKeyPairAttribute', request.serialize)
|
|
524
|
+
response = JSON.parse(body)
|
|
525
|
+
if response['Response'].key?('Error') == false
|
|
526
|
+
model = DescribeInstanceLoginKeyPairAttributeResponse.new
|
|
527
|
+
model.deserialize(response['Response'])
|
|
528
|
+
model
|
|
529
|
+
else
|
|
530
|
+
code = response['Response']['Error']['Code']
|
|
531
|
+
message = response['Response']['Error']['Message']
|
|
532
|
+
reqid = response['Response']['RequestId']
|
|
533
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
534
|
+
end
|
|
535
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
536
|
+
raise e
|
|
537
|
+
rescue StandardError => e
|
|
538
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
# 本接口(DescribeInstanceVncUrl)用于查询实例管理终端地址,获取的地址可用于实例的 VNC 登录。
|
|
542
|
+
|
|
543
|
+
# * 处于 RUNNING 状态的机器可使用此功能。
|
|
544
|
+
# * 管理终端地址的有效期为 15 秒,调用接口成功后如果 15 秒内不使用该链接进行访问,管理终端地址自动失效,您需要重新查询。
|
|
545
|
+
# * 管理终端地址一旦被访问,将自动失效,您需要重新查询。
|
|
546
|
+
# * 如果连接断开,每分钟内重新连接的次数不能超过 30 次。
|
|
547
|
+
|
|
548
|
+
# @param request: Request instance for DescribeInstanceVncUrl.
|
|
549
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeInstanceVncUrlRequest`
|
|
550
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeInstanceVncUrlResponse`
|
|
551
|
+
def DescribeInstanceVncUrl(request)
|
|
552
|
+
body = send_request('DescribeInstanceVncUrl', request.serialize)
|
|
553
|
+
response = JSON.parse(body)
|
|
554
|
+
if response['Response'].key?('Error') == false
|
|
555
|
+
model = DescribeInstanceVncUrlResponse.new
|
|
556
|
+
model.deserialize(response['Response'])
|
|
557
|
+
model
|
|
558
|
+
else
|
|
559
|
+
code = response['Response']['Error']['Code']
|
|
560
|
+
message = response['Response']['Error']['Message']
|
|
561
|
+
reqid = response['Response']['RequestId']
|
|
562
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
563
|
+
end
|
|
564
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
565
|
+
raise e
|
|
566
|
+
rescue StandardError => e
|
|
567
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
568
|
+
end
|
|
569
|
+
|
|
570
|
+
# 本接口(DescribeInstances)用于查询一个或多个实例的详细信息。
|
|
571
|
+
|
|
572
|
+
# * 可以根据实例 ID、实例名称或者实例的内网 IP 查询实例的详细信息。
|
|
573
|
+
# * 过滤信息详细请见过滤器 [Filters](https://cloud.tencent.com/document/product/1207/47576#Filter) 。
|
|
574
|
+
# * 如果参数为空,返回当前用户一定数量(Limit 所指定的数量,默认为 20)的实例。
|
|
575
|
+
# * 支持查询实例的最新操作(LatestOperation)以及最新操作状态(LatestOperationState)。
|
|
576
|
+
|
|
577
|
+
# @param request: Request instance for DescribeInstances.
|
|
578
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeInstancesRequest`
|
|
579
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeInstancesResponse`
|
|
580
|
+
def DescribeInstances(request)
|
|
581
|
+
body = send_request('DescribeInstances', request.serialize)
|
|
582
|
+
response = JSON.parse(body)
|
|
583
|
+
if response['Response'].key?('Error') == false
|
|
584
|
+
model = DescribeInstancesResponse.new
|
|
585
|
+
model.deserialize(response['Response'])
|
|
586
|
+
model
|
|
587
|
+
else
|
|
588
|
+
code = response['Response']['Error']['Code']
|
|
589
|
+
message = response['Response']['Error']['Message']
|
|
590
|
+
reqid = response['Response']['RequestId']
|
|
591
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
592
|
+
end
|
|
593
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
594
|
+
raise e
|
|
595
|
+
rescue StandardError => e
|
|
596
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
597
|
+
end
|
|
598
|
+
|
|
599
|
+
# 本接口(DescribeInstancesDeniedActions)用于查询一个或多个实例的操作限制列表信息。
|
|
600
|
+
|
|
601
|
+
# @param request: Request instance for DescribeInstancesDeniedActions.
|
|
602
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeInstancesDeniedActionsRequest`
|
|
603
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeInstancesDeniedActionsResponse`
|
|
604
|
+
def DescribeInstancesDeniedActions(request)
|
|
605
|
+
body = send_request('DescribeInstancesDeniedActions', request.serialize)
|
|
606
|
+
response = JSON.parse(body)
|
|
607
|
+
if response['Response'].key?('Error') == false
|
|
608
|
+
model = DescribeInstancesDeniedActionsResponse.new
|
|
609
|
+
model.deserialize(response['Response'])
|
|
610
|
+
model
|
|
611
|
+
else
|
|
612
|
+
code = response['Response']['Error']['Code']
|
|
613
|
+
message = response['Response']['Error']['Message']
|
|
614
|
+
reqid = response['Response']['RequestId']
|
|
615
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
616
|
+
end
|
|
617
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
618
|
+
raise e
|
|
619
|
+
rescue StandardError => e
|
|
620
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
621
|
+
end
|
|
622
|
+
|
|
623
|
+
# 本接口(DescribeInstancesReturnable)用于查询实例是否可退还。
|
|
624
|
+
|
|
625
|
+
# @param request: Request instance for DescribeInstancesReturnable.
|
|
626
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeInstancesReturnableRequest`
|
|
627
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeInstancesReturnableResponse`
|
|
628
|
+
def DescribeInstancesReturnable(request)
|
|
629
|
+
body = send_request('DescribeInstancesReturnable', request.serialize)
|
|
630
|
+
response = JSON.parse(body)
|
|
631
|
+
if response['Response'].key?('Error') == false
|
|
632
|
+
model = DescribeInstancesReturnableResponse.new
|
|
633
|
+
model.deserialize(response['Response'])
|
|
634
|
+
model
|
|
635
|
+
else
|
|
636
|
+
code = response['Response']['Error']['Code']
|
|
637
|
+
message = response['Response']['Error']['Message']
|
|
638
|
+
reqid = response['Response']['RequestId']
|
|
639
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
640
|
+
end
|
|
641
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
642
|
+
raise e
|
|
643
|
+
rescue StandardError => e
|
|
644
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
645
|
+
end
|
|
646
|
+
|
|
647
|
+
# 本接口(DescribeInstancesTrafficPackages)用于查询一个或多个实例的流量包详情。
|
|
648
|
+
|
|
649
|
+
# @param request: Request instance for DescribeInstancesTrafficPackages.
|
|
650
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeInstancesTrafficPackagesRequest`
|
|
651
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeInstancesTrafficPackagesResponse`
|
|
652
|
+
def DescribeInstancesTrafficPackages(request)
|
|
653
|
+
body = send_request('DescribeInstancesTrafficPackages', request.serialize)
|
|
654
|
+
response = JSON.parse(body)
|
|
655
|
+
if response['Response'].key?('Error') == false
|
|
656
|
+
model = DescribeInstancesTrafficPackagesResponse.new
|
|
657
|
+
model.deserialize(response['Response'])
|
|
658
|
+
model
|
|
659
|
+
else
|
|
660
|
+
code = response['Response']['Error']['Code']
|
|
661
|
+
message = response['Response']['Error']['Message']
|
|
662
|
+
reqid = response['Response']['RequestId']
|
|
663
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
664
|
+
end
|
|
665
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
666
|
+
raise e
|
|
667
|
+
rescue StandardError => e
|
|
668
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
669
|
+
end
|
|
670
|
+
|
|
671
|
+
# 本接口 (DescribeKeyPairs) 用于查询用户密钥对信息。
|
|
672
|
+
|
|
673
|
+
# @param request: Request instance for DescribeKeyPairs.
|
|
674
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeKeyPairsRequest`
|
|
675
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeKeyPairsResponse`
|
|
676
|
+
def DescribeKeyPairs(request)
|
|
677
|
+
body = send_request('DescribeKeyPairs', request.serialize)
|
|
678
|
+
response = JSON.parse(body)
|
|
679
|
+
if response['Response'].key?('Error') == false
|
|
680
|
+
model = DescribeKeyPairsResponse.new
|
|
681
|
+
model.deserialize(response['Response'])
|
|
682
|
+
model
|
|
683
|
+
else
|
|
684
|
+
code = response['Response']['Error']['Code']
|
|
685
|
+
message = response['Response']['Error']['Message']
|
|
686
|
+
reqid = response['Response']['RequestId']
|
|
687
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
688
|
+
end
|
|
689
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
690
|
+
raise e
|
|
691
|
+
rescue StandardError => e
|
|
692
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
693
|
+
end
|
|
694
|
+
|
|
695
|
+
# 本接口(DescribeModifyInstanceBundles)用于查询实例可变更套餐列表。
|
|
696
|
+
|
|
697
|
+
# @param request: Request instance for DescribeModifyInstanceBundles.
|
|
698
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeModifyInstanceBundlesRequest`
|
|
699
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeModifyInstanceBundlesResponse`
|
|
700
|
+
def DescribeModifyInstanceBundles(request)
|
|
701
|
+
body = send_request('DescribeModifyInstanceBundles', request.serialize)
|
|
702
|
+
response = JSON.parse(body)
|
|
703
|
+
if response['Response'].key?('Error') == false
|
|
704
|
+
model = DescribeModifyInstanceBundlesResponse.new
|
|
705
|
+
model.deserialize(response['Response'])
|
|
706
|
+
model
|
|
707
|
+
else
|
|
708
|
+
code = response['Response']['Error']['Code']
|
|
709
|
+
message = response['Response']['Error']['Message']
|
|
710
|
+
reqid = response['Response']['RequestId']
|
|
711
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
712
|
+
end
|
|
713
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
714
|
+
raise e
|
|
715
|
+
rescue StandardError => e
|
|
716
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
717
|
+
end
|
|
718
|
+
|
|
719
|
+
# 本接口(DescribeRegions)用于查询地域信息。
|
|
720
|
+
|
|
721
|
+
# @param request: Request instance for DescribeRegions.
|
|
722
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeRegionsRequest`
|
|
723
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeRegionsResponse`
|
|
724
|
+
def DescribeRegions(request)
|
|
725
|
+
body = send_request('DescribeRegions', request.serialize)
|
|
726
|
+
response = JSON.parse(body)
|
|
727
|
+
if response['Response'].key?('Error') == false
|
|
728
|
+
model = DescribeRegionsResponse.new
|
|
729
|
+
model.deserialize(response['Response'])
|
|
730
|
+
model
|
|
731
|
+
else
|
|
732
|
+
code = response['Response']['Error']['Code']
|
|
733
|
+
message = response['Response']['Error']['Message']
|
|
734
|
+
reqid = response['Response']['RequestId']
|
|
735
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
736
|
+
end
|
|
737
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
738
|
+
raise e
|
|
739
|
+
rescue StandardError => e
|
|
740
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
741
|
+
end
|
|
742
|
+
|
|
743
|
+
# 本接口(DescribeResetInstanceBlueprints)查询重置实例的镜像信息。
|
|
744
|
+
|
|
745
|
+
# @param request: Request instance for DescribeResetInstanceBlueprints.
|
|
746
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeResetInstanceBlueprintsRequest`
|
|
747
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeResetInstanceBlueprintsResponse`
|
|
748
|
+
def DescribeResetInstanceBlueprints(request)
|
|
749
|
+
body = send_request('DescribeResetInstanceBlueprints', request.serialize)
|
|
750
|
+
response = JSON.parse(body)
|
|
751
|
+
if response['Response'].key?('Error') == false
|
|
752
|
+
model = DescribeResetInstanceBlueprintsResponse.new
|
|
753
|
+
model.deserialize(response['Response'])
|
|
754
|
+
model
|
|
755
|
+
else
|
|
756
|
+
code = response['Response']['Error']['Code']
|
|
757
|
+
message = response['Response']['Error']['Message']
|
|
758
|
+
reqid = response['Response']['RequestId']
|
|
759
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
760
|
+
end
|
|
761
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
762
|
+
raise e
|
|
763
|
+
rescue StandardError => e
|
|
764
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
765
|
+
end
|
|
766
|
+
|
|
767
|
+
# 本接口(DescribeSnapshots)用于查询快照的详细信息。
|
|
768
|
+
|
|
769
|
+
# @param request: Request instance for DescribeSnapshots.
|
|
770
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeSnapshotsRequest`
|
|
771
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeSnapshotsResponse`
|
|
772
|
+
def DescribeSnapshots(request)
|
|
773
|
+
body = send_request('DescribeSnapshots', request.serialize)
|
|
774
|
+
response = JSON.parse(body)
|
|
775
|
+
if response['Response'].key?('Error') == false
|
|
776
|
+
model = DescribeSnapshotsResponse.new
|
|
777
|
+
model.deserialize(response['Response'])
|
|
778
|
+
model
|
|
779
|
+
else
|
|
780
|
+
code = response['Response']['Error']['Code']
|
|
781
|
+
message = response['Response']['Error']['Message']
|
|
782
|
+
reqid = response['Response']['RequestId']
|
|
783
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
784
|
+
end
|
|
785
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
786
|
+
raise e
|
|
787
|
+
rescue StandardError => e
|
|
788
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
789
|
+
end
|
|
790
|
+
|
|
791
|
+
# 本接口(DescribeSnapshotsDeniedActions)用于查询一个或多个快照的操作限制列表信息。
|
|
792
|
+
|
|
793
|
+
# @param request: Request instance for DescribeSnapshotsDeniedActions.
|
|
794
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeSnapshotsDeniedActionsRequest`
|
|
795
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeSnapshotsDeniedActionsResponse`
|
|
796
|
+
def DescribeSnapshotsDeniedActions(request)
|
|
797
|
+
body = send_request('DescribeSnapshotsDeniedActions', request.serialize)
|
|
798
|
+
response = JSON.parse(body)
|
|
799
|
+
if response['Response'].key?('Error') == false
|
|
800
|
+
model = DescribeSnapshotsDeniedActionsResponse.new
|
|
801
|
+
model.deserialize(response['Response'])
|
|
802
|
+
model
|
|
803
|
+
else
|
|
804
|
+
code = response['Response']['Error']['Code']
|
|
805
|
+
message = response['Response']['Error']['Message']
|
|
806
|
+
reqid = response['Response']['RequestId']
|
|
807
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
808
|
+
end
|
|
809
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
810
|
+
raise e
|
|
811
|
+
rescue StandardError => e
|
|
812
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
813
|
+
end
|
|
814
|
+
|
|
815
|
+
# 查询地域下可用区
|
|
816
|
+
|
|
817
|
+
# @param request: Request instance for DescribeZones.
|
|
818
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DescribeZonesRequest`
|
|
819
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DescribeZonesResponse`
|
|
820
|
+
def DescribeZones(request)
|
|
821
|
+
body = send_request('DescribeZones', request.serialize)
|
|
822
|
+
response = JSON.parse(body)
|
|
823
|
+
if response['Response'].key?('Error') == false
|
|
824
|
+
model = DescribeZonesResponse.new
|
|
825
|
+
model.deserialize(response['Response'])
|
|
826
|
+
model
|
|
827
|
+
else
|
|
828
|
+
code = response['Response']['Error']['Code']
|
|
829
|
+
message = response['Response']['Error']['Message']
|
|
830
|
+
reqid = response['Response']['RequestId']
|
|
831
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
832
|
+
end
|
|
833
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
834
|
+
raise e
|
|
835
|
+
rescue StandardError => e
|
|
836
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
837
|
+
end
|
|
838
|
+
|
|
839
|
+
# 本接口 (AttachCcn) 用于解除与云联网的关联。
|
|
840
|
+
|
|
841
|
+
# @param request: Request instance for DetachCcn.
|
|
842
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DetachCcnRequest`
|
|
843
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DetachCcnResponse`
|
|
844
|
+
def DetachCcn(request)
|
|
845
|
+
body = send_request('DetachCcn', request.serialize)
|
|
846
|
+
response = JSON.parse(body)
|
|
847
|
+
if response['Response'].key?('Error') == false
|
|
848
|
+
model = DetachCcnResponse.new
|
|
849
|
+
model.deserialize(response['Response'])
|
|
850
|
+
model
|
|
851
|
+
else
|
|
852
|
+
code = response['Response']['Error']['Code']
|
|
853
|
+
message = response['Response']['Error']['Message']
|
|
854
|
+
reqid = response['Response']['RequestId']
|
|
855
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
856
|
+
end
|
|
857
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
858
|
+
raise e
|
|
859
|
+
rescue StandardError => e
|
|
860
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
861
|
+
end
|
|
862
|
+
|
|
863
|
+
# 本接口(DisassociateInstancesKeyPairs)用于解除实例与指定密钥对的绑定关系。
|
|
864
|
+
|
|
865
|
+
# * 只支持 [RUNNING, STOPPED] 状态的 LINUX_UNIX 操作系统的实例。处于 RUNNING 状态的实例会强制关机,然后解绑。
|
|
866
|
+
# * 解绑密钥后,实例可以通过原来设置的密码登录。
|
|
867
|
+
# * 如果原来没有设置密码,解绑后将无法使用 SSH 登录。可以调用 ResetInstancesPassword 接口来设置登录密码。
|
|
868
|
+
# * 支持批量操作。每次请求批量实例的上限为 100。
|
|
869
|
+
# * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。
|
|
870
|
+
|
|
871
|
+
# @param request: Request instance for DisassociateInstancesKeyPairs.
|
|
872
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::DisassociateInstancesKeyPairsRequest`
|
|
873
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::DisassociateInstancesKeyPairsResponse`
|
|
874
|
+
def DisassociateInstancesKeyPairs(request)
|
|
875
|
+
body = send_request('DisassociateInstancesKeyPairs', request.serialize)
|
|
876
|
+
response = JSON.parse(body)
|
|
877
|
+
if response['Response'].key?('Error') == false
|
|
878
|
+
model = DisassociateInstancesKeyPairsResponse.new
|
|
879
|
+
model.deserialize(response['Response'])
|
|
880
|
+
model
|
|
881
|
+
else
|
|
882
|
+
code = response['Response']['Error']['Code']
|
|
883
|
+
message = response['Response']['Error']['Message']
|
|
884
|
+
reqid = response['Response']['RequestId']
|
|
885
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
886
|
+
end
|
|
887
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
888
|
+
raise e
|
|
889
|
+
rescue StandardError => e
|
|
890
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
891
|
+
end
|
|
892
|
+
|
|
893
|
+
# 本接口(ImportKeyPair)用于导入用户指定密钥对。
|
|
894
|
+
|
|
895
|
+
# @param request: Request instance for ImportKeyPair.
|
|
896
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::ImportKeyPairRequest`
|
|
897
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::ImportKeyPairResponse`
|
|
898
|
+
def ImportKeyPair(request)
|
|
899
|
+
body = send_request('ImportKeyPair', request.serialize)
|
|
900
|
+
response = JSON.parse(body)
|
|
901
|
+
if response['Response'].key?('Error') == false
|
|
902
|
+
model = ImportKeyPairResponse.new
|
|
903
|
+
model.deserialize(response['Response'])
|
|
904
|
+
model
|
|
905
|
+
else
|
|
906
|
+
code = response['Response']['Error']['Code']
|
|
907
|
+
message = response['Response']['Error']['Message']
|
|
908
|
+
reqid = response['Response']['RequestId']
|
|
909
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
910
|
+
end
|
|
911
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
912
|
+
raise e
|
|
913
|
+
rescue StandardError => e
|
|
914
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
915
|
+
end
|
|
916
|
+
|
|
917
|
+
# 本接口 (InquirePriceCreateBlueprint) 用于创建镜像询价。
|
|
918
|
+
|
|
919
|
+
# @param request: Request instance for InquirePriceCreateBlueprint.
|
|
920
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::InquirePriceCreateBlueprintRequest`
|
|
921
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::InquirePriceCreateBlueprintResponse`
|
|
922
|
+
def InquirePriceCreateBlueprint(request)
|
|
923
|
+
body = send_request('InquirePriceCreateBlueprint', request.serialize)
|
|
924
|
+
response = JSON.parse(body)
|
|
925
|
+
if response['Response'].key?('Error') == false
|
|
926
|
+
model = InquirePriceCreateBlueprintResponse.new
|
|
927
|
+
model.deserialize(response['Response'])
|
|
928
|
+
model
|
|
929
|
+
else
|
|
930
|
+
code = response['Response']['Error']['Code']
|
|
931
|
+
message = response['Response']['Error']['Message']
|
|
932
|
+
reqid = response['Response']['RequestId']
|
|
933
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
934
|
+
end
|
|
935
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
936
|
+
raise e
|
|
937
|
+
rescue StandardError => e
|
|
938
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
939
|
+
end
|
|
940
|
+
|
|
941
|
+
# 本接口(InquiryPriceCreateInstances)用于创建实例询价。
|
|
942
|
+
|
|
943
|
+
# @param request: Request instance for InquirePriceCreateInstances.
|
|
944
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::InquirePriceCreateInstancesRequest`
|
|
945
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::InquirePriceCreateInstancesResponse`
|
|
946
|
+
def InquirePriceCreateInstances(request)
|
|
947
|
+
body = send_request('InquirePriceCreateInstances', request.serialize)
|
|
948
|
+
response = JSON.parse(body)
|
|
949
|
+
if response['Response'].key?('Error') == false
|
|
950
|
+
model = InquirePriceCreateInstancesResponse.new
|
|
951
|
+
model.deserialize(response['Response'])
|
|
952
|
+
model
|
|
953
|
+
else
|
|
954
|
+
code = response['Response']['Error']['Code']
|
|
955
|
+
message = response['Response']['Error']['Message']
|
|
956
|
+
reqid = response['Response']['RequestId']
|
|
957
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
958
|
+
end
|
|
959
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
960
|
+
raise e
|
|
961
|
+
rescue StandardError => e
|
|
962
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
963
|
+
end
|
|
964
|
+
|
|
965
|
+
# 本接口(InquirePriceCreateInstances)用于续费实例询价。
|
|
966
|
+
|
|
967
|
+
# @param request: Request instance for InquirePriceRenewInstances.
|
|
968
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::InquirePriceRenewInstancesRequest`
|
|
969
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::InquirePriceRenewInstancesResponse`
|
|
970
|
+
def InquirePriceRenewInstances(request)
|
|
971
|
+
body = send_request('InquirePriceRenewInstances', request.serialize)
|
|
972
|
+
response = JSON.parse(body)
|
|
973
|
+
if response['Response'].key?('Error') == false
|
|
974
|
+
model = InquirePriceRenewInstancesResponse.new
|
|
975
|
+
model.deserialize(response['Response'])
|
|
976
|
+
model
|
|
977
|
+
else
|
|
978
|
+
code = response['Response']['Error']['Code']
|
|
979
|
+
message = response['Response']['Error']['Message']
|
|
980
|
+
reqid = response['Response']['RequestId']
|
|
981
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
982
|
+
end
|
|
983
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
984
|
+
raise e
|
|
985
|
+
rescue StandardError => e
|
|
986
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
987
|
+
end
|
|
988
|
+
|
|
989
|
+
# 本接口 (ModifyBlueprintAttribute) 用于修改镜像属性。
|
|
990
|
+
|
|
991
|
+
# @param request: Request instance for ModifyBlueprintAttribute.
|
|
992
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::ModifyBlueprintAttributeRequest`
|
|
993
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::ModifyBlueprintAttributeResponse`
|
|
994
|
+
def ModifyBlueprintAttribute(request)
|
|
995
|
+
body = send_request('ModifyBlueprintAttribute', request.serialize)
|
|
996
|
+
response = JSON.parse(body)
|
|
997
|
+
if response['Response'].key?('Error') == false
|
|
998
|
+
model = ModifyBlueprintAttributeResponse.new
|
|
999
|
+
model.deserialize(response['Response'])
|
|
1000
|
+
model
|
|
1001
|
+
else
|
|
1002
|
+
code = response['Response']['Error']['Code']
|
|
1003
|
+
message = response['Response']['Error']['Message']
|
|
1004
|
+
reqid = response['Response']['RequestId']
|
|
1005
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1006
|
+
end
|
|
1007
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1008
|
+
raise e
|
|
1009
|
+
rescue StandardError => e
|
|
1010
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1011
|
+
end
|
|
1012
|
+
|
|
1013
|
+
# 本接口(ModifyFirewallRuleDescription)用于修改单条防火墙规则描述。
|
|
1014
|
+
|
|
1015
|
+
# * FirewallVersion 用于指定要操作的防火墙的版本。传入 FirewallVersion 版本号若不等于当前防火墙的最新版本,将返回失败;若不传 FirewallVersion 则直接修改防火墙规则备注。
|
|
1016
|
+
|
|
1017
|
+
# 在 FirewallRule 参数中:
|
|
1018
|
+
# * Protocol 字段支持输入 TCP,UDP,ICMP,ALL。
|
|
1019
|
+
# * Port 字段允许输入 ALL,或者一个单独的端口号,或者用逗号分隔的离散端口号,或者用减号分隔的两个端口号代表的端口范围。当 Port 为范围时,减号分隔的第一个端口号小于第二个端口号。当 Protocol 字段不是 TCP 或 UDP 时,Port 字段只能为空或 ALL。Port 字段长度不得超过 64。
|
|
1020
|
+
# * CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。租户之间网络隔离规则优先于防火墙中的内网规则。
|
|
1021
|
+
# * Action 字段只允许输入 ACCEPT 或 DROP。
|
|
1022
|
+
# * FirewallRuleDescription 字段长度不得超过 64。
|
|
1023
|
+
|
|
1024
|
+
# @param request: Request instance for ModifyFirewallRuleDescription.
|
|
1025
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::ModifyFirewallRuleDescriptionRequest`
|
|
1026
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::ModifyFirewallRuleDescriptionResponse`
|
|
1027
|
+
def ModifyFirewallRuleDescription(request)
|
|
1028
|
+
body = send_request('ModifyFirewallRuleDescription', request.serialize)
|
|
1029
|
+
response = JSON.parse(body)
|
|
1030
|
+
if response['Response'].key?('Error') == false
|
|
1031
|
+
model = ModifyFirewallRuleDescriptionResponse.new
|
|
1032
|
+
model.deserialize(response['Response'])
|
|
1033
|
+
model
|
|
1034
|
+
else
|
|
1035
|
+
code = response['Response']['Error']['Code']
|
|
1036
|
+
message = response['Response']['Error']['Message']
|
|
1037
|
+
reqid = response['Response']['RequestId']
|
|
1038
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1039
|
+
end
|
|
1040
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1041
|
+
raise e
|
|
1042
|
+
rescue StandardError => e
|
|
1043
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1044
|
+
end
|
|
1045
|
+
|
|
1046
|
+
# 本接口(ModifyFirewallRules)用于重置实例防火墙规则。
|
|
1047
|
+
|
|
1048
|
+
# 本接口先删除当前实例的所有防火墙规则,然后添加新的规则。
|
|
1049
|
+
|
|
1050
|
+
# * FirewallVersion 用于指定要操作的防火墙的版本。传入 FirewallVersion 版本号若不等于当前防火墙的最新版本,将返回失败;若不传 FirewallVersion 则直接重置防火墙规则。
|
|
1051
|
+
|
|
1052
|
+
# 在 FirewallRules 参数中:
|
|
1053
|
+
# * Protocol 字段支持输入 TCP,UDP,ICMP,ALL。
|
|
1054
|
+
# * Port 字段允许输入 ALL,或者一个单独的端口号,或者用逗号分隔的离散端口号,或者用减号分隔的两个端口号代表的端口范围。当 Port 为范围时,减号分隔的第一个端口号小于第二个端口号。当 Protocol 字段不是 TCP 或 UDP 时,Port 字段只能为空或 ALL。Port 字段长度不得超过 64。
|
|
1055
|
+
# * CidrBlock 字段允许输入符合 cidr 格式标准的任意字符串。租户之间网络隔离规则优先于防火墙中的内网规则。
|
|
1056
|
+
# * Action 字段只允许输入 ACCEPT 或 DROP。
|
|
1057
|
+
# * FirewallRuleDescription 字段长度不得超过 64。
|
|
1058
|
+
|
|
1059
|
+
# @param request: Request instance for ModifyFirewallRules.
|
|
1060
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::ModifyFirewallRulesRequest`
|
|
1061
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::ModifyFirewallRulesResponse`
|
|
1062
|
+
def ModifyFirewallRules(request)
|
|
1063
|
+
body = send_request('ModifyFirewallRules', request.serialize)
|
|
1064
|
+
response = JSON.parse(body)
|
|
1065
|
+
if response['Response'].key?('Error') == false
|
|
1066
|
+
model = ModifyFirewallRulesResponse.new
|
|
1067
|
+
model.deserialize(response['Response'])
|
|
1068
|
+
model
|
|
1069
|
+
else
|
|
1070
|
+
code = response['Response']['Error']['Code']
|
|
1071
|
+
message = response['Response']['Error']['Message']
|
|
1072
|
+
reqid = response['Response']['RequestId']
|
|
1073
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1074
|
+
end
|
|
1075
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1076
|
+
raise e
|
|
1077
|
+
rescue StandardError => e
|
|
1078
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1079
|
+
end
|
|
1080
|
+
|
|
1081
|
+
# 本接口(ModifyInstancesAttribute)用于修改实例的属性。
|
|
1082
|
+
# * “实例名称”仅为方便用户自己管理之用。
|
|
1083
|
+
# * 支持批量操作。每次请求批量实例的上限为 100。
|
|
1084
|
+
# * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。
|
|
1085
|
+
|
|
1086
|
+
# @param request: Request instance for ModifyInstancesAttribute.
|
|
1087
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::ModifyInstancesAttributeRequest`
|
|
1088
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::ModifyInstancesAttributeResponse`
|
|
1089
|
+
def ModifyInstancesAttribute(request)
|
|
1090
|
+
body = send_request('ModifyInstancesAttribute', request.serialize)
|
|
1091
|
+
response = JSON.parse(body)
|
|
1092
|
+
if response['Response'].key?('Error') == false
|
|
1093
|
+
model = ModifyInstancesAttributeResponse.new
|
|
1094
|
+
model.deserialize(response['Response'])
|
|
1095
|
+
model
|
|
1096
|
+
else
|
|
1097
|
+
code = response['Response']['Error']['Code']
|
|
1098
|
+
message = response['Response']['Error']['Message']
|
|
1099
|
+
reqid = response['Response']['RequestId']
|
|
1100
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1101
|
+
end
|
|
1102
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1103
|
+
raise e
|
|
1104
|
+
rescue StandardError => e
|
|
1105
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1106
|
+
end
|
|
1107
|
+
|
|
1108
|
+
# 本接口用于设置实例默认登录密钥对属性。
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
# @param request: Request instance for ModifyInstancesLoginKeyPairAttribute.
|
|
1112
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::ModifyInstancesLoginKeyPairAttributeRequest`
|
|
1113
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::ModifyInstancesLoginKeyPairAttributeResponse`
|
|
1114
|
+
def ModifyInstancesLoginKeyPairAttribute(request)
|
|
1115
|
+
body = send_request('ModifyInstancesLoginKeyPairAttribute', request.serialize)
|
|
1116
|
+
response = JSON.parse(body)
|
|
1117
|
+
if response['Response'].key?('Error') == false
|
|
1118
|
+
model = ModifyInstancesLoginKeyPairAttributeResponse.new
|
|
1119
|
+
model.deserialize(response['Response'])
|
|
1120
|
+
model
|
|
1121
|
+
else
|
|
1122
|
+
code = response['Response']['Error']['Code']
|
|
1123
|
+
message = response['Response']['Error']['Message']
|
|
1124
|
+
reqid = response['Response']['RequestId']
|
|
1125
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1126
|
+
end
|
|
1127
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1128
|
+
raise e
|
|
1129
|
+
rescue StandardError => e
|
|
1130
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1131
|
+
end
|
|
1132
|
+
|
|
1133
|
+
# 本接口 (ModifyInstancesRenewFlag) 用于修改包年包月实例续费标识。
|
|
1134
|
+
|
|
1135
|
+
# * 实例被标识为自动续费后,每次在实例到期时,会自动续费一个月。
|
|
1136
|
+
# * 支持批量操作。每次请求批量实例的上限为100。
|
|
1137
|
+
# * 实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。
|
|
1138
|
+
|
|
1139
|
+
# @param request: Request instance for ModifyInstancesRenewFlag.
|
|
1140
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::ModifyInstancesRenewFlagRequest`
|
|
1141
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::ModifyInstancesRenewFlagResponse`
|
|
1142
|
+
def ModifyInstancesRenewFlag(request)
|
|
1143
|
+
body = send_request('ModifyInstancesRenewFlag', request.serialize)
|
|
1144
|
+
response = JSON.parse(body)
|
|
1145
|
+
if response['Response'].key?('Error') == false
|
|
1146
|
+
model = ModifyInstancesRenewFlagResponse.new
|
|
1147
|
+
model.deserialize(response['Response'])
|
|
1148
|
+
model
|
|
1149
|
+
else
|
|
1150
|
+
code = response['Response']['Error']['Code']
|
|
1151
|
+
message = response['Response']['Error']['Message']
|
|
1152
|
+
reqid = response['Response']['RequestId']
|
|
1153
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1154
|
+
end
|
|
1155
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1156
|
+
raise e
|
|
1157
|
+
rescue StandardError => e
|
|
1158
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1159
|
+
end
|
|
1160
|
+
|
|
1161
|
+
# 本接口(ModifySnapshotAttribute)用于修改指定快照的属性。
|
|
1162
|
+
# <li>“快照名称”仅为方便用户自己管理之用。</li>
|
|
1163
|
+
|
|
1164
|
+
# @param request: Request instance for ModifySnapshotAttribute.
|
|
1165
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::ModifySnapshotAttributeRequest`
|
|
1166
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::ModifySnapshotAttributeResponse`
|
|
1167
|
+
def ModifySnapshotAttribute(request)
|
|
1168
|
+
body = send_request('ModifySnapshotAttribute', request.serialize)
|
|
1169
|
+
response = JSON.parse(body)
|
|
1170
|
+
if response['Response'].key?('Error') == false
|
|
1171
|
+
model = ModifySnapshotAttributeResponse.new
|
|
1172
|
+
model.deserialize(response['Response'])
|
|
1173
|
+
model
|
|
1174
|
+
else
|
|
1175
|
+
code = response['Response']['Error']['Code']
|
|
1176
|
+
message = response['Response']['Error']['Message']
|
|
1177
|
+
reqid = response['Response']['RequestId']
|
|
1178
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1179
|
+
end
|
|
1180
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1181
|
+
raise e
|
|
1182
|
+
rescue StandardError => e
|
|
1183
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1184
|
+
end
|
|
1185
|
+
|
|
1186
|
+
# 本接口(RebootInstances)用于重启实例。
|
|
1187
|
+
|
|
1188
|
+
# * 只有状态为 RUNNING 的实例才可以进行此操作。
|
|
1189
|
+
# * 接口调用成功时,实例会进入 REBOOTING 状态;重启实例成功时,实例会进入 RUNNING 状态。
|
|
1190
|
+
# * 支持批量操作,每次请求批量实例的上限为 100。
|
|
1191
|
+
# * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。
|
|
1192
|
+
|
|
1193
|
+
# @param request: Request instance for RebootInstances.
|
|
1194
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::RebootInstancesRequest`
|
|
1195
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::RebootInstancesResponse`
|
|
1196
|
+
def RebootInstances(request)
|
|
1197
|
+
body = send_request('RebootInstances', request.serialize)
|
|
1198
|
+
response = JSON.parse(body)
|
|
1199
|
+
if response['Response'].key?('Error') == false
|
|
1200
|
+
model = RebootInstancesResponse.new
|
|
1201
|
+
model.deserialize(response['Response'])
|
|
1202
|
+
model
|
|
1203
|
+
else
|
|
1204
|
+
code = response['Response']['Error']['Code']
|
|
1205
|
+
message = response['Response']['Error']['Message']
|
|
1206
|
+
reqid = response['Response']['RequestId']
|
|
1207
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1208
|
+
end
|
|
1209
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1210
|
+
raise e
|
|
1211
|
+
rescue StandardError => e
|
|
1212
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1213
|
+
end
|
|
1214
|
+
|
|
1215
|
+
# 本接口 (ResetAttachCcn) 用于关联云联网实例申请过期时,重新申请关联操作。
|
|
1216
|
+
|
|
1217
|
+
# @param request: Request instance for ResetAttachCcn.
|
|
1218
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::ResetAttachCcnRequest`
|
|
1219
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::ResetAttachCcnResponse`
|
|
1220
|
+
def ResetAttachCcn(request)
|
|
1221
|
+
body = send_request('ResetAttachCcn', request.serialize)
|
|
1222
|
+
response = JSON.parse(body)
|
|
1223
|
+
if response['Response'].key?('Error') == false
|
|
1224
|
+
model = ResetAttachCcnResponse.new
|
|
1225
|
+
model.deserialize(response['Response'])
|
|
1226
|
+
model
|
|
1227
|
+
else
|
|
1228
|
+
code = response['Response']['Error']['Code']
|
|
1229
|
+
message = response['Response']['Error']['Message']
|
|
1230
|
+
reqid = response['Response']['RequestId']
|
|
1231
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1232
|
+
end
|
|
1233
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1234
|
+
raise e
|
|
1235
|
+
rescue StandardError => e
|
|
1236
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1237
|
+
end
|
|
1238
|
+
|
|
1239
|
+
# 本接口(ResetInstance)用于重装指定实例上的镜像。
|
|
1240
|
+
|
|
1241
|
+
# * 如果指定了 BlueprintId 参数,则使用指定的镜像重装;否则按照当前实例使用的镜像进行重装。
|
|
1242
|
+
# * 系统盘将会被格式化,并重置;请确保系统盘中无重要文件。
|
|
1243
|
+
# * 目前不支持实例使用该接口实现 LINUX_UNIX 和 WINDOWS 操作系统切换。
|
|
1244
|
+
# * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。
|
|
1245
|
+
|
|
1246
|
+
# @param request: Request instance for ResetInstance.
|
|
1247
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::ResetInstanceRequest`
|
|
1248
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::ResetInstanceResponse`
|
|
1249
|
+
def ResetInstance(request)
|
|
1250
|
+
body = send_request('ResetInstance', request.serialize)
|
|
1251
|
+
response = JSON.parse(body)
|
|
1252
|
+
if response['Response'].key?('Error') == false
|
|
1253
|
+
model = ResetInstanceResponse.new
|
|
1254
|
+
model.deserialize(response['Response'])
|
|
1255
|
+
model
|
|
1256
|
+
else
|
|
1257
|
+
code = response['Response']['Error']['Code']
|
|
1258
|
+
message = response['Response']['Error']['Message']
|
|
1259
|
+
reqid = response['Response']['RequestId']
|
|
1260
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1261
|
+
end
|
|
1262
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1263
|
+
raise e
|
|
1264
|
+
rescue StandardError => e
|
|
1265
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1266
|
+
end
|
|
1267
|
+
|
|
1268
|
+
# 本接口(ResetInstancesPassword)用于将实例操作系统的密码重置为用户指定的密码。
|
|
1269
|
+
# * 只修改管理员帐号的密码。实例的操作系统不同,管理员帐号也会不一样(Windows 为 Administrator,Ubuntu 为 ubuntu ,其它系统为 root)。
|
|
1270
|
+
# * 支持批量操作。将多个实例操作系统的密码重置为相同的密码。每次请求批量实例的上限为 100。
|
|
1271
|
+
# * 建议对运行中的实例先手动关机,然后再进行密码重置。如实例处于运行中状态,本接口操作过程中会对实例进行关机操作,尝试正常关机失败后进行强制关机。
|
|
1272
|
+
# * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。
|
|
1273
|
+
# 注意:强制关机的效果等同于关闭物理计算机的电源开关。强制关机可能会导致数据丢失或文件系统损坏。
|
|
1274
|
+
|
|
1275
|
+
# @param request: Request instance for ResetInstancesPassword.
|
|
1276
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::ResetInstancesPasswordRequest`
|
|
1277
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::ResetInstancesPasswordResponse`
|
|
1278
|
+
def ResetInstancesPassword(request)
|
|
1279
|
+
body = send_request('ResetInstancesPassword', request.serialize)
|
|
1280
|
+
response = JSON.parse(body)
|
|
1281
|
+
if response['Response'].key?('Error') == false
|
|
1282
|
+
model = ResetInstancesPasswordResponse.new
|
|
1283
|
+
model.deserialize(response['Response'])
|
|
1284
|
+
model
|
|
1285
|
+
else
|
|
1286
|
+
code = response['Response']['Error']['Code']
|
|
1287
|
+
message = response['Response']['Error']['Message']
|
|
1288
|
+
reqid = response['Response']['RequestId']
|
|
1289
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1290
|
+
end
|
|
1291
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1292
|
+
raise e
|
|
1293
|
+
rescue StandardError => e
|
|
1294
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1295
|
+
end
|
|
1296
|
+
|
|
1297
|
+
# 本接口(StartInstances)用于启动一个或多个实例。
|
|
1298
|
+
|
|
1299
|
+
# * 只有状态为 STOPPED 的实例才可以进行此操作。
|
|
1300
|
+
# * 接口调用成功时,实例会进入 STARTING 状态;启动实例成功时,实例会进入 RUNNING 状态。
|
|
1301
|
+
# * 支持批量操作。每次请求批量实例的上限为 100。
|
|
1302
|
+
# * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。
|
|
1303
|
+
|
|
1304
|
+
# @param request: Request instance for StartInstances.
|
|
1305
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::StartInstancesRequest`
|
|
1306
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::StartInstancesResponse`
|
|
1307
|
+
def StartInstances(request)
|
|
1308
|
+
body = send_request('StartInstances', request.serialize)
|
|
1309
|
+
response = JSON.parse(body)
|
|
1310
|
+
if response['Response'].key?('Error') == false
|
|
1311
|
+
model = StartInstancesResponse.new
|
|
1312
|
+
model.deserialize(response['Response'])
|
|
1313
|
+
model
|
|
1314
|
+
else
|
|
1315
|
+
code = response['Response']['Error']['Code']
|
|
1316
|
+
message = response['Response']['Error']['Message']
|
|
1317
|
+
reqid = response['Response']['RequestId']
|
|
1318
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1319
|
+
end
|
|
1320
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1321
|
+
raise e
|
|
1322
|
+
rescue StandardError => e
|
|
1323
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1324
|
+
end
|
|
1325
|
+
|
|
1326
|
+
# 本接口(StopInstances)用于关闭一个或多个实例。
|
|
1327
|
+
# * 只有状态为 RUNNING 的实例才可以进行此操作。
|
|
1328
|
+
# * 接口调用成功时,实例会进入 STOPPING 状态;关闭实例成功时,实例会进入 STOPPED 状态。
|
|
1329
|
+
# * 支持批量操作。每次请求批量实例的上限为 100。
|
|
1330
|
+
# * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态(LatestOperationState)为“SUCCESS”,则代表操作成功。
|
|
1331
|
+
|
|
1332
|
+
# @param request: Request instance for StopInstances.
|
|
1333
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::StopInstancesRequest`
|
|
1334
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::StopInstancesResponse`
|
|
1335
|
+
def StopInstances(request)
|
|
1336
|
+
body = send_request('StopInstances', request.serialize)
|
|
1337
|
+
response = JSON.parse(body)
|
|
1338
|
+
if response['Response'].key?('Error') == false
|
|
1339
|
+
model = StopInstancesResponse.new
|
|
1340
|
+
model.deserialize(response['Response'])
|
|
1341
|
+
model
|
|
1342
|
+
else
|
|
1343
|
+
code = response['Response']['Error']['Code']
|
|
1344
|
+
message = response['Response']['Error']['Message']
|
|
1345
|
+
reqid = response['Response']['RequestId']
|
|
1346
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1347
|
+
end
|
|
1348
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1349
|
+
raise e
|
|
1350
|
+
rescue StandardError => e
|
|
1351
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1352
|
+
end
|
|
1353
|
+
|
|
1354
|
+
# 本接口 (TerminateInstances) 用于销毁实例。
|
|
1355
|
+
|
|
1356
|
+
# * 处于 SHUTDOWN 状态的实例,可通过本接口销毁,且不可恢复。
|
|
1357
|
+
# * 支持批量操作,每次请求批量实例的上限为100。
|
|
1358
|
+
# * 本接口为异步接口,请求发送成功后会返回一个 RequestId,此时操作并未立即完成。实例操作结果可以通过调用 DescribeInstances 接口查询,如果实例的最新操作状态 (LatestOperationState) 为“SUCCESS”,则代表操作成功。
|
|
1359
|
+
|
|
1360
|
+
# @param request: Request instance for TerminateInstances.
|
|
1361
|
+
# @type request: :class:`Tencentcloud::lighthouse::V20200324::TerminateInstancesRequest`
|
|
1362
|
+
# @rtype: :class:`Tencentcloud::lighthouse::V20200324::TerminateInstancesResponse`
|
|
1363
|
+
def TerminateInstances(request)
|
|
1364
|
+
body = send_request('TerminateInstances', request.serialize)
|
|
1365
|
+
response = JSON.parse(body)
|
|
1366
|
+
if response['Response'].key?('Error') == false
|
|
1367
|
+
model = TerminateInstancesResponse.new
|
|
1368
|
+
model.deserialize(response['Response'])
|
|
1369
|
+
model
|
|
1370
|
+
else
|
|
1371
|
+
code = response['Response']['Error']['Code']
|
|
1372
|
+
message = response['Response']['Error']['Message']
|
|
1373
|
+
reqid = response['Response']['RequestId']
|
|
1374
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
|
|
1375
|
+
end
|
|
1376
|
+
rescue TencentCloud::Common::TencentCloudSDKException => e
|
|
1377
|
+
raise e
|
|
1378
|
+
rescue StandardError => e
|
|
1379
|
+
raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
|
|
1380
|
+
end
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
end
|
|
1384
|
+
end
|
|
1385
|
+
end
|
|
1386
|
+
end
|