Method: TencentCloud::Anicloud::V20220923::Client#QueryResource
- Defined in:
- lib/v20220923/client.rb
#QueryResource(request) ⇒ Object
@rtype: :class:‘Tencentcloud::anicloud::V20220923::QueryResourceResponse`
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/v20220923/client.rb', line 61 def QueryResource(request) body = send_request('QueryResource', request.serialize) response = JSON.parse(body) if response['Response'].key?('Error') == false model = QueryResourceResponse.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 |