class TencentCloud::Cdc::V20201214::Client

def CreateDedicatedCluster(request)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Parameters:
  • request: () -- Request instance for ModifySiteInfo.
def ModifySiteInfo(request)
  body = send_request('ModifySiteInfo', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = ModifySiteInfoResponse.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 = '2020-12-14'
    api_endpoint = 'cdc.tencentcloudapi.com'
    sdk_version = 'CDC_' + File.read(File.expand_path('../VERSION', __dir__)).strip
    super(credential, region, api_version, api_endpoint, sdk_version, profile)
end