Class: Google::Apis::SpannerV1::InstancePartition
- Inherits:
-
Object
- Object
- Google::Apis::SpannerV1::InstancePartition
- 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
-
#autoscaling_config ⇒ Google::Apis::SpannerV1::AutoscalingConfig
Autoscaling configuration for an instance.
-
#config ⇒ String
Required.
-
#create_time ⇒ String
Output only.
-
#display_name ⇒ String
Required.
-
#etag ⇒ String
Used for optimistic concurrency control as a way to help prevent simultaneous updates of a instance partition from overwriting each other.
-
#name ⇒ String
Required.
-
#node_count ⇒ Fixnum
The number of nodes allocated to this instance partition.
-
#processing_units ⇒ Fixnum
The number of processing units allocated to this instance partition.
-
#referencing_backups ⇒ Array<String>
Output only.
-
#referencing_databases ⇒ Array<String>
Output only.
-
#state ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ InstancePartition
constructor
A new instance of InstancePartition.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ InstancePartition
Returns a new instance of InstancePartition.
3559 3560 3561 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3559 def initialize(**args) update!(**args) end |
Instance Attribute Details
#autoscaling_config ⇒ Google::Apis::SpannerV1::AutoscalingConfig
Autoscaling configuration for an instance.
Corresponds to the JSON property autoscalingConfig
3476 3477 3478 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3476 def autoscaling_config @autoscaling_config end |
#config ⇒ String
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
3483 3484 3485 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3483 def config @config end |
#create_time ⇒ String
Output only. The time at which the instance partition was created.
Corresponds to the JSON property createTime
3488 3489 3490 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3488 def create_time @create_time end |
#display_name ⇒ String
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
3494 3495 3496 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3494 def display_name @display_name end |
#etag ⇒ String
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
3507 3508 3509 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3507 def etag @etag end |
#name ⇒ String
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
3515 3516 3517 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3515 def name @name end |
#node_count ⇒ Fixnum
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
3523 3524 3525 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3523 def node_count @node_count end |
#processing_units ⇒ Fixnum
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
3531 3532 3533 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3531 def processing_units @processing_units end |
#referencing_backups ⇒ Array<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
3539 3540 3541 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3539 def referencing_backups @referencing_backups end |
#referencing_databases ⇒ Array<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
3546 3547 3548 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3546 def referencing_databases @referencing_databases end |
#state ⇒ String
Output only. The current instance partition state.
Corresponds to the JSON property state
3551 3552 3553 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3551 def state @state end |
#update_time ⇒ String
Output only. The time at which the instance partition was most recently
updated.
Corresponds to the JSON property updateTime
3557 3558 3559 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3557 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3564 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 |