Class: Google::Cloud::Bigtable::Instance::ClusterMap
- Inherits:
-
Hash
- Object
- Hash
- Google::Cloud::Bigtable::Instance::ClusterMap
- Defined in:
- lib/google/cloud/bigtable/instance/cluster_map.rb
Overview
Instance::ClusterMap is a hash with cluster ID keys and cluster configuration values. It is used to create a cluster.
Instance Method Summary collapse
-
#add(name, location, nodes: nil, storage_type: nil) ⇒ Object
Adds a cluster to the cluster map.
Instance Method Details
#add(name, location, nodes: nil, storage_type: nil) ⇒ Object
Adds a cluster to the cluster map.
61 62 63 64 65 66 67 68 69 |
# File 'lib/google/cloud/bigtable/instance/cluster_map.rb', line 61 def add name, location, nodes: nil, storage_type: nil attrs = { serve_nodes: nodes, location: location, default_storage_type: storage_type }.delete_if { |_, v| v.nil? } self[name] = Google::Bigtable::Admin::V2::Cluster.new attrs end |