class TencentCloud::Eb::V20210416::Client

def CheckRule(request)

Parameters:
  • request: () -- Request instance for CheckRule.
def CheckRule(request)
  body = send_request('CheckRule', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CheckRuleResponse.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

def CheckTransformation(request)

Parameters:
  • request: () -- Request instance for CheckTransformation.
def CheckTransformation(request)
  body = send_request('CheckTransformation', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CheckTransformationResponse.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

def CreateConnection(request)

Parameters:
  • request: () -- Request instance for CreateConnection.
def CreateConnection(request)
  body = send_request('CreateConnection', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateConnectionResponse.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

def CreateEventBus(request)

Parameters:
  • request: () -- Request instance for CreateEventBus.
def CreateEventBus(request)
  body = send_request('CreateEventBus', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateEventBusResponse.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

def CreateRule(request)

Parameters:
  • request: () -- Request instance for CreateRule.
def CreateRule(request)
  body = send_request('CreateRule', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateRuleResponse.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

def CreateTarget(request)

Parameters:
  • request: () -- Request instance for CreateTarget.
def CreateTarget(request)
  body = send_request('CreateTarget', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateTargetResponse.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

def CreateTransformation(request)

Parameters:
  • request: () -- Request instance for CreateTransformation.
def CreateTransformation(request)
  body = send_request('CreateTransformation', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = CreateTransformationResponse.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

def DeleteConnection(request)

Parameters:
  • request: () -- Request instance for DeleteConnection.
def DeleteConnection(request)
  body = send_request('DeleteConnection', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteConnectionResponse.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

def DeleteEventBus(request)

Parameters:
  • request: () -- Request instance for DeleteEventBus.
def DeleteEventBus(request)
  body = send_request('DeleteEventBus', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteEventBusResponse.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

def DeleteRule(request)

Parameters:
  • request: () -- Request instance for DeleteRule.
def DeleteRule(request)
  body = send_request('DeleteRule', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteRuleResponse.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

def DeleteTarget(request)

Parameters:
  • request: () -- Request instance for DeleteTarget.
def DeleteTarget(request)
  body = send_request('DeleteTarget', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteTargetResponse.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

def DeleteTransformation(request)

Parameters:
  • request: () -- Request instance for DeleteTransformation.
def DeleteTransformation(request)
  body = send_request('DeleteTransformation', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DeleteTransformationResponse.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

def DescribeLogTagValue(request)

Parameters:
  • request: () -- Request instance for DescribeLogTagValue.
def DescribeLogTagValue(request)
  body = send_request('DescribeLogTagValue', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = DescribeLogTagValueResponse.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

def GetEventBus(request)

Parameters:
  • request: () -- Request instance for GetEventBus.
def GetEventBus(request)
  body = send_request('GetEventBus', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetEventBusResponse.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

def GetPlatformEventTemplate(request)

Parameters:
  • request: () -- Request instance for GetPlatformEventTemplate.
def GetPlatformEventTemplate(request)
  body = send_request('GetPlatformEventTemplate', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetPlatformEventTemplateResponse.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

def GetRule(request)

Parameters:
  • request: () -- Request instance for GetRule.
def GetRule(request)
  body = send_request('GetRule', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetRuleResponse.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

def GetTransformation(request)

Parameters:
  • request: () -- Request instance for GetTransformation.
def GetTransformation(request)
  body = send_request('GetTransformation', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = GetTransformationResponse.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

def ListConnections(request)

Parameters:
  • request: () -- Request instance for ListConnections.
def ListConnections(request)
  body = send_request('ListConnections', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListConnectionsResponse.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

def ListEventBuses(request)

Parameters:
  • request: () -- Request instance for ListEventBuses.
def ListEventBuses(request)
  body = send_request('ListEventBuses', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListEventBusesResponse.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

def ListPlatformEventNames(request)

Parameters:
  • request: () -- Request instance for ListPlatformEventNames.
def ListPlatformEventNames(request)
  body = send_request('ListPlatformEventNames', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListPlatformEventNamesResponse.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

def ListPlatformEventPatterns(request)

Parameters:
  • request: () -- Request instance for ListPlatformEventPatterns.
def ListPlatformEventPatterns(request)
  body = send_request('ListPlatformEventPatterns', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListPlatformEventPatternsResponse.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

def ListPlatformProducts(request)

Parameters:
  • request: () -- Request instance for ListPlatformProducts.
def ListPlatformProducts(request)
  body = send_request('ListPlatformProducts', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListPlatformProductsResponse.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

def ListRules(request)

Parameters:
  • request: () -- Request instance for ListRules.
def ListRules(request)
  body = send_request('ListRules', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListRulesResponse.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

def ListTargets(request)

Parameters:
  • request: () -- Request instance for ListTargets.
def ListTargets(request)
  body = send_request('ListTargets', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ListTargetsResponse.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

def PublishEvent(request)

Parameters:
  • request: () -- Request instance for PublishEvent.
def PublishEvent(request)
  body = send_request('PublishEvent', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = PublishEventResponse.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

def PutEvents(request)

Parameters:
  • request: () -- Request instance for PutEvents.
def PutEvents(request)
  body = send_request('PutEvents', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = PutEventsResponse.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

def SearchLog(request)

Parameters:
  • request: () -- Request instance for SearchLog.
def SearchLog(request)
  body = send_request('SearchLog', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = SearchLogResponse.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

def UpdateConnection(request)

Parameters:
  • request: () -- Request instance for UpdateConnection.
def UpdateConnection(request)
  body = send_request('UpdateConnection', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = UpdateConnectionResponse.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

def UpdateEventBus(request)

Parameters:
  • request: () -- Request instance for UpdateEventBus.
def UpdateEventBus(request)
  body = send_request('UpdateEventBus', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = UpdateEventBusResponse.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

def UpdateRule(request)

Parameters:
  • request: () -- Request instance for UpdateRule.
def UpdateRule(request)
  body = send_request('UpdateRule', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = UpdateRuleResponse.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

def UpdateTarget(request)

Parameters:
  • request: () -- Request instance for UpdateTarget.
def UpdateTarget(request)
  body = send_request('UpdateTarget', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = UpdateTargetResponse.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

def UpdateTransformation(request)

Parameters:
  • request: () -- Request instance for UpdateTransformation.
def UpdateTransformation(request)
  body = send_request('UpdateTransformation', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = UpdateTransformationResponse.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

def initialize(credential, region, profile = nil)

def initialize(credential, region, profile = nil)
    api_version = '2021-04-16'
    api_endpoint = 'eb.tencentcloudapi.com'
    sdk_version = 'EB_' + File.read(File.expand_path('../VERSION', __dir__)).strip
    super(credential, region, api_version, api_endpoint, sdk_version, profile)
end