lib/v20200217/client.rb in tencentcloud-sdk-tdmq-3.0.928 vs lib/v20200217/client.rb in tencentcloud-sdk-tdmq-3.0.929

- old
+ new

@@ -267,9 +267,33 @@ raise e rescue StandardError => e raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) end + # 创建RabbitMQ路由关系 + + # @param request: Request instance for CreateRabbitMQBinding. + # @type request: :class:`Tencentcloud::tdmq::V20200217::CreateRabbitMQBindingRequest` + # @rtype: :class:`Tencentcloud::tdmq::V20200217::CreateRabbitMQBindingResponse` + def CreateRabbitMQBinding(request) + body = send_request('CreateRabbitMQBinding', request.serialize) + response = JSON.parse(body) + if response['Response'].key?('Error') == false + model = CreateRabbitMQBindingResponse.new + model.deserialize(response['Response']) + model + else + code = response['Response']['Error']['Code'] + message = response['Response']['Error']['Message'] + reqid = response['Response']['RequestId'] + raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid) + end + rescue TencentCloud::Common::TencentCloudSDKException => e + raise e + rescue StandardError => e + raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect) + end + # 创建RabbitMQ的用户 # @param request: Request instance for CreateRabbitMQUser. # @type request: :class:`Tencentcloud::tdmq::V20200217::CreateRabbitMQUserRequest` # @rtype: :class:`Tencentcloud::tdmq::V20200217::CreateRabbitMQUserResponse` \ No newline at end of file