Class: Google::Apis::SpannerV1::InstanceConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb

Overview

A possible configuration for a Cloud Spanner instance. Configurations define the geographic placement of nodes and their replication.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InstanceConfig

Returns a new instance of InstanceConfig.



2056
2057
2058
# File 'lib/google/apis/spanner_v1/classes.rb', line 2056

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#display_nameString

The name of this instance configuration as it appears in UIs. Corresponds to the JSON property displayName

Returns:

  • (String)


2030
2031
2032
# File 'lib/google/apis/spanner_v1/classes.rb', line 2030

def display_name
  @display_name
end

#free_instance_availabilityString

Output only. Describes whether free instances are available to be created in this instance config. Corresponds to the JSON property freeInstanceAvailability

Returns:

  • (String)


2036
2037
2038
# File 'lib/google/apis/spanner_v1/classes.rb', line 2036

def free_instance_availability
  @free_instance_availability
end

#leader_optionsArray<String>

Allowed values of the "default_leader" schema option for databases in instances that use this instance configuration. Corresponds to the JSON property leaderOptions

Returns:

  • (Array<String>)


2042
2043
2044
# File 'lib/google/apis/spanner_v1/classes.rb', line 2042

def leader_options
  @leader_options
end

#nameString

A unique identifier for the instance configuration. Values are of the form projects//instanceConfigs/a-z*. Corresponds to the JSON property name

Returns:

  • (String)


2048
2049
2050
# File 'lib/google/apis/spanner_v1/classes.rb', line 2048

def name
  @name
end

#replicasArray<Google::Apis::SpannerV1::ReplicaInfo>

The geographic placement of nodes in this instance configuration and their replication properties. Corresponds to the JSON property replicas



2054
2055
2056
# File 'lib/google/apis/spanner_v1/classes.rb', line 2054

def replicas
  @replicas
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2061
2062
2063
2064
2065
2066
2067
# File 'lib/google/apis/spanner_v1/classes.rb', line 2061

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @free_instance_availability = args[:free_instance_availability] if args.key?(:free_instance_availability)
  @leader_options = args[:leader_options] if args.key?(:leader_options)
  @name = args[:name] if args.key?(:name)
  @replicas = args[:replicas] if args.key?(:replicas)
end