Class: AWSEdges::Redshift
- Inherits:
-
Object
- Object
- AWSEdges::Redshift
- Defined in:
- lib/aws-edges/redshift.rb
Instance Attribute Summary collapse
-
#nodes ⇒ Object
readonly
Returns the value of attribute nodes.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(describe_clusters) ⇒ Redshift
constructor
A new instance of Redshift.
Constructor Details
#initialize(describe_clusters) ⇒ Redshift
Returns a new instance of Redshift.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/aws-edges/redshift.rb', line 5 def initialize(describe_clusters) @nodes = Array.new describe_clusters[:clusters].each{|c| @nodes.push({ :db_name => c[:db_name], :vpc_id => c[:vpc_id], :availability_zone => c[:availability_zone], :subnet_group_name => c[:cluster_subnet_group_name], :publicly_accessible => c[:publicly_accessible], :cluster_version => c[:cluster_version], :encrypted => c[:encrypted], :cluster_nodes => [] }) cluster_nodes = Array.new c[:cluster_nodes].each{|n| cluster_nodes.push({ :node_role => n[:role_name], :public_ip_address => n[:public_ip_address], :private_ip_address => n[:private_ip_address] }) } @nodes[@nodes.length - 1][:cluster_nodes] = cluster_nodes } end |
Instance Attribute Details
#nodes ⇒ Object (readonly)
Returns the value of attribute nodes.
3 4 5 |
# File 'lib/aws-edges/redshift.rb', line 3 def nodes @nodes end |
Class Method Details
.supported_fields ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/aws-edges/redshift.rb', line 31 def self.supported_fields [ "db_name", "vpc_id", "availability_zone", "subnet_group_name", "publicly_accessible", "cluster_version", "encrypted", "cluster_nodes-node_role", "cluster_nodes-public_ip_address", "cluster_nodes-private_ip_address" ] end |