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.



3405
3406
3407
# File 'lib/google/apis/spanner_v1/classes.rb', line 3405

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

Instance Attribute Details

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


3329
3330
3331
# File 'lib/google/apis/spanner_v1/classes.rb', line 3329

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)


3334
3335
3336
# File 'lib/google/apis/spanner_v1/classes.rb', line 3334

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)


3340
3341
3342
# File 'lib/google/apis/spanner_v1/classes.rb', line 3340

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)


3353
3354
3355
# File 'lib/google/apis/spanner_v1/classes.rb', line 3353

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)


3361
3362
3363
# File 'lib/google/apis/spanner_v1/classes.rb', line 3361

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)


3369
3370
3371
# File 'lib/google/apis/spanner_v1/classes.rb', line 3369

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)


3377
3378
3379
# File 'lib/google/apis/spanner_v1/classes.rb', line 3377

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


3385
3386
3387
# File 'lib/google/apis/spanner_v1/classes.rb', line 3385

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


3392
3393
3394
# File 'lib/google/apis/spanner_v1/classes.rb', line 3392

def referencing_databases
  @referencing_databases
end

#stateString

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

Returns:

  • (String)


3397
3398
3399
# File 'lib/google/apis/spanner_v1/classes.rb', line 3397

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)


3403
3404
3405
# File 'lib/google/apis/spanner_v1/classes.rb', line 3403

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
# File 'lib/google/apis/spanner_v1/classes.rb', line 3410

def update!(**args)
  @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