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.



3726
3727
3728
# File 'lib/google/apis/spanner_v1/classes.rb', line 3726

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



3643
3644
3645
# File 'lib/google/apis/spanner_v1/classes.rb', line 3643

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)


3650
3651
3652
# File 'lib/google/apis/spanner_v1/classes.rb', line 3650

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)


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

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)


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

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)


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

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)


3682
3683
3684
# File 'lib/google/apis/spanner_v1/classes.rb', line 3682

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. 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)


3690
3691
3692
# File 'lib/google/apis/spanner_v1/classes.rb', line 3690

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. 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)


3698
3699
3700
# File 'lib/google/apis/spanner_v1/classes.rb', line 3698

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>)


3706
3707
3708
# File 'lib/google/apis/spanner_v1/classes.rb', line 3706

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>)


3713
3714
3715
# File 'lib/google/apis/spanner_v1/classes.rb', line 3713

def referencing_databases
  @referencing_databases
end

#stateString

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

Returns:

  • (String)


3718
3719
3720
# File 'lib/google/apis/spanner_v1/classes.rb', line 3718

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)


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

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
# File 'lib/google/apis/spanner_v1/classes.rb', line 3731

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