Class: Flydata::Api::RedshiftCluster

Inherits:
Base
  • Object
show all
Defined in:
lib/flydata/api/redshift_cluster.rb

Instance Method Summary collapse

Methods inherited from Base

#create, #list

Constructor Details

#initialize(api_client) ⇒ RedshiftCluster

Returns a new instance of RedshiftCluster.



6
7
8
9
10
# File 'lib/flydata/api/redshift_cluster.rb', line 6

def initialize(api_client)
  @model_name = 'redshift_cluster'
  @url_path = "/#{@model_name.pluralize}"
  super
end

Instance Method Details

#run_query(sql) ⇒ Object



12
13
14
# File 'lib/flydata/api/redshift_cluster.rb', line 12

def run_query(sql)
  @client.post("#{@url_path}/query", nil, {redshift_query: {body: sql}})
end