Class: TencentCloud::Cloudhsm::V20191112::Client
- Inherits:
-
TencentCloud::Common::AbstractClient
- Object
- TencentCloud::Common::AbstractClient
- TencentCloud::Cloudhsm::V20191112::Client
- Defined in:
- lib/v20191112/client.rb
Instance Method Summary collapse
-
#DescribeHSMBySubnetId(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeHSMBySubnetIdResponse`.
-
#DescribeHSMByVpcId(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeHSMByVpcIdResponse`.
-
#DescribeSubnet(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeSubnetResponse`.
-
#DescribeSupportedHsm(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeSupportedHsmResponse`.
-
#DescribeUsg(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeUsgResponse`.
-
#DescribeUsgRule(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeUsgRuleResponse`.
-
#DescribeVpc(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeVpcResponse`.
-
#DescribeVsmAttributes(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeVsmAttributesResponse`.
-
#DescribeVsms(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeVsmsResponse`.
-
#GetAlarmEvent(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::GetAlarmEventResponse`.
-
#GetVsmMonitorInfo(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::GetVsmMonitorInfoResponse`.
-
#initialize(credential, region, profile = nil) ⇒ Client
constructor
A new instance of Client.
-
#InquiryPriceBuyVsm(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::InquiryPriceBuyVsmResponse`.
-
#ModifyAlarmEvent(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::ModifyAlarmEventResponse`.
-
#ModifyVsmAttributes(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::ModifyVsmAttributesResponse`.
Constructor Details
#initialize(credential, region, profile = nil) ⇒ Client
Returns a new instance of Client.
24 25 26 27 28 29 |
# File 'lib/v20191112/client.rb', line 24 def initialize(credential, region, profile = nil) api_version = '2019-11-12' api_endpoint = 'cloudhsm.tencentcloudapi.com' sdk_version = 'CLOUDHSM_' + File.read(File.('../VERSION', __dir__)).strip super(credential, region, api_version, api_endpoint, sdk_version, profile) end |
Instance Method Details
#DescribeHSMBySubnetId(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeHSMBySubnetIdResponse`
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/v20191112/client.rb', line 37 def DescribeHSMBySubnetId(request) body = send_request('DescribeHSMBySubnetId', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeHSMBySubnetIdResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeHSMByVpcId(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeHSMByVpcIdResponse`
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/v20191112/client.rb', line 61 def DescribeHSMByVpcId(request) body = send_request('DescribeHSMByVpcId', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeHSMByVpcIdResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeSubnet(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeSubnetResponse`
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/v20191112/client.rb', line 85 def DescribeSubnet(request) body = send_request('DescribeSubnet', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeSubnetResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeSupportedHsm(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeSupportedHsmResponse`
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/v20191112/client.rb', line 109 def DescribeSupportedHsm(request) body = send_request('DescribeSupportedHsm', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeSupportedHsmResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeUsg(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeUsgResponse`
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/v20191112/client.rb', line 133 def DescribeUsg(request) body = send_request('DescribeUsg', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeUsgResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeUsgRule(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeUsgRuleResponse`
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/v20191112/client.rb', line 157 def DescribeUsgRule(request) body = send_request('DescribeUsgRule', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeUsgRuleResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeVpc(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeVpcResponse`
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/v20191112/client.rb', line 181 def DescribeVpc(request) body = send_request('DescribeVpc', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeVpcResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeVsmAttributes(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeVsmAttributesResponse`
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/v20191112/client.rb', line 205 def DescribeVsmAttributes(request) body = send_request('DescribeVsmAttributes', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeVsmAttributesResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#DescribeVsms(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::DescribeVsmsResponse`
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/v20191112/client.rb', line 229 def DescribeVsms(request) body = send_request('DescribeVsms', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = DescribeVsmsResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#GetAlarmEvent(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::GetAlarmEventResponse`
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/v20191112/client.rb', line 253 def GetAlarmEvent(request) body = send_request('GetAlarmEvent', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = GetAlarmEventResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#GetVsmMonitorInfo(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::GetVsmMonitorInfoResponse`
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/v20191112/client.rb', line 277 def GetVsmMonitorInfo(request) body = send_request('GetVsmMonitorInfo', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = GetVsmMonitorInfoResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#InquiryPriceBuyVsm(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::InquiryPriceBuyVsmResponse`
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/v20191112/client.rb', line 301 def InquiryPriceBuyVsm(request) body = send_request('InquiryPriceBuyVsm', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = InquiryPriceBuyVsmResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#ModifyAlarmEvent(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::ModifyAlarmEventResponse`
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
# File 'lib/v20191112/client.rb', line 325 def ModifyAlarmEvent(request) body = send_request('ModifyAlarmEvent', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = ModifyAlarmEventResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |
#ModifyVsmAttributes(request) ⇒ Object
@rtype: :class:‘Tencentcloud::cloudhsm::V20191112::ModifyVsmAttributesResponse`
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/v20191112/client.rb', line 349 def ModifyVsmAttributes(request) body = send_request('ModifyVsmAttributes', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = ModifyVsmAttributesResponse.new model.deserialize(response['Response']) model else code = response['Response']['Error']['Code'] = response['Response']['Error']['Message'] reqid = response['Response']['RequestId'] raise TencentCloud::Common::TencentCloudSDKException.new(code, , reqid) end rescue TencentCloud::Common::TencentCloudSDKException => e raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end |