Class: Google::Apis::SpannerV1::InstancePartition

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

An isolated set of Cloud Spanner resources that databases can define placements on.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ InstancePartition

Returns a new instance of InstancePartition.



3743
3744
3745
# File 'lib/google/apis/spanner_v1/classes.rb', line 3743

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

Instance Attribute Details

#autoscaling_configGoogle::Apis::SpannerV1::AutoscalingConfig

Autoscaling configuration for an instance. Corresponds to the JSON property autoscalingConfig



3655
3656
3657
# File 'lib/google/apis/spanner_v1/classes.rb', line 3655

def autoscaling_config
  @autoscaling_config
end

#configString

Required. The name of the instance partition's configuration. Values are of the form projects//instanceConfigs/. See also InstanceConfig and ListInstanceConfigs. Corresponds to the JSON property config

Returns:

  • (String)


3662
3663
3664
# File 'lib/google/apis/spanner_v1/classes.rb', line 3662

def config
  @config
end

#create_timeString

Output only. The time at which the instance partition was created. Corresponds to the JSON property createTime

Returns:

  • (String)


3667
3668
3669
# File 'lib/google/apis/spanner_v1/classes.rb', line 3667

def create_time
  @create_time
end

#display_nameString

Required. The descriptive name for this instance partition as it appears in UIs. Must be unique per project and between 4 and 30 characters in length. Corresponds to the JSON property displayName

Returns:

  • (String)


3673
3674
3675
# File 'lib/google/apis/spanner_v1/classes.rb', line 3673

def display_name
  @display_name
end

#etagString

Used for optimistic concurrency control as a way to help prevent simultaneous updates of a instance partition from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform instance partition updates in order to avoid race conditions: An etag is returned in the response which contains instance partitions, and systems are expected to put that etag in the request to update instance partitions to ensure that their change will be applied to the same version of the instance partition. If no etag is provided in the call to update instance partition, then the existing instance partition is overwritten blindly. Corresponds to the JSON property etag

Returns:

  • (String)


3686
3687
3688
# File 'lib/google/apis/spanner_v1/classes.rb', line 3686

def etag
  @etag
end

#nameString

Required. A unique identifier for the instance partition. Values are of the form projects//instances//instancePartitions/a-z*[a-z0-9]. The final segment of the name must be between 2 and 64 characters in length. An instance partition's name cannot be changed after the instance partition is created. Corresponds to the JSON property name

Returns:

  • (String)


3694
3695
3696
# File 'lib/google/apis/spanner_v1/classes.rb', line 3694

def name
  @name
end

#node_countFixnum

The number of nodes allocated to this instance partition. Users can set the node_count field to specify the target number of nodes allocated to the instance partition. If autoscaling is enabled, node_count is treated as an OUTPUT_ONLY field and reflects the current number of nodes allocated to the instance partition. This may be zero in API responses for instance partitions that are not yet in state READY. Corresponds to the JSON property nodeCount

Returns:

  • (Fixnum)


3704
3705
3706
# File 'lib/google/apis/spanner_v1/classes.rb', line 3704

def node_count
  @node_count
end

#processing_unitsFixnum

The number of processing units allocated to this instance partition. Users can set the processing_units field to specify the target number of processing units allocated to the instance partition. If autoscaling is enabled, processing_units is treated as an OUTPUT_ONLY field and reflects the current number of processing units allocated to the instance partition. This might be zero in API responses for instance partitions that are not yet in the READY state. Corresponds to the JSON property processingUnits

Returns:

  • (Fixnum)


3715
3716
3717
# File 'lib/google/apis/spanner_v1/classes.rb', line 3715

def processing_units
  @processing_units
end

#referencing_backupsArray<String>

Output only. Deprecated: This field is not populated. Output only. The names of the backups that reference this instance partition. Referencing backups should share the parent instance. The existence of any referencing backup prevents the instance partition from being deleted. Corresponds to the JSON property referencingBackups

Returns:

  • (Array<String>)


3723
3724
3725
# File 'lib/google/apis/spanner_v1/classes.rb', line 3723

def referencing_backups
  @referencing_backups
end

#referencing_databasesArray<String>

Output only. The names of the databases that reference this instance partition. Referencing databases should share the parent instance. The existence of any referencing database prevents the instance partition from being deleted. Corresponds to the JSON property referencingDatabases

Returns:

  • (Array<String>)


3730
3731
3732
# File 'lib/google/apis/spanner_v1/classes.rb', line 3730

def referencing_databases
  @referencing_databases
end

#stateString

Output only. The current instance partition state. Corresponds to the JSON property state

Returns:

  • (String)


3735
3736
3737
# File 'lib/google/apis/spanner_v1/classes.rb', line 3735

def state
  @state
end

#update_timeString

Output only. The time at which the instance partition was most recently updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


3741
3742
3743
# File 'lib/google/apis/spanner_v1/classes.rb', line 3741

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
# File 'lib/google/apis/spanner_v1/classes.rb', line 3748

def update!(**args)
  @autoscaling_config = args[:autoscaling_config] if args.key?(:autoscaling_config)
  @config = args[:config] if args.key?(:config)
  @create_time = args[:create_time] if args.key?(:create_time)
  @display_name = args[:display_name] if args.key?(:display_name)
  @etag = args[:etag] if args.key?(:etag)
  @name = args[:name] if args.key?(:name)
  @node_count = args[:node_count] if args.key?(:node_count)
  @processing_units = args[:processing_units] if args.key?(:processing_units)
  @referencing_backups = args[:referencing_backups] if args.key?(:referencing_backups)
  @referencing_databases = args[:referencing_databases] if args.key?(:referencing_databases)
  @state = args[:state] if args.key?(:state)
  @update_time = args[:update_time] if args.key?(:update_time)
end