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.
3719 3720 3721 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3719 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
3636 3637 3638 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3636 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
3643 3644 3645 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3643 def config @config end |
#create_time ⇒ String
Output only. The time at which the instance partition was created.
Corresponds to the JSON property createTime
3648 3649 3650 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3648 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
3654 3655 3656 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3654 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
3667 3668 3669 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3667 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
3675 3676 3677 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3675 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
3683 3684 3685 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3683 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
3691 3692 3693 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3691 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
3699 3700 3701 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3699 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
3706 3707 3708 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3706 def referencing_databases @referencing_databases end |
#state ⇒ String
Output only. The current instance partition state.
Corresponds to the JSON property state
3711 3712 3713 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3711 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
3717 3718 3719 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3717 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 |
# File 'lib/google/apis/spanner_v1/classes.rb', line 3724 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 |