class TencentCloud::Tcbr::V20220217::Client

def CreateCloudRunEnv(request)

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

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

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

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

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

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

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

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

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

Parameters:
  • request: () -- Request instance for UpdateCloudRunServer.
def UpdateCloudRunServer(request)
  body = send_request('UpdateCloudRunServer', request.serialize)
  response = JSON.parse(body)
  if response['Response'].key?('Error') == false
    model = UpdateCloudRunServerResponse.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 = '2022-02-17'
    api_endpoint = 'tcbr.tencentcloudapi.com'
    sdk_version = 'TCBR_' + File.read(File.expand_path('../VERSION', __dir__)).strip
    super(credential, region, api_version, api_endpoint, sdk_version, profile)
end