Class: Google::Cloud::Spanner::Instance::Config
- Inherits:
-
Object
- Object
- Google::Cloud::Spanner::Instance::Config
- Defined in:
- lib/google/cloud/spanner/instance/config.rb,
lib/google/cloud/spanner/instance/config/list.rb
Overview
# Instance Config
Represents a Cloud Spanner instance configuration. Instance configurations define the geographic placement of nodes and their replication.
Defined Under Namespace
Classes: List
Class Method Summary collapse
-
.from_grpc(grpc) ⇒ Object
Google::Spanner::Admin::Instance::V1::InstanceConfig.
Instance Method Summary collapse
-
#initialize(grpc) ⇒ Config
constructor
A new instance of Config.
-
#instance_config_id ⇒ String
A unique identifier for the instance configuration.
-
#name ⇒ String
(also: #display_name)
The name of this instance configuration as it appears in UIs.
-
#path ⇒ String
The full path for the instance config resource.
-
#project_id ⇒ String
The unique identifier for the project.
Constructor Details
#initialize(grpc) ⇒ Config
Returns a new instance of Config.
45 46 47 |
# File 'lib/google/cloud/spanner/instance/config.rb', line 45 def initialize grpc @grpc = grpc end |
Class Method Details
.from_grpc(grpc) ⇒ Object
Google::Spanner::Admin::Instance::V1::InstanceConfig.
83 84 85 |
# File 'lib/google/cloud/spanner/instance/config.rb', line 83 def self.from_grpc grpc new grpc end |
Instance Method Details
#instance_config_id ⇒ String
A unique identifier for the instance configuration.
59 60 61 62 |
# File 'lib/google/cloud/spanner/instance/config.rb', line 59 def instance_config_id Admin::Instance::V1::InstanceAdminClient .match_instance_config_from_instance_config_name @grpc.name end |
#name ⇒ String Also known as: display_name
The name of this instance configuration as it appears in UIs.
75 76 77 |
# File 'lib/google/cloud/spanner/instance/config.rb', line 75 def name @grpc.display_name end |
#path ⇒ String
The full path for the instance config resource. Values are of the form ‘projects/<project_id>/instanceConfigs/<instance_config_id>`.
68 69 70 |
# File 'lib/google/cloud/spanner/instance/config.rb', line 68 def path @grpc.name end |
#project_id ⇒ String
The unique identifier for the project.
51 52 53 54 |
# File 'lib/google/cloud/spanner/instance/config.rb', line 51 def project_id Admin::Instance::V1::InstanceAdminClient .match_project_from_instance_config_name @grpc.name end |