google-cloud-spanner 3.55.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. google/cloud/spanner.py +47 -0
  2. google/cloud/spanner_admin_database_v1/__init__.py +146 -0
  3. google/cloud/spanner_admin_database_v1/gapic_metadata.json +418 -0
  4. google/cloud/spanner_admin_database_v1/gapic_version.py +16 -0
  5. google/cloud/spanner_admin_database_v1/py.typed +2 -0
  6. google/cloud/spanner_admin_database_v1/services/__init__.py +15 -0
  7. google/cloud/spanner_admin_database_v1/services/database_admin/__init__.py +22 -0
  8. google/cloud/spanner_admin_database_v1/services/database_admin/async_client.py +4097 -0
  9. google/cloud/spanner_admin_database_v1/services/database_admin/client.py +4602 -0
  10. google/cloud/spanner_admin_database_v1/services/database_admin/pagers.py +989 -0
  11. google/cloud/spanner_admin_database_v1/services/database_admin/transports/__init__.py +38 -0
  12. google/cloud/spanner_admin_database_v1/services/database_admin/transports/base.py +820 -0
  13. google/cloud/spanner_admin_database_v1/services/database_admin/transports/grpc.py +1303 -0
  14. google/cloud/spanner_admin_database_v1/services/database_admin/transports/grpc_asyncio.py +1688 -0
  15. google/cloud/spanner_admin_database_v1/services/database_admin/transports/rest.py +6512 -0
  16. google/cloud/spanner_admin_database_v1/services/database_admin/transports/rest_base.py +1650 -0
  17. google/cloud/spanner_admin_database_v1/types/__init__.py +144 -0
  18. google/cloud/spanner_admin_database_v1/types/backup.py +1106 -0
  19. google/cloud/spanner_admin_database_v1/types/backup_schedule.py +369 -0
  20. google/cloud/spanner_admin_database_v1/types/common.py +180 -0
  21. google/cloud/spanner_admin_database_v1/types/spanner_database_admin.py +1303 -0
  22. google/cloud/spanner_admin_instance_v1/__init__.py +110 -0
  23. google/cloud/spanner_admin_instance_v1/gapic_metadata.json +343 -0
  24. google/cloud/spanner_admin_instance_v1/gapic_version.py +16 -0
  25. google/cloud/spanner_admin_instance_v1/py.typed +2 -0
  26. google/cloud/spanner_admin_instance_v1/services/__init__.py +15 -0
  27. google/cloud/spanner_admin_instance_v1/services/instance_admin/__init__.py +22 -0
  28. google/cloud/spanner_admin_instance_v1/services/instance_admin/async_client.py +3466 -0
  29. google/cloud/spanner_admin_instance_v1/services/instance_admin/client.py +3881 -0
  30. google/cloud/spanner_admin_instance_v1/services/instance_admin/pagers.py +856 -0
  31. google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/__init__.py +38 -0
  32. google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/base.py +545 -0
  33. google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/grpc.py +1347 -0
  34. google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/grpc_asyncio.py +1539 -0
  35. google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/rest.py +4834 -0
  36. google/cloud/spanner_admin_instance_v1/services/instance_admin/transports/rest_base.py +1198 -0
  37. google/cloud/spanner_admin_instance_v1/types/__init__.py +104 -0
  38. google/cloud/spanner_admin_instance_v1/types/common.py +99 -0
  39. google/cloud/spanner_admin_instance_v1/types/spanner_instance_admin.py +2375 -0
  40. google/cloud/spanner_dbapi/__init__.py +93 -0
  41. google/cloud/spanner_dbapi/_helpers.py +113 -0
  42. google/cloud/spanner_dbapi/batch_dml_executor.py +135 -0
  43. google/cloud/spanner_dbapi/checksum.py +80 -0
  44. google/cloud/spanner_dbapi/client_side_statement_executor.py +140 -0
  45. google/cloud/spanner_dbapi/client_side_statement_parser.py +106 -0
  46. google/cloud/spanner_dbapi/connection.py +818 -0
  47. google/cloud/spanner_dbapi/cursor.py +609 -0
  48. google/cloud/spanner_dbapi/exceptions.py +172 -0
  49. google/cloud/spanner_dbapi/parse_utils.py +392 -0
  50. google/cloud/spanner_dbapi/parsed_statement.py +63 -0
  51. google/cloud/spanner_dbapi/parser.py +258 -0
  52. google/cloud/spanner_dbapi/partition_helper.py +41 -0
  53. google/cloud/spanner_dbapi/transaction_helper.py +294 -0
  54. google/cloud/spanner_dbapi/types.py +106 -0
  55. google/cloud/spanner_dbapi/utils.py +147 -0
  56. google/cloud/spanner_dbapi/version.py +20 -0
  57. google/cloud/spanner_v1/__init__.py +154 -0
  58. google/cloud/spanner_v1/_helpers.py +751 -0
  59. google/cloud/spanner_v1/_opentelemetry_tracing.py +165 -0
  60. google/cloud/spanner_v1/backup.py +397 -0
  61. google/cloud/spanner_v1/batch.py +433 -0
  62. google/cloud/spanner_v1/client.py +538 -0
  63. google/cloud/spanner_v1/data_types.py +350 -0
  64. google/cloud/spanner_v1/database.py +1968 -0
  65. google/cloud/spanner_v1/database_sessions_manager.py +249 -0
  66. google/cloud/spanner_v1/gapic_metadata.json +268 -0
  67. google/cloud/spanner_v1/gapic_version.py +16 -0
  68. google/cloud/spanner_v1/instance.py +735 -0
  69. google/cloud/spanner_v1/keyset.py +193 -0
  70. google/cloud/spanner_v1/merged_result_set.py +146 -0
  71. google/cloud/spanner_v1/metrics/constants.py +71 -0
  72. google/cloud/spanner_v1/metrics/metrics_capture.py +75 -0
  73. google/cloud/spanner_v1/metrics/metrics_exporter.py +384 -0
  74. google/cloud/spanner_v1/metrics/metrics_interceptor.py +156 -0
  75. google/cloud/spanner_v1/metrics/metrics_tracer.py +588 -0
  76. google/cloud/spanner_v1/metrics/metrics_tracer_factory.py +328 -0
  77. google/cloud/spanner_v1/metrics/spanner_metrics_tracer_factory.py +172 -0
  78. google/cloud/spanner_v1/param_types.py +110 -0
  79. google/cloud/spanner_v1/pool.py +813 -0
  80. google/cloud/spanner_v1/py.typed +2 -0
  81. google/cloud/spanner_v1/request_id_header.py +64 -0
  82. google/cloud/spanner_v1/services/__init__.py +15 -0
  83. google/cloud/spanner_v1/services/spanner/__init__.py +22 -0
  84. google/cloud/spanner_v1/services/spanner/async_client.py +2205 -0
  85. google/cloud/spanner_v1/services/spanner/client.py +2624 -0
  86. google/cloud/spanner_v1/services/spanner/pagers.py +196 -0
  87. google/cloud/spanner_v1/services/spanner/transports/__init__.py +38 -0
  88. google/cloud/spanner_v1/services/spanner/transports/base.py +520 -0
  89. google/cloud/spanner_v1/services/spanner/transports/grpc.py +911 -0
  90. google/cloud/spanner_v1/services/spanner/transports/grpc_asyncio.py +1144 -0
  91. google/cloud/spanner_v1/services/spanner/transports/rest.py +3468 -0
  92. google/cloud/spanner_v1/services/spanner/transports/rest_base.py +981 -0
  93. google/cloud/spanner_v1/session.py +631 -0
  94. google/cloud/spanner_v1/session_options.py +133 -0
  95. google/cloud/spanner_v1/snapshot.py +1057 -0
  96. google/cloud/spanner_v1/streamed.py +402 -0
  97. google/cloud/spanner_v1/table.py +181 -0
  98. google/cloud/spanner_v1/testing/__init__.py +0 -0
  99. google/cloud/spanner_v1/testing/database_test.py +121 -0
  100. google/cloud/spanner_v1/testing/interceptors.py +118 -0
  101. google/cloud/spanner_v1/testing/mock_database_admin.py +38 -0
  102. google/cloud/spanner_v1/testing/mock_spanner.py +261 -0
  103. google/cloud/spanner_v1/testing/spanner_database_admin_pb2_grpc.py +1267 -0
  104. google/cloud/spanner_v1/testing/spanner_pb2_grpc.py +882 -0
  105. google/cloud/spanner_v1/transaction.py +747 -0
  106. google/cloud/spanner_v1/types/__init__.py +118 -0
  107. google/cloud/spanner_v1/types/commit_response.py +94 -0
  108. google/cloud/spanner_v1/types/keys.py +248 -0
  109. google/cloud/spanner_v1/types/mutation.py +201 -0
  110. google/cloud/spanner_v1/types/query_plan.py +220 -0
  111. google/cloud/spanner_v1/types/result_set.py +379 -0
  112. google/cloud/spanner_v1/types/spanner.py +1815 -0
  113. google/cloud/spanner_v1/types/transaction.py +818 -0
  114. google/cloud/spanner_v1/types/type.py +288 -0
  115. google_cloud_spanner-3.55.0.dist-info/LICENSE +202 -0
  116. google_cloud_spanner-3.55.0.dist-info/METADATA +318 -0
  117. google_cloud_spanner-3.55.0.dist-info/RECORD +119 -0
  118. google_cloud_spanner-3.55.0.dist-info/WHEEL +5 -0
  119. google_cloud_spanner-3.55.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2375 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Copyright 2025 Google LLC
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+ from __future__ import annotations
17
+
18
+ from typing import MutableMapping, MutableSequence
19
+
20
+ import proto # type: ignore
21
+
22
+ from google.cloud.spanner_admin_instance_v1.types import common
23
+ from google.longrunning import operations_pb2 # type: ignore
24
+ from google.protobuf import field_mask_pb2 # type: ignore
25
+ from google.protobuf import timestamp_pb2 # type: ignore
26
+
27
+
28
+ __protobuf__ = proto.module(
29
+ package="google.spanner.admin.instance.v1",
30
+ manifest={
31
+ "ReplicaInfo",
32
+ "InstanceConfig",
33
+ "ReplicaComputeCapacity",
34
+ "AutoscalingConfig",
35
+ "Instance",
36
+ "ListInstanceConfigsRequest",
37
+ "ListInstanceConfigsResponse",
38
+ "GetInstanceConfigRequest",
39
+ "CreateInstanceConfigRequest",
40
+ "UpdateInstanceConfigRequest",
41
+ "DeleteInstanceConfigRequest",
42
+ "ListInstanceConfigOperationsRequest",
43
+ "ListInstanceConfigOperationsResponse",
44
+ "GetInstanceRequest",
45
+ "CreateInstanceRequest",
46
+ "ListInstancesRequest",
47
+ "ListInstancesResponse",
48
+ "UpdateInstanceRequest",
49
+ "DeleteInstanceRequest",
50
+ "CreateInstanceMetadata",
51
+ "UpdateInstanceMetadata",
52
+ "FreeInstanceMetadata",
53
+ "CreateInstanceConfigMetadata",
54
+ "UpdateInstanceConfigMetadata",
55
+ "InstancePartition",
56
+ "CreateInstancePartitionMetadata",
57
+ "CreateInstancePartitionRequest",
58
+ "DeleteInstancePartitionRequest",
59
+ "GetInstancePartitionRequest",
60
+ "UpdateInstancePartitionRequest",
61
+ "UpdateInstancePartitionMetadata",
62
+ "ListInstancePartitionsRequest",
63
+ "ListInstancePartitionsResponse",
64
+ "ListInstancePartitionOperationsRequest",
65
+ "ListInstancePartitionOperationsResponse",
66
+ "MoveInstanceRequest",
67
+ "MoveInstanceResponse",
68
+ "MoveInstanceMetadata",
69
+ },
70
+ )
71
+
72
+
73
+ class ReplicaInfo(proto.Message):
74
+ r"""
75
+
76
+ Attributes:
77
+ location (str):
78
+ The location of the serving resources, e.g.,
79
+ "us-central1".
80
+ type_ (google.cloud.spanner_admin_instance_v1.types.ReplicaInfo.ReplicaType):
81
+ The type of replica.
82
+ default_leader_location (bool):
83
+ If true, this location is designated as the default leader
84
+ location where leader replicas are placed. See the `region
85
+ types
86
+ documentation <https://cloud.google.com/spanner/docs/instances#region_types>`__
87
+ for more details.
88
+ """
89
+
90
+ class ReplicaType(proto.Enum):
91
+ r"""Indicates the type of replica. See the `replica types
92
+ documentation <https://cloud.google.com/spanner/docs/replication#replica_types>`__
93
+ for more details.
94
+
95
+ Values:
96
+ TYPE_UNSPECIFIED (0):
97
+ Not specified.
98
+ READ_WRITE (1):
99
+ Read-write replicas support both reads and writes. These
100
+ replicas:
101
+
102
+ - Maintain a full copy of your data.
103
+ - Serve reads.
104
+ - Can vote whether to commit a write.
105
+ - Participate in leadership election.
106
+ - Are eligible to become a leader.
107
+ READ_ONLY (2):
108
+ Read-only replicas only support reads (not writes).
109
+ Read-only replicas:
110
+
111
+ - Maintain a full copy of your data.
112
+ - Serve reads.
113
+ - Do not participate in voting to commit writes.
114
+ - Are not eligible to become a leader.
115
+ WITNESS (3):
116
+ Witness replicas don't support reads but do participate in
117
+ voting to commit writes. Witness replicas:
118
+
119
+ - Do not maintain a full copy of data.
120
+ - Do not serve reads.
121
+ - Vote whether to commit writes.
122
+ - Participate in leader election but are not eligible to
123
+ become leader.
124
+ """
125
+ TYPE_UNSPECIFIED = 0
126
+ READ_WRITE = 1
127
+ READ_ONLY = 2
128
+ WITNESS = 3
129
+
130
+ location: str = proto.Field(
131
+ proto.STRING,
132
+ number=1,
133
+ )
134
+ type_: ReplicaType = proto.Field(
135
+ proto.ENUM,
136
+ number=2,
137
+ enum=ReplicaType,
138
+ )
139
+ default_leader_location: bool = proto.Field(
140
+ proto.BOOL,
141
+ number=3,
142
+ )
143
+
144
+
145
+ class InstanceConfig(proto.Message):
146
+ r"""A possible configuration for a Cloud Spanner instance.
147
+ Configurations define the geographic placement of nodes and
148
+ their replication.
149
+
150
+ Attributes:
151
+ name (str):
152
+ A unique identifier for the instance configuration. Values
153
+ are of the form
154
+ ``projects/<project>/instanceConfigs/[a-z][-a-z0-9]*``.
155
+
156
+ User instance configuration must start with ``custom-``.
157
+ display_name (str):
158
+ The name of this instance configuration as it
159
+ appears in UIs.
160
+ config_type (google.cloud.spanner_admin_instance_v1.types.InstanceConfig.Type):
161
+ Output only. Whether this instance
162
+ configuration is a Google-managed or
163
+ user-managed configuration.
164
+ replicas (MutableSequence[google.cloud.spanner_admin_instance_v1.types.ReplicaInfo]):
165
+ The geographic placement of nodes in this instance
166
+ configuration and their replication properties.
167
+
168
+ To create user-managed configurations, input ``replicas``
169
+ must include all replicas in ``replicas`` of the
170
+ ``base_config`` and include one or more replicas in the
171
+ ``optional_replicas`` of the ``base_config``.
172
+ optional_replicas (MutableSequence[google.cloud.spanner_admin_instance_v1.types.ReplicaInfo]):
173
+ Output only. The available optional replicas
174
+ to choose from for user-managed configurations.
175
+ Populated for Google-managed configurations.
176
+ base_config (str):
177
+ Base configuration name, e.g.
178
+ projects/<project_name>/instanceConfigs/nam3, based on which
179
+ this configuration is created. Only set for user-managed
180
+ configurations. ``base_config`` must refer to a
181
+ configuration of type ``GOOGLE_MANAGED`` in the same project
182
+ as this configuration.
183
+ labels (MutableMapping[str, str]):
184
+ Cloud Labels are a flexible and lightweight mechanism for
185
+ organizing cloud resources into groups that reflect a
186
+ customer's organizational needs and deployment strategies.
187
+ Cloud Labels can be used to filter collections of resources.
188
+ They can be used to control how resource metrics are
189
+ aggregated. And they can be used as arguments to policy
190
+ management rules (e.g. route, firewall, load balancing,
191
+ etc.).
192
+
193
+ - Label keys must be between 1 and 63 characters long and
194
+ must conform to the following regular expression:
195
+ ``[a-z][a-z0-9_-]{0,62}``.
196
+ - Label values must be between 0 and 63 characters long and
197
+ must conform to the regular expression
198
+ ``[a-z0-9_-]{0,63}``.
199
+ - No more than 64 labels can be associated with a given
200
+ resource.
201
+
202
+ See https://goo.gl/xmQnxf for more information on and
203
+ examples of labels.
204
+
205
+ If you plan to use labels in your own code, please note that
206
+ additional characters may be allowed in the future.
207
+ Therefore, you are advised to use an internal label
208
+ representation, such as JSON, which doesn't rely upon
209
+ specific characters being disallowed. For example,
210
+ representing labels as the string: name + "*" + value would
211
+ prove problematic if we were to allow "*" in a future
212
+ release.
213
+ etag (str):
214
+ etag is used for optimistic concurrency
215
+ control as a way to help prevent simultaneous
216
+ updates of a instance configuration from
217
+ overwriting each other. It is strongly suggested
218
+ that systems make use of the etag in the
219
+ read-modify-write cycle to perform instance
220
+ configuration updates in order to avoid race
221
+ conditions: An etag is returned in the response
222
+ which contains instance configurations, and
223
+ systems are expected to put that etag in the
224
+ request to update instance configuration to
225
+ ensure that their change is applied to the same
226
+ version of the instance configuration. If no
227
+ etag is provided in the call to update the
228
+ instance configuration, then the existing
229
+ instance configuration is overwritten blindly.
230
+ leader_options (MutableSequence[str]):
231
+ Allowed values of the "default_leader" schema option for
232
+ databases in instances that use this instance configuration.
233
+ reconciling (bool):
234
+ Output only. If true, the instance
235
+ configuration is being created or updated. If
236
+ false, there are no ongoing operations for the
237
+ instance configuration.
238
+ state (google.cloud.spanner_admin_instance_v1.types.InstanceConfig.State):
239
+ Output only. The current instance configuration state.
240
+ Applicable only for ``USER_MANAGED`` configurations.
241
+ free_instance_availability (google.cloud.spanner_admin_instance_v1.types.InstanceConfig.FreeInstanceAvailability):
242
+ Output only. Describes whether free instances
243
+ are available to be created in this instance
244
+ configuration.
245
+ quorum_type (google.cloud.spanner_admin_instance_v1.types.InstanceConfig.QuorumType):
246
+ Output only. The ``QuorumType`` of the instance
247
+ configuration.
248
+ storage_limit_per_processing_unit (int):
249
+ Output only. The storage limit in bytes per
250
+ processing unit.
251
+ """
252
+
253
+ class Type(proto.Enum):
254
+ r"""The type of this configuration.
255
+
256
+ Values:
257
+ TYPE_UNSPECIFIED (0):
258
+ Unspecified.
259
+ GOOGLE_MANAGED (1):
260
+ Google-managed configuration.
261
+ USER_MANAGED (2):
262
+ User-managed configuration.
263
+ """
264
+ TYPE_UNSPECIFIED = 0
265
+ GOOGLE_MANAGED = 1
266
+ USER_MANAGED = 2
267
+
268
+ class State(proto.Enum):
269
+ r"""Indicates the current state of the instance configuration.
270
+
271
+ Values:
272
+ STATE_UNSPECIFIED (0):
273
+ Not specified.
274
+ CREATING (1):
275
+ The instance configuration is still being
276
+ created.
277
+ READY (2):
278
+ The instance configuration is fully created
279
+ and ready to be used to create instances.
280
+ """
281
+ STATE_UNSPECIFIED = 0
282
+ CREATING = 1
283
+ READY = 2
284
+
285
+ class FreeInstanceAvailability(proto.Enum):
286
+ r"""Describes the availability for free instances to be created
287
+ in an instance configuration.
288
+
289
+ Values:
290
+ FREE_INSTANCE_AVAILABILITY_UNSPECIFIED (0):
291
+ Not specified.
292
+ AVAILABLE (1):
293
+ Indicates that free instances are available
294
+ to be created in this instance configuration.
295
+ UNSUPPORTED (2):
296
+ Indicates that free instances are not
297
+ supported in this instance configuration.
298
+ DISABLED (3):
299
+ Indicates that free instances are currently
300
+ not available to be created in this instance
301
+ configuration.
302
+ QUOTA_EXCEEDED (4):
303
+ Indicates that additional free instances
304
+ cannot be created in this instance configuration
305
+ because the project has reached its limit of
306
+ free instances.
307
+ """
308
+ FREE_INSTANCE_AVAILABILITY_UNSPECIFIED = 0
309
+ AVAILABLE = 1
310
+ UNSUPPORTED = 2
311
+ DISABLED = 3
312
+ QUOTA_EXCEEDED = 4
313
+
314
+ class QuorumType(proto.Enum):
315
+ r"""Indicates the quorum type of this instance configuration.
316
+
317
+ Values:
318
+ QUORUM_TYPE_UNSPECIFIED (0):
319
+ Quorum type not specified.
320
+ REGION (1):
321
+ An instance configuration tagged with ``REGION`` quorum type
322
+ forms a write quorum in a single region.
323
+ DUAL_REGION (2):
324
+ An instance configuration tagged with the ``DUAL_REGION``
325
+ quorum type forms a write quorum with exactly two read-write
326
+ regions in a multi-region configuration.
327
+
328
+ This instance configuration requires failover in the event
329
+ of regional failures.
330
+ MULTI_REGION (3):
331
+ An instance configuration tagged with the ``MULTI_REGION``
332
+ quorum type forms a write quorum from replicas that are
333
+ spread across more than one region in a multi-region
334
+ configuration.
335
+ """
336
+ QUORUM_TYPE_UNSPECIFIED = 0
337
+ REGION = 1
338
+ DUAL_REGION = 2
339
+ MULTI_REGION = 3
340
+
341
+ name: str = proto.Field(
342
+ proto.STRING,
343
+ number=1,
344
+ )
345
+ display_name: str = proto.Field(
346
+ proto.STRING,
347
+ number=2,
348
+ )
349
+ config_type: Type = proto.Field(
350
+ proto.ENUM,
351
+ number=5,
352
+ enum=Type,
353
+ )
354
+ replicas: MutableSequence["ReplicaInfo"] = proto.RepeatedField(
355
+ proto.MESSAGE,
356
+ number=3,
357
+ message="ReplicaInfo",
358
+ )
359
+ optional_replicas: MutableSequence["ReplicaInfo"] = proto.RepeatedField(
360
+ proto.MESSAGE,
361
+ number=6,
362
+ message="ReplicaInfo",
363
+ )
364
+ base_config: str = proto.Field(
365
+ proto.STRING,
366
+ number=7,
367
+ )
368
+ labels: MutableMapping[str, str] = proto.MapField(
369
+ proto.STRING,
370
+ proto.STRING,
371
+ number=8,
372
+ )
373
+ etag: str = proto.Field(
374
+ proto.STRING,
375
+ number=9,
376
+ )
377
+ leader_options: MutableSequence[str] = proto.RepeatedField(
378
+ proto.STRING,
379
+ number=4,
380
+ )
381
+ reconciling: bool = proto.Field(
382
+ proto.BOOL,
383
+ number=10,
384
+ )
385
+ state: State = proto.Field(
386
+ proto.ENUM,
387
+ number=11,
388
+ enum=State,
389
+ )
390
+ free_instance_availability: FreeInstanceAvailability = proto.Field(
391
+ proto.ENUM,
392
+ number=12,
393
+ enum=FreeInstanceAvailability,
394
+ )
395
+ quorum_type: QuorumType = proto.Field(
396
+ proto.ENUM,
397
+ number=18,
398
+ enum=QuorumType,
399
+ )
400
+ storage_limit_per_processing_unit: int = proto.Field(
401
+ proto.INT64,
402
+ number=19,
403
+ )
404
+
405
+
406
+ class ReplicaComputeCapacity(proto.Message):
407
+ r"""ReplicaComputeCapacity describes the amount of server
408
+ resources that are allocated to each replica identified by the
409
+ replica selection.
410
+
411
+ This message has `oneof`_ fields (mutually exclusive fields).
412
+ For each oneof, at most one member field can be set at the same time.
413
+ Setting any member of the oneof automatically clears all other
414
+ members.
415
+
416
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
417
+
418
+ Attributes:
419
+ replica_selection (google.cloud.spanner_admin_instance_v1.types.ReplicaSelection):
420
+ Required. Identifies replicas by specified
421
+ properties. All replicas in the selection have
422
+ the same amount of compute capacity.
423
+ node_count (int):
424
+ The number of nodes allocated to each replica.
425
+
426
+ This may be zero in API responses for instances that are not
427
+ yet in state ``READY``.
428
+
429
+ This field is a member of `oneof`_ ``compute_capacity``.
430
+ processing_units (int):
431
+ The number of processing units allocated to each replica.
432
+
433
+ This may be zero in API responses for instances that are not
434
+ yet in state ``READY``.
435
+
436
+ This field is a member of `oneof`_ ``compute_capacity``.
437
+ """
438
+
439
+ replica_selection: common.ReplicaSelection = proto.Field(
440
+ proto.MESSAGE,
441
+ number=1,
442
+ message=common.ReplicaSelection,
443
+ )
444
+ node_count: int = proto.Field(
445
+ proto.INT32,
446
+ number=2,
447
+ oneof="compute_capacity",
448
+ )
449
+ processing_units: int = proto.Field(
450
+ proto.INT32,
451
+ number=3,
452
+ oneof="compute_capacity",
453
+ )
454
+
455
+
456
+ class AutoscalingConfig(proto.Message):
457
+ r"""Autoscaling configuration for an instance.
458
+
459
+ Attributes:
460
+ autoscaling_limits (google.cloud.spanner_admin_instance_v1.types.AutoscalingConfig.AutoscalingLimits):
461
+ Required. Autoscaling limits for an instance.
462
+ autoscaling_targets (google.cloud.spanner_admin_instance_v1.types.AutoscalingConfig.AutoscalingTargets):
463
+ Required. The autoscaling targets for an
464
+ instance.
465
+ asymmetric_autoscaling_options (MutableSequence[google.cloud.spanner_admin_instance_v1.types.AutoscalingConfig.AsymmetricAutoscalingOption]):
466
+ Optional. Optional asymmetric autoscaling
467
+ options. Replicas matching the replica selection
468
+ criteria will be autoscaled independently from
469
+ other replicas. The autoscaler will scale the
470
+ replicas based on the utilization of replicas
471
+ identified by the replica selection. Replica
472
+ selections should not overlap with each other.
473
+
474
+ Other replicas (those do not match any replica
475
+ selection) will be autoscaled together and will
476
+ have the same compute capacity allocated to
477
+ them.
478
+ """
479
+
480
+ class AutoscalingLimits(proto.Message):
481
+ r"""The autoscaling limits for the instance. Users can define the
482
+ minimum and maximum compute capacity allocated to the instance, and
483
+ the autoscaler will only scale within that range. Users can either
484
+ use nodes or processing units to specify the limits, but should use
485
+ the same unit to set both the min_limit and max_limit.
486
+
487
+ This message has `oneof`_ fields (mutually exclusive fields).
488
+ For each oneof, at most one member field can be set at the same time.
489
+ Setting any member of the oneof automatically clears all other
490
+ members.
491
+
492
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
493
+
494
+ Attributes:
495
+ min_nodes (int):
496
+ Minimum number of nodes allocated to the
497
+ instance. If set, this number should be greater
498
+ than or equal to 1.
499
+
500
+ This field is a member of `oneof`_ ``min_limit``.
501
+ min_processing_units (int):
502
+ Minimum number of processing units allocated
503
+ to the instance. If set, this number should be
504
+ multiples of 1000.
505
+
506
+ This field is a member of `oneof`_ ``min_limit``.
507
+ max_nodes (int):
508
+ Maximum number of nodes allocated to the instance. If set,
509
+ this number should be greater than or equal to min_nodes.
510
+
511
+ This field is a member of `oneof`_ ``max_limit``.
512
+ max_processing_units (int):
513
+ Maximum number of processing units allocated to the
514
+ instance. If set, this number should be multiples of 1000
515
+ and be greater than or equal to min_processing_units.
516
+
517
+ This field is a member of `oneof`_ ``max_limit``.
518
+ """
519
+
520
+ min_nodes: int = proto.Field(
521
+ proto.INT32,
522
+ number=1,
523
+ oneof="min_limit",
524
+ )
525
+ min_processing_units: int = proto.Field(
526
+ proto.INT32,
527
+ number=2,
528
+ oneof="min_limit",
529
+ )
530
+ max_nodes: int = proto.Field(
531
+ proto.INT32,
532
+ number=3,
533
+ oneof="max_limit",
534
+ )
535
+ max_processing_units: int = proto.Field(
536
+ proto.INT32,
537
+ number=4,
538
+ oneof="max_limit",
539
+ )
540
+
541
+ class AutoscalingTargets(proto.Message):
542
+ r"""The autoscaling targets for an instance.
543
+
544
+ Attributes:
545
+ high_priority_cpu_utilization_percent (int):
546
+ Required. The target high priority cpu utilization
547
+ percentage that the autoscaler should be trying to achieve
548
+ for the instance. This number is on a scale from 0 (no
549
+ utilization) to 100 (full utilization). The valid range is
550
+ [10, 90] inclusive.
551
+ storage_utilization_percent (int):
552
+ Required. The target storage utilization percentage that the
553
+ autoscaler should be trying to achieve for the instance.
554
+ This number is on a scale from 0 (no utilization) to 100
555
+ (full utilization). The valid range is [10, 99] inclusive.
556
+ """
557
+
558
+ high_priority_cpu_utilization_percent: int = proto.Field(
559
+ proto.INT32,
560
+ number=1,
561
+ )
562
+ storage_utilization_percent: int = proto.Field(
563
+ proto.INT32,
564
+ number=2,
565
+ )
566
+
567
+ class AsymmetricAutoscalingOption(proto.Message):
568
+ r"""AsymmetricAutoscalingOption specifies the scaling of replicas
569
+ identified by the given selection.
570
+
571
+ Attributes:
572
+ replica_selection (google.cloud.spanner_admin_instance_v1.types.ReplicaSelection):
573
+ Required. Selects the replicas to which this
574
+ AsymmetricAutoscalingOption applies. Only
575
+ read-only replicas are supported.
576
+ overrides (google.cloud.spanner_admin_instance_v1.types.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides):
577
+ Optional. Overrides applied to the top-level
578
+ autoscaling configuration for the selected
579
+ replicas.
580
+ """
581
+
582
+ class AutoscalingConfigOverrides(proto.Message):
583
+ r"""Overrides the top-level autoscaling configuration for the replicas
584
+ identified by ``replica_selection``. All fields in this message are
585
+ optional. Any unspecified fields will use the corresponding values
586
+ from the top-level autoscaling configuration.
587
+
588
+ Attributes:
589
+ autoscaling_limits (google.cloud.spanner_admin_instance_v1.types.AutoscalingConfig.AutoscalingLimits):
590
+ Optional. If specified, overrides the min/max
591
+ limit in the top-level autoscaling configuration
592
+ for the selected replicas.
593
+ autoscaling_target_high_priority_cpu_utilization_percent (int):
594
+ Optional. If specified, overrides the autoscaling target
595
+ high_priority_cpu_utilization_percent in the top-level
596
+ autoscaling configuration for the selected replicas.
597
+ """
598
+
599
+ autoscaling_limits: "AutoscalingConfig.AutoscalingLimits" = proto.Field(
600
+ proto.MESSAGE,
601
+ number=1,
602
+ message="AutoscalingConfig.AutoscalingLimits",
603
+ )
604
+ autoscaling_target_high_priority_cpu_utilization_percent: int = proto.Field(
605
+ proto.INT32,
606
+ number=2,
607
+ )
608
+
609
+ replica_selection: common.ReplicaSelection = proto.Field(
610
+ proto.MESSAGE,
611
+ number=1,
612
+ message=common.ReplicaSelection,
613
+ )
614
+ overrides: "AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides" = proto.Field(
615
+ proto.MESSAGE,
616
+ number=2,
617
+ message="AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides",
618
+ )
619
+
620
+ autoscaling_limits: AutoscalingLimits = proto.Field(
621
+ proto.MESSAGE,
622
+ number=1,
623
+ message=AutoscalingLimits,
624
+ )
625
+ autoscaling_targets: AutoscalingTargets = proto.Field(
626
+ proto.MESSAGE,
627
+ number=2,
628
+ message=AutoscalingTargets,
629
+ )
630
+ asymmetric_autoscaling_options: MutableSequence[
631
+ AsymmetricAutoscalingOption
632
+ ] = proto.RepeatedField(
633
+ proto.MESSAGE,
634
+ number=3,
635
+ message=AsymmetricAutoscalingOption,
636
+ )
637
+
638
+
639
+ class Instance(proto.Message):
640
+ r"""An isolated set of Cloud Spanner resources on which databases
641
+ can be hosted.
642
+
643
+ Attributes:
644
+ name (str):
645
+ Required. A unique identifier for the instance, which cannot
646
+ be changed after the instance is created. Values are of the
647
+ form
648
+ ``projects/<project>/instances/[a-z][-a-z0-9]*[a-z0-9]``.
649
+ The final segment of the name must be between 2 and 64
650
+ characters in length.
651
+ config (str):
652
+ Required. The name of the instance's configuration. Values
653
+ are of the form
654
+ ``projects/<project>/instanceConfigs/<configuration>``. See
655
+ also
656
+ [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig]
657
+ and
658
+ [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
659
+ display_name (str):
660
+ Required. The descriptive name for this
661
+ instance as it appears in UIs. Must be unique
662
+ per project and between 4 and 30 characters in
663
+ length.
664
+ node_count (int):
665
+ The number of nodes allocated to this instance. At most, one
666
+ of either ``node_count`` or ``processing_units`` should be
667
+ present in the message.
668
+
669
+ Users can set the ``node_count`` field to specify the target
670
+ number of nodes allocated to the instance.
671
+
672
+ If autoscaling is enabled, ``node_count`` is treated as an
673
+ ``OUTPUT_ONLY`` field and reflects the current number of
674
+ nodes allocated to the instance.
675
+
676
+ This might be zero in API responses for instances that are
677
+ not yet in the ``READY`` state.
678
+
679
+ For more information, see `Compute capacity, nodes, and
680
+ processing
681
+ units <https://cloud.google.com/spanner/docs/compute-capacity>`__.
682
+ processing_units (int):
683
+ The number of processing units allocated to this instance.
684
+ At most, one of either ``processing_units`` or
685
+ ``node_count`` should be present in the message.
686
+
687
+ Users can set the ``processing_units`` field to specify the
688
+ target number of processing units allocated to the instance.
689
+
690
+ If autoscaling is enabled, ``processing_units`` is treated
691
+ as an ``OUTPUT_ONLY`` field and reflects the current number
692
+ of processing units allocated to the instance.
693
+
694
+ This might be zero in API responses for instances that are
695
+ not yet in the ``READY`` state.
696
+
697
+ For more information, see `Compute capacity, nodes and
698
+ processing
699
+ units <https://cloud.google.com/spanner/docs/compute-capacity>`__.
700
+ replica_compute_capacity (MutableSequence[google.cloud.spanner_admin_instance_v1.types.ReplicaComputeCapacity]):
701
+ Output only. Lists the compute capacity per
702
+ ReplicaSelection. A replica selection identifies
703
+ a set of replicas with common properties.
704
+ Replicas identified by a ReplicaSelection are
705
+ scaled with the same compute capacity.
706
+ autoscaling_config (google.cloud.spanner_admin_instance_v1.types.AutoscalingConfig):
707
+ Optional. The autoscaling configuration. Autoscaling is
708
+ enabled if this field is set. When autoscaling is enabled,
709
+ node_count and processing_units are treated as OUTPUT_ONLY
710
+ fields and reflect the current compute capacity allocated to
711
+ the instance.
712
+ state (google.cloud.spanner_admin_instance_v1.types.Instance.State):
713
+ Output only. The current instance state. For
714
+ [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance],
715
+ the state must be either omitted or set to ``CREATING``. For
716
+ [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance],
717
+ the state must be either omitted or set to ``READY``.
718
+ labels (MutableMapping[str, str]):
719
+ Cloud Labels are a flexible and lightweight mechanism for
720
+ organizing cloud resources into groups that reflect a
721
+ customer's organizational needs and deployment strategies.
722
+ Cloud Labels can be used to filter collections of resources.
723
+ They can be used to control how resource metrics are
724
+ aggregated. And they can be used as arguments to policy
725
+ management rules (e.g. route, firewall, load balancing,
726
+ etc.).
727
+
728
+ - Label keys must be between 1 and 63 characters long and
729
+ must conform to the following regular expression:
730
+ ``[a-z][a-z0-9_-]{0,62}``.
731
+ - Label values must be between 0 and 63 characters long and
732
+ must conform to the regular expression
733
+ ``[a-z0-9_-]{0,63}``.
734
+ - No more than 64 labels can be associated with a given
735
+ resource.
736
+
737
+ See https://goo.gl/xmQnxf for more information on and
738
+ examples of labels.
739
+
740
+ If you plan to use labels in your own code, please note that
741
+ additional characters may be allowed in the future. And so
742
+ you are advised to use an internal label representation,
743
+ such as JSON, which doesn't rely upon specific characters
744
+ being disallowed. For example, representing labels as the
745
+ string: name + "*" + value would prove problematic if we
746
+ were to allow "*" in a future release.
747
+ instance_type (google.cloud.spanner_admin_instance_v1.types.Instance.InstanceType):
748
+ The ``InstanceType`` of the current instance.
749
+ endpoint_uris (MutableSequence[str]):
750
+ Deprecated. This field is not populated.
751
+ create_time (google.protobuf.timestamp_pb2.Timestamp):
752
+ Output only. The time at which the instance
753
+ was created.
754
+ update_time (google.protobuf.timestamp_pb2.Timestamp):
755
+ Output only. The time at which the instance
756
+ was most recently updated.
757
+ free_instance_metadata (google.cloud.spanner_admin_instance_v1.types.FreeInstanceMetadata):
758
+ Free instance metadata. Only populated for
759
+ free instances.
760
+ edition (google.cloud.spanner_admin_instance_v1.types.Instance.Edition):
761
+ Optional. The ``Edition`` of the current instance.
762
+ default_backup_schedule_type (google.cloud.spanner_admin_instance_v1.types.Instance.DefaultBackupScheduleType):
763
+ Optional. Controls the default backup schedule behavior for
764
+ new databases within the instance. By default, a backup
765
+ schedule is created automatically when a new database is
766
+ created in a new instance.
767
+
768
+ Note that the ``AUTOMATIC`` value isn't permitted for free
769
+ instances, as backups and backup schedules aren't supported
770
+ for free instances.
771
+
772
+ In the ``GetInstance`` or ``ListInstances`` response, if the
773
+ value of ``default_backup_schedule_type`` isn't set, or set
774
+ to ``NONE``, Spanner doesn't create a default backup
775
+ schedule for new databases in the instance.
776
+ """
777
+
778
+ class State(proto.Enum):
779
+ r"""Indicates the current state of the instance.
780
+
781
+ Values:
782
+ STATE_UNSPECIFIED (0):
783
+ Not specified.
784
+ CREATING (1):
785
+ The instance is still being created.
786
+ Resources may not be available yet, and
787
+ operations such as database creation may not
788
+ work.
789
+ READY (2):
790
+ The instance is fully created and ready to do
791
+ work such as creating databases.
792
+ """
793
+ STATE_UNSPECIFIED = 0
794
+ CREATING = 1
795
+ READY = 2
796
+
797
+ class InstanceType(proto.Enum):
798
+ r"""The type of this instance. The type can be used to distinguish
799
+ product variants, that can affect aspects like: usage restrictions,
800
+ quotas and billing. Currently this is used to distinguish
801
+ FREE_INSTANCE vs PROVISIONED instances.
802
+
803
+ Values:
804
+ INSTANCE_TYPE_UNSPECIFIED (0):
805
+ Not specified.
806
+ PROVISIONED (1):
807
+ Provisioned instances have dedicated
808
+ resources, standard usage limits and support.
809
+ FREE_INSTANCE (2):
810
+ Free instances provide no guarantee for dedicated resources,
811
+ [node_count, processing_units] should be 0. They come with
812
+ stricter usage limits and limited support.
813
+ """
814
+ INSTANCE_TYPE_UNSPECIFIED = 0
815
+ PROVISIONED = 1
816
+ FREE_INSTANCE = 2
817
+
818
+ class Edition(proto.Enum):
819
+ r"""The edition selected for this instance. Different editions
820
+ provide different capabilities at different price points.
821
+
822
+ Values:
823
+ EDITION_UNSPECIFIED (0):
824
+ Edition not specified.
825
+ STANDARD (1):
826
+ Standard edition.
827
+ ENTERPRISE (2):
828
+ Enterprise edition.
829
+ ENTERPRISE_PLUS (3):
830
+ Enterprise Plus edition.
831
+ """
832
+ EDITION_UNSPECIFIED = 0
833
+ STANDARD = 1
834
+ ENTERPRISE = 2
835
+ ENTERPRISE_PLUS = 3
836
+
837
+ class DefaultBackupScheduleType(proto.Enum):
838
+ r"""Indicates the `default backup
839
+ schedule <https://cloud.google.com/spanner/docs/backup#default-backup-schedules>`__
840
+ behavior for new databases within the instance.
841
+
842
+ Values:
843
+ DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED (0):
844
+ Not specified.
845
+ NONE (1):
846
+ A default backup schedule isn't created
847
+ automatically when a new database is created in
848
+ the instance.
849
+ AUTOMATIC (2):
850
+ A default backup schedule is created
851
+ automatically when a new database is created in
852
+ the instance. The default backup schedule
853
+ creates a full backup every 24 hours. These full
854
+ backups are retained for 7 days. You can edit or
855
+ delete the default backup schedule once it's
856
+ created.
857
+ """
858
+ DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED = 0
859
+ NONE = 1
860
+ AUTOMATIC = 2
861
+
862
+ name: str = proto.Field(
863
+ proto.STRING,
864
+ number=1,
865
+ )
866
+ config: str = proto.Field(
867
+ proto.STRING,
868
+ number=2,
869
+ )
870
+ display_name: str = proto.Field(
871
+ proto.STRING,
872
+ number=3,
873
+ )
874
+ node_count: int = proto.Field(
875
+ proto.INT32,
876
+ number=5,
877
+ )
878
+ processing_units: int = proto.Field(
879
+ proto.INT32,
880
+ number=9,
881
+ )
882
+ replica_compute_capacity: MutableSequence[
883
+ "ReplicaComputeCapacity"
884
+ ] = proto.RepeatedField(
885
+ proto.MESSAGE,
886
+ number=19,
887
+ message="ReplicaComputeCapacity",
888
+ )
889
+ autoscaling_config: "AutoscalingConfig" = proto.Field(
890
+ proto.MESSAGE,
891
+ number=17,
892
+ message="AutoscalingConfig",
893
+ )
894
+ state: State = proto.Field(
895
+ proto.ENUM,
896
+ number=6,
897
+ enum=State,
898
+ )
899
+ labels: MutableMapping[str, str] = proto.MapField(
900
+ proto.STRING,
901
+ proto.STRING,
902
+ number=7,
903
+ )
904
+ instance_type: InstanceType = proto.Field(
905
+ proto.ENUM,
906
+ number=10,
907
+ enum=InstanceType,
908
+ )
909
+ endpoint_uris: MutableSequence[str] = proto.RepeatedField(
910
+ proto.STRING,
911
+ number=8,
912
+ )
913
+ create_time: timestamp_pb2.Timestamp = proto.Field(
914
+ proto.MESSAGE,
915
+ number=11,
916
+ message=timestamp_pb2.Timestamp,
917
+ )
918
+ update_time: timestamp_pb2.Timestamp = proto.Field(
919
+ proto.MESSAGE,
920
+ number=12,
921
+ message=timestamp_pb2.Timestamp,
922
+ )
923
+ free_instance_metadata: "FreeInstanceMetadata" = proto.Field(
924
+ proto.MESSAGE,
925
+ number=13,
926
+ message="FreeInstanceMetadata",
927
+ )
928
+ edition: Edition = proto.Field(
929
+ proto.ENUM,
930
+ number=20,
931
+ enum=Edition,
932
+ )
933
+ default_backup_schedule_type: DefaultBackupScheduleType = proto.Field(
934
+ proto.ENUM,
935
+ number=23,
936
+ enum=DefaultBackupScheduleType,
937
+ )
938
+
939
+
940
+ class ListInstanceConfigsRequest(proto.Message):
941
+ r"""The request for
942
+ [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
943
+
944
+ Attributes:
945
+ parent (str):
946
+ Required. The name of the project for which a list of
947
+ supported instance configurations is requested. Values are
948
+ of the form ``projects/<project>``.
949
+ page_size (int):
950
+ Number of instance configurations to be
951
+ returned in the response. If 0 or less, defaults
952
+ to the server's maximum allowed page size.
953
+ page_token (str):
954
+ If non-empty, ``page_token`` should contain a
955
+ [next_page_token][google.spanner.admin.instance.v1.ListInstanceConfigsResponse.next_page_token]
956
+ from a previous
957
+ [ListInstanceConfigsResponse][google.spanner.admin.instance.v1.ListInstanceConfigsResponse].
958
+ """
959
+
960
+ parent: str = proto.Field(
961
+ proto.STRING,
962
+ number=1,
963
+ )
964
+ page_size: int = proto.Field(
965
+ proto.INT32,
966
+ number=2,
967
+ )
968
+ page_token: str = proto.Field(
969
+ proto.STRING,
970
+ number=3,
971
+ )
972
+
973
+
974
+ class ListInstanceConfigsResponse(proto.Message):
975
+ r"""The response for
976
+ [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
977
+
978
+ Attributes:
979
+ instance_configs (MutableSequence[google.cloud.spanner_admin_instance_v1.types.InstanceConfig]):
980
+ The list of requested instance
981
+ configurations.
982
+ next_page_token (str):
983
+ ``next_page_token`` can be sent in a subsequent
984
+ [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]
985
+ call to fetch more of the matching instance configurations.
986
+ """
987
+
988
+ @property
989
+ def raw_page(self):
990
+ return self
991
+
992
+ instance_configs: MutableSequence["InstanceConfig"] = proto.RepeatedField(
993
+ proto.MESSAGE,
994
+ number=1,
995
+ message="InstanceConfig",
996
+ )
997
+ next_page_token: str = proto.Field(
998
+ proto.STRING,
999
+ number=2,
1000
+ )
1001
+
1002
+
1003
+ class GetInstanceConfigRequest(proto.Message):
1004
+ r"""The request for
1005
+ [GetInstanceConfigRequest][google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig].
1006
+
1007
+ Attributes:
1008
+ name (str):
1009
+ Required. The name of the requested instance configuration.
1010
+ Values are of the form
1011
+ ``projects/<project>/instanceConfigs/<config>``.
1012
+ """
1013
+
1014
+ name: str = proto.Field(
1015
+ proto.STRING,
1016
+ number=1,
1017
+ )
1018
+
1019
+
1020
+ class CreateInstanceConfigRequest(proto.Message):
1021
+ r"""The request for
1022
+ [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig].
1023
+
1024
+ Attributes:
1025
+ parent (str):
1026
+ Required. The name of the project in which to create the
1027
+ instance configuration. Values are of the form
1028
+ ``projects/<project>``.
1029
+ instance_config_id (str):
1030
+ Required. The ID of the instance configuration to create.
1031
+ Valid identifiers are of the form
1032
+ ``custom-[-a-z0-9]*[a-z0-9]`` and must be between 2 and 64
1033
+ characters in length. The ``custom-`` prefix is required to
1034
+ avoid name conflicts with Google-managed configurations.
1035
+ instance_config (google.cloud.spanner_admin_instance_v1.types.InstanceConfig):
1036
+ Required. The ``InstanceConfig`` proto of the configuration
1037
+ to create. ``instance_config.name`` must be
1038
+ ``<parent>/instanceConfigs/<instance_config_id>``.
1039
+ ``instance_config.base_config`` must be a Google-managed
1040
+ configuration name, e.g. /instanceConfigs/us-east1,
1041
+ /instanceConfigs/nam3.
1042
+ validate_only (bool):
1043
+ An option to validate, but not actually
1044
+ execute, a request, and provide the same
1045
+ response.
1046
+ """
1047
+
1048
+ parent: str = proto.Field(
1049
+ proto.STRING,
1050
+ number=1,
1051
+ )
1052
+ instance_config_id: str = proto.Field(
1053
+ proto.STRING,
1054
+ number=2,
1055
+ )
1056
+ instance_config: "InstanceConfig" = proto.Field(
1057
+ proto.MESSAGE,
1058
+ number=3,
1059
+ message="InstanceConfig",
1060
+ )
1061
+ validate_only: bool = proto.Field(
1062
+ proto.BOOL,
1063
+ number=4,
1064
+ )
1065
+
1066
+
1067
+ class UpdateInstanceConfigRequest(proto.Message):
1068
+ r"""The request for
1069
+ [UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig].
1070
+
1071
+ Attributes:
1072
+ instance_config (google.cloud.spanner_admin_instance_v1.types.InstanceConfig):
1073
+ Required. The user instance configuration to update, which
1074
+ must always include the instance configuration name.
1075
+ Otherwise, only fields mentioned in
1076
+ [update_mask][google.spanner.admin.instance.v1.UpdateInstanceConfigRequest.update_mask]
1077
+ need be included. To prevent conflicts of concurrent
1078
+ updates,
1079
+ [etag][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
1080
+ can be used.
1081
+ update_mask (google.protobuf.field_mask_pb2.FieldMask):
1082
+ Required. A mask specifying which fields in
1083
+ [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig]
1084
+ should be updated. The field mask must always be specified;
1085
+ this prevents any future fields in
1086
+ [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig]
1087
+ from being erased accidentally by clients that do not know
1088
+ about them. Only display_name and labels can be updated.
1089
+ validate_only (bool):
1090
+ An option to validate, but not actually
1091
+ execute, a request, and provide the same
1092
+ response.
1093
+ """
1094
+
1095
+ instance_config: "InstanceConfig" = proto.Field(
1096
+ proto.MESSAGE,
1097
+ number=1,
1098
+ message="InstanceConfig",
1099
+ )
1100
+ update_mask: field_mask_pb2.FieldMask = proto.Field(
1101
+ proto.MESSAGE,
1102
+ number=2,
1103
+ message=field_mask_pb2.FieldMask,
1104
+ )
1105
+ validate_only: bool = proto.Field(
1106
+ proto.BOOL,
1107
+ number=3,
1108
+ )
1109
+
1110
+
1111
+ class DeleteInstanceConfigRequest(proto.Message):
1112
+ r"""The request for
1113
+ [DeleteInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstanceConfig].
1114
+
1115
+ Attributes:
1116
+ name (str):
1117
+ Required. The name of the instance configuration to be
1118
+ deleted. Values are of the form
1119
+ ``projects/<project>/instanceConfigs/<instance_config>``
1120
+ etag (str):
1121
+ Used for optimistic concurrency control as a
1122
+ way to help prevent simultaneous deletes of an
1123
+ instance configuration from overwriting each
1124
+ other. If not empty, the API
1125
+ only deletes the instance configuration when the
1126
+ etag provided matches the current status of the
1127
+ requested instance configuration. Otherwise,
1128
+ deletes the instance configuration without
1129
+ checking the current status of the requested
1130
+ instance configuration.
1131
+ validate_only (bool):
1132
+ An option to validate, but not actually
1133
+ execute, a request, and provide the same
1134
+ response.
1135
+ """
1136
+
1137
+ name: str = proto.Field(
1138
+ proto.STRING,
1139
+ number=1,
1140
+ )
1141
+ etag: str = proto.Field(
1142
+ proto.STRING,
1143
+ number=2,
1144
+ )
1145
+ validate_only: bool = proto.Field(
1146
+ proto.BOOL,
1147
+ number=3,
1148
+ )
1149
+
1150
+
1151
+ class ListInstanceConfigOperationsRequest(proto.Message):
1152
+ r"""The request for
1153
+ [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations].
1154
+
1155
+ Attributes:
1156
+ parent (str):
1157
+ Required. The project of the instance configuration
1158
+ operations. Values are of the form ``projects/<project>``.
1159
+ filter (str):
1160
+ An expression that filters the list of returned operations.
1161
+
1162
+ A filter expression consists of a field name, a comparison
1163
+ operator, and a value for filtering. The value must be a
1164
+ string, a number, or a boolean. The comparison operator must
1165
+ be one of: ``<``, ``>``, ``<=``, ``>=``, ``!=``, ``=``, or
1166
+ ``:``. Colon ``:`` is the contains operator. Filter rules
1167
+ are not case sensitive.
1168
+
1169
+ The following fields in the Operation are eligible for
1170
+ filtering:
1171
+
1172
+ - ``name`` - The name of the long-running operation
1173
+ - ``done`` - False if the operation is in progress, else
1174
+ true.
1175
+ - ``metadata.@type`` - the type of metadata. For example,
1176
+ the type string for
1177
+ [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]
1178
+ is
1179
+ ``type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata``.
1180
+ - ``metadata.<field_name>`` - any field in metadata.value.
1181
+ ``metadata.@type`` must be specified first, if filtering
1182
+ on metadata fields.
1183
+ - ``error`` - Error associated with the long-running
1184
+ operation.
1185
+ - ``response.@type`` - the type of response.
1186
+ - ``response.<field_name>`` - any field in response.value.
1187
+
1188
+ You can combine multiple expressions by enclosing each
1189
+ expression in parentheses. By default, expressions are
1190
+ combined with AND logic. However, you can specify AND, OR,
1191
+ and NOT logic explicitly.
1192
+
1193
+ Here are a few examples:
1194
+
1195
+ - ``done:true`` - The operation is complete.
1196
+ - ``(metadata.@type=``
1197
+ ``type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) AND``
1198
+ ``(metadata.instance_config.name:custom-config) AND``
1199
+ ``(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND``
1200
+ ``(error:*)`` - Return operations where:
1201
+
1202
+ - The operation's metadata type is
1203
+ [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
1204
+ - The instance configuration name contains
1205
+ "custom-config".
1206
+ - The operation started before 2021-03-28T14:50:00Z.
1207
+ - The operation resulted in an error.
1208
+ page_size (int):
1209
+ Number of operations to be returned in the
1210
+ response. If 0 or less, defaults to the server's
1211
+ maximum allowed page size.
1212
+ page_token (str):
1213
+ If non-empty, ``page_token`` should contain a
1214
+ [next_page_token][google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse.next_page_token]
1215
+ from a previous
1216
+ [ListInstanceConfigOperationsResponse][google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse]
1217
+ to the same ``parent`` and with the same ``filter``.
1218
+ """
1219
+
1220
+ parent: str = proto.Field(
1221
+ proto.STRING,
1222
+ number=1,
1223
+ )
1224
+ filter: str = proto.Field(
1225
+ proto.STRING,
1226
+ number=2,
1227
+ )
1228
+ page_size: int = proto.Field(
1229
+ proto.INT32,
1230
+ number=3,
1231
+ )
1232
+ page_token: str = proto.Field(
1233
+ proto.STRING,
1234
+ number=4,
1235
+ )
1236
+
1237
+
1238
+ class ListInstanceConfigOperationsResponse(proto.Message):
1239
+ r"""The response for
1240
+ [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations].
1241
+
1242
+ Attributes:
1243
+ operations (MutableSequence[google.longrunning.operations_pb2.Operation]):
1244
+ The list of matching instance configuration long-running
1245
+ operations. Each operation's name will be prefixed by the
1246
+ name of the instance configuration. The operation's metadata
1247
+ field type ``metadata.type_url`` describes the type of the
1248
+ metadata.
1249
+ next_page_token (str):
1250
+ ``next_page_token`` can be sent in a subsequent
1251
+ [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations]
1252
+ call to fetch more of the matching metadata.
1253
+ """
1254
+
1255
+ @property
1256
+ def raw_page(self):
1257
+ return self
1258
+
1259
+ operations: MutableSequence[operations_pb2.Operation] = proto.RepeatedField(
1260
+ proto.MESSAGE,
1261
+ number=1,
1262
+ message=operations_pb2.Operation,
1263
+ )
1264
+ next_page_token: str = proto.Field(
1265
+ proto.STRING,
1266
+ number=2,
1267
+ )
1268
+
1269
+
1270
+ class GetInstanceRequest(proto.Message):
1271
+ r"""The request for
1272
+ [GetInstance][google.spanner.admin.instance.v1.InstanceAdmin.GetInstance].
1273
+
1274
+ Attributes:
1275
+ name (str):
1276
+ Required. The name of the requested instance. Values are of
1277
+ the form ``projects/<project>/instances/<instance>``.
1278
+ field_mask (google.protobuf.field_mask_pb2.FieldMask):
1279
+ If field_mask is present, specifies the subset of
1280
+ [Instance][google.spanner.admin.instance.v1.Instance] fields
1281
+ that should be returned. If absent, all
1282
+ [Instance][google.spanner.admin.instance.v1.Instance] fields
1283
+ are returned.
1284
+ """
1285
+
1286
+ name: str = proto.Field(
1287
+ proto.STRING,
1288
+ number=1,
1289
+ )
1290
+ field_mask: field_mask_pb2.FieldMask = proto.Field(
1291
+ proto.MESSAGE,
1292
+ number=2,
1293
+ message=field_mask_pb2.FieldMask,
1294
+ )
1295
+
1296
+
1297
+ class CreateInstanceRequest(proto.Message):
1298
+ r"""The request for
1299
+ [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance].
1300
+
1301
+ Attributes:
1302
+ parent (str):
1303
+ Required. The name of the project in which to create the
1304
+ instance. Values are of the form ``projects/<project>``.
1305
+ instance_id (str):
1306
+ Required. The ID of the instance to create. Valid
1307
+ identifiers are of the form ``[a-z][-a-z0-9]*[a-z0-9]`` and
1308
+ must be between 2 and 64 characters in length.
1309
+ instance (google.cloud.spanner_admin_instance_v1.types.Instance):
1310
+ Required. The instance to create. The name may be omitted,
1311
+ but if specified must be
1312
+ ``<parent>/instances/<instance_id>``.
1313
+ """
1314
+
1315
+ parent: str = proto.Field(
1316
+ proto.STRING,
1317
+ number=1,
1318
+ )
1319
+ instance_id: str = proto.Field(
1320
+ proto.STRING,
1321
+ number=2,
1322
+ )
1323
+ instance: "Instance" = proto.Field(
1324
+ proto.MESSAGE,
1325
+ number=3,
1326
+ message="Instance",
1327
+ )
1328
+
1329
+
1330
+ class ListInstancesRequest(proto.Message):
1331
+ r"""The request for
1332
+ [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances].
1333
+
1334
+ Attributes:
1335
+ parent (str):
1336
+ Required. The name of the project for which a list of
1337
+ instances is requested. Values are of the form
1338
+ ``projects/<project>``.
1339
+ page_size (int):
1340
+ Number of instances to be returned in the
1341
+ response. If 0 or less, defaults to the server's
1342
+ maximum allowed page size.
1343
+ page_token (str):
1344
+ If non-empty, ``page_token`` should contain a
1345
+ [next_page_token][google.spanner.admin.instance.v1.ListInstancesResponse.next_page_token]
1346
+ from a previous
1347
+ [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
1348
+ filter (str):
1349
+ An expression for filtering the results of the request.
1350
+ Filter rules are case insensitive. The fields eligible for
1351
+ filtering are:
1352
+
1353
+ - ``name``
1354
+ - ``display_name``
1355
+ - ``labels.key`` where key is the name of a label
1356
+
1357
+ Some examples of using filters are:
1358
+
1359
+ - ``name:*`` --> The instance has a name.
1360
+ - ``name:Howl`` --> The instance's name contains the string
1361
+ "howl".
1362
+ - ``name:HOWL`` --> Equivalent to above.
1363
+ - ``NAME:howl`` --> Equivalent to above.
1364
+ - ``labels.env:*`` --> The instance has the label "env".
1365
+ - ``labels.env:dev`` --> The instance has the label "env"
1366
+ and the value of the label contains the string "dev".
1367
+ - ``name:howl labels.env:dev`` --> The instance's name
1368
+ contains "howl" and it has the label "env" with its value
1369
+ containing "dev".
1370
+ instance_deadline (google.protobuf.timestamp_pb2.Timestamp):
1371
+ Deadline used while retrieving metadata for instances.
1372
+ Instances whose metadata cannot be retrieved within this
1373
+ deadline will be added to
1374
+ [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
1375
+ in
1376
+ [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
1377
+ """
1378
+
1379
+ parent: str = proto.Field(
1380
+ proto.STRING,
1381
+ number=1,
1382
+ )
1383
+ page_size: int = proto.Field(
1384
+ proto.INT32,
1385
+ number=2,
1386
+ )
1387
+ page_token: str = proto.Field(
1388
+ proto.STRING,
1389
+ number=3,
1390
+ )
1391
+ filter: str = proto.Field(
1392
+ proto.STRING,
1393
+ number=4,
1394
+ )
1395
+ instance_deadline: timestamp_pb2.Timestamp = proto.Field(
1396
+ proto.MESSAGE,
1397
+ number=5,
1398
+ message=timestamp_pb2.Timestamp,
1399
+ )
1400
+
1401
+
1402
+ class ListInstancesResponse(proto.Message):
1403
+ r"""The response for
1404
+ [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances].
1405
+
1406
+ Attributes:
1407
+ instances (MutableSequence[google.cloud.spanner_admin_instance_v1.types.Instance]):
1408
+ The list of requested instances.
1409
+ next_page_token (str):
1410
+ ``next_page_token`` can be sent in a subsequent
1411
+ [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]
1412
+ call to fetch more of the matching instances.
1413
+ unreachable (MutableSequence[str]):
1414
+ The list of unreachable instances. It includes the names of
1415
+ instances whose metadata could not be retrieved within
1416
+ [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
1417
+ """
1418
+
1419
+ @property
1420
+ def raw_page(self):
1421
+ return self
1422
+
1423
+ instances: MutableSequence["Instance"] = proto.RepeatedField(
1424
+ proto.MESSAGE,
1425
+ number=1,
1426
+ message="Instance",
1427
+ )
1428
+ next_page_token: str = proto.Field(
1429
+ proto.STRING,
1430
+ number=2,
1431
+ )
1432
+ unreachable: MutableSequence[str] = proto.RepeatedField(
1433
+ proto.STRING,
1434
+ number=3,
1435
+ )
1436
+
1437
+
1438
+ class UpdateInstanceRequest(proto.Message):
1439
+ r"""The request for
1440
+ [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance].
1441
+
1442
+ Attributes:
1443
+ instance (google.cloud.spanner_admin_instance_v1.types.Instance):
1444
+ Required. The instance to update, which must always include
1445
+ the instance name. Otherwise, only fields mentioned in
1446
+ [field_mask][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask]
1447
+ need be included.
1448
+ field_mask (google.protobuf.field_mask_pb2.FieldMask):
1449
+ Required. A mask specifying which fields in
1450
+ [Instance][google.spanner.admin.instance.v1.Instance] should
1451
+ be updated. The field mask must always be specified; this
1452
+ prevents any future fields in
1453
+ [Instance][google.spanner.admin.instance.v1.Instance] from
1454
+ being erased accidentally by clients that do not know about
1455
+ them.
1456
+ """
1457
+
1458
+ instance: "Instance" = proto.Field(
1459
+ proto.MESSAGE,
1460
+ number=1,
1461
+ message="Instance",
1462
+ )
1463
+ field_mask: field_mask_pb2.FieldMask = proto.Field(
1464
+ proto.MESSAGE,
1465
+ number=2,
1466
+ message=field_mask_pb2.FieldMask,
1467
+ )
1468
+
1469
+
1470
+ class DeleteInstanceRequest(proto.Message):
1471
+ r"""The request for
1472
+ [DeleteInstance][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance].
1473
+
1474
+ Attributes:
1475
+ name (str):
1476
+ Required. The name of the instance to be deleted. Values are
1477
+ of the form ``projects/<project>/instances/<instance>``
1478
+ """
1479
+
1480
+ name: str = proto.Field(
1481
+ proto.STRING,
1482
+ number=1,
1483
+ )
1484
+
1485
+
1486
+ class CreateInstanceMetadata(proto.Message):
1487
+ r"""Metadata type for the operation returned by
1488
+ [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance].
1489
+
1490
+ Attributes:
1491
+ instance (google.cloud.spanner_admin_instance_v1.types.Instance):
1492
+ The instance being created.
1493
+ start_time (google.protobuf.timestamp_pb2.Timestamp):
1494
+ The time at which the
1495
+ [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance]
1496
+ request was received.
1497
+ cancel_time (google.protobuf.timestamp_pb2.Timestamp):
1498
+ The time at which this operation was
1499
+ cancelled. If set, this operation is in the
1500
+ process of undoing itself (which is guaranteed
1501
+ to succeed) and cannot be cancelled again.
1502
+ end_time (google.protobuf.timestamp_pb2.Timestamp):
1503
+ The time at which this operation failed or
1504
+ was completed successfully.
1505
+ expected_fulfillment_period (google.cloud.spanner_admin_instance_v1.types.FulfillmentPeriod):
1506
+ The expected fulfillment period of this
1507
+ create operation.
1508
+ """
1509
+
1510
+ instance: "Instance" = proto.Field(
1511
+ proto.MESSAGE,
1512
+ number=1,
1513
+ message="Instance",
1514
+ )
1515
+ start_time: timestamp_pb2.Timestamp = proto.Field(
1516
+ proto.MESSAGE,
1517
+ number=2,
1518
+ message=timestamp_pb2.Timestamp,
1519
+ )
1520
+ cancel_time: timestamp_pb2.Timestamp = proto.Field(
1521
+ proto.MESSAGE,
1522
+ number=3,
1523
+ message=timestamp_pb2.Timestamp,
1524
+ )
1525
+ end_time: timestamp_pb2.Timestamp = proto.Field(
1526
+ proto.MESSAGE,
1527
+ number=4,
1528
+ message=timestamp_pb2.Timestamp,
1529
+ )
1530
+ expected_fulfillment_period: common.FulfillmentPeriod = proto.Field(
1531
+ proto.ENUM,
1532
+ number=5,
1533
+ enum=common.FulfillmentPeriod,
1534
+ )
1535
+
1536
+
1537
+ class UpdateInstanceMetadata(proto.Message):
1538
+ r"""Metadata type for the operation returned by
1539
+ [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance].
1540
+
1541
+ Attributes:
1542
+ instance (google.cloud.spanner_admin_instance_v1.types.Instance):
1543
+ The desired end state of the update.
1544
+ start_time (google.protobuf.timestamp_pb2.Timestamp):
1545
+ The time at which
1546
+ [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance]
1547
+ request was received.
1548
+ cancel_time (google.protobuf.timestamp_pb2.Timestamp):
1549
+ The time at which this operation was
1550
+ cancelled. If set, this operation is in the
1551
+ process of undoing itself (which is guaranteed
1552
+ to succeed) and cannot be cancelled again.
1553
+ end_time (google.protobuf.timestamp_pb2.Timestamp):
1554
+ The time at which this operation failed or
1555
+ was completed successfully.
1556
+ expected_fulfillment_period (google.cloud.spanner_admin_instance_v1.types.FulfillmentPeriod):
1557
+ The expected fulfillment period of this
1558
+ update operation.
1559
+ """
1560
+
1561
+ instance: "Instance" = proto.Field(
1562
+ proto.MESSAGE,
1563
+ number=1,
1564
+ message="Instance",
1565
+ )
1566
+ start_time: timestamp_pb2.Timestamp = proto.Field(
1567
+ proto.MESSAGE,
1568
+ number=2,
1569
+ message=timestamp_pb2.Timestamp,
1570
+ )
1571
+ cancel_time: timestamp_pb2.Timestamp = proto.Field(
1572
+ proto.MESSAGE,
1573
+ number=3,
1574
+ message=timestamp_pb2.Timestamp,
1575
+ )
1576
+ end_time: timestamp_pb2.Timestamp = proto.Field(
1577
+ proto.MESSAGE,
1578
+ number=4,
1579
+ message=timestamp_pb2.Timestamp,
1580
+ )
1581
+ expected_fulfillment_period: common.FulfillmentPeriod = proto.Field(
1582
+ proto.ENUM,
1583
+ number=5,
1584
+ enum=common.FulfillmentPeriod,
1585
+ )
1586
+
1587
+
1588
+ class FreeInstanceMetadata(proto.Message):
1589
+ r"""Free instance specific metadata that is kept even after an
1590
+ instance has been upgraded for tracking purposes.
1591
+
1592
+ Attributes:
1593
+ expire_time (google.protobuf.timestamp_pb2.Timestamp):
1594
+ Output only. Timestamp after which the
1595
+ instance will either be upgraded or scheduled
1596
+ for deletion after a grace period.
1597
+ ExpireBehavior is used to choose between
1598
+ upgrading or scheduling the free instance for
1599
+ deletion. This timestamp is set during the
1600
+ creation of a free instance.
1601
+ upgrade_time (google.protobuf.timestamp_pb2.Timestamp):
1602
+ Output only. If present, the timestamp at
1603
+ which the free instance was upgraded to a
1604
+ provisioned instance.
1605
+ expire_behavior (google.cloud.spanner_admin_instance_v1.types.FreeInstanceMetadata.ExpireBehavior):
1606
+ Specifies the expiration behavior of a free instance. The
1607
+ default of ExpireBehavior is ``REMOVE_AFTER_GRACE_PERIOD``.
1608
+ This can be modified during or after creation, and before
1609
+ expiration.
1610
+ """
1611
+
1612
+ class ExpireBehavior(proto.Enum):
1613
+ r"""Allows users to change behavior when a free instance expires.
1614
+
1615
+ Values:
1616
+ EXPIRE_BEHAVIOR_UNSPECIFIED (0):
1617
+ Not specified.
1618
+ FREE_TO_PROVISIONED (1):
1619
+ When the free instance expires, upgrade the
1620
+ instance to a provisioned instance.
1621
+ REMOVE_AFTER_GRACE_PERIOD (2):
1622
+ When the free instance expires, disable the
1623
+ instance, and delete it after the grace period
1624
+ passes if it has not been upgraded.
1625
+ """
1626
+ EXPIRE_BEHAVIOR_UNSPECIFIED = 0
1627
+ FREE_TO_PROVISIONED = 1
1628
+ REMOVE_AFTER_GRACE_PERIOD = 2
1629
+
1630
+ expire_time: timestamp_pb2.Timestamp = proto.Field(
1631
+ proto.MESSAGE,
1632
+ number=1,
1633
+ message=timestamp_pb2.Timestamp,
1634
+ )
1635
+ upgrade_time: timestamp_pb2.Timestamp = proto.Field(
1636
+ proto.MESSAGE,
1637
+ number=2,
1638
+ message=timestamp_pb2.Timestamp,
1639
+ )
1640
+ expire_behavior: ExpireBehavior = proto.Field(
1641
+ proto.ENUM,
1642
+ number=3,
1643
+ enum=ExpireBehavior,
1644
+ )
1645
+
1646
+
1647
+ class CreateInstanceConfigMetadata(proto.Message):
1648
+ r"""Metadata type for the operation returned by
1649
+ [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig].
1650
+
1651
+ Attributes:
1652
+ instance_config (google.cloud.spanner_admin_instance_v1.types.InstanceConfig):
1653
+ The target instance configuration end state.
1654
+ progress (google.cloud.spanner_admin_instance_v1.types.OperationProgress):
1655
+ The progress of the
1656
+ [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig]
1657
+ operation.
1658
+ cancel_time (google.protobuf.timestamp_pb2.Timestamp):
1659
+ The time at which this operation was
1660
+ cancelled.
1661
+ """
1662
+
1663
+ instance_config: "InstanceConfig" = proto.Field(
1664
+ proto.MESSAGE,
1665
+ number=1,
1666
+ message="InstanceConfig",
1667
+ )
1668
+ progress: common.OperationProgress = proto.Field(
1669
+ proto.MESSAGE,
1670
+ number=2,
1671
+ message=common.OperationProgress,
1672
+ )
1673
+ cancel_time: timestamp_pb2.Timestamp = proto.Field(
1674
+ proto.MESSAGE,
1675
+ number=3,
1676
+ message=timestamp_pb2.Timestamp,
1677
+ )
1678
+
1679
+
1680
+ class UpdateInstanceConfigMetadata(proto.Message):
1681
+ r"""Metadata type for the operation returned by
1682
+ [UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig].
1683
+
1684
+ Attributes:
1685
+ instance_config (google.cloud.spanner_admin_instance_v1.types.InstanceConfig):
1686
+ The desired instance configuration after
1687
+ updating.
1688
+ progress (google.cloud.spanner_admin_instance_v1.types.OperationProgress):
1689
+ The progress of the
1690
+ [UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig]
1691
+ operation.
1692
+ cancel_time (google.protobuf.timestamp_pb2.Timestamp):
1693
+ The time at which this operation was
1694
+ cancelled.
1695
+ """
1696
+
1697
+ instance_config: "InstanceConfig" = proto.Field(
1698
+ proto.MESSAGE,
1699
+ number=1,
1700
+ message="InstanceConfig",
1701
+ )
1702
+ progress: common.OperationProgress = proto.Field(
1703
+ proto.MESSAGE,
1704
+ number=2,
1705
+ message=common.OperationProgress,
1706
+ )
1707
+ cancel_time: timestamp_pb2.Timestamp = proto.Field(
1708
+ proto.MESSAGE,
1709
+ number=3,
1710
+ message=timestamp_pb2.Timestamp,
1711
+ )
1712
+
1713
+
1714
+ class InstancePartition(proto.Message):
1715
+ r"""An isolated set of Cloud Spanner resources that databases can
1716
+ define placements on.
1717
+
1718
+ This message has `oneof`_ fields (mutually exclusive fields).
1719
+ For each oneof, at most one member field can be set at the same time.
1720
+ Setting any member of the oneof automatically clears all other
1721
+ members.
1722
+
1723
+ .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
1724
+
1725
+ Attributes:
1726
+ name (str):
1727
+ Required. A unique identifier for the instance partition.
1728
+ Values are of the form
1729
+ ``projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]``.
1730
+ The final segment of the name must be between 2 and 64
1731
+ characters in length. An instance partition's name cannot be
1732
+ changed after the instance partition is created.
1733
+ config (str):
1734
+ Required. The name of the instance partition's
1735
+ configuration. Values are of the form
1736
+ ``projects/<project>/instanceConfigs/<configuration>``. See
1737
+ also
1738
+ [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig]
1739
+ and
1740
+ [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
1741
+ display_name (str):
1742
+ Required. The descriptive name for this
1743
+ instance partition as it appears in UIs. Must be
1744
+ unique per project and between 4 and 30
1745
+ characters in length.
1746
+ node_count (int):
1747
+ The number of nodes allocated to this instance partition.
1748
+
1749
+ Users can set the ``node_count`` field to specify the target
1750
+ number of nodes allocated to the instance partition.
1751
+
1752
+ This may be zero in API responses for instance partitions
1753
+ that are not yet in state ``READY``.
1754
+
1755
+ This field is a member of `oneof`_ ``compute_capacity``.
1756
+ processing_units (int):
1757
+ The number of processing units allocated to this instance
1758
+ partition.
1759
+
1760
+ Users can set the ``processing_units`` field to specify the
1761
+ target number of processing units allocated to the instance
1762
+ partition.
1763
+
1764
+ This might be zero in API responses for instance partitions
1765
+ that are not yet in the ``READY`` state.
1766
+
1767
+ This field is a member of `oneof`_ ``compute_capacity``.
1768
+ state (google.cloud.spanner_admin_instance_v1.types.InstancePartition.State):
1769
+ Output only. The current instance partition
1770
+ state.
1771
+ create_time (google.protobuf.timestamp_pb2.Timestamp):
1772
+ Output only. The time at which the instance
1773
+ partition was created.
1774
+ update_time (google.protobuf.timestamp_pb2.Timestamp):
1775
+ Output only. The time at which the instance
1776
+ partition was most recently updated.
1777
+ referencing_databases (MutableSequence[str]):
1778
+ Output only. The names of the databases that
1779
+ reference this instance partition. Referencing
1780
+ databases should share the parent instance. The
1781
+ existence of any referencing database prevents
1782
+ the instance partition from being deleted.
1783
+ referencing_backups (MutableSequence[str]):
1784
+ Output only. Deprecated: This field is not
1785
+ populated. Output only. The names of the backups
1786
+ that reference this instance partition.
1787
+ Referencing backups should share the parent
1788
+ instance. The existence of any referencing
1789
+ backup prevents the instance partition from
1790
+ being deleted.
1791
+ etag (str):
1792
+ Used for optimistic concurrency control as a
1793
+ way to help prevent simultaneous updates of a
1794
+ instance partition from overwriting each other.
1795
+ It is strongly suggested that systems make use
1796
+ of the etag in the read-modify-write cycle to
1797
+ perform instance partition updates in order to
1798
+ avoid race conditions: An etag is returned in
1799
+ the response which contains instance partitions,
1800
+ and systems are expected to put that etag in the
1801
+ request to update instance partitions to ensure
1802
+ that their change will be applied to the same
1803
+ version of the instance partition. If no etag is
1804
+ provided in the call to update instance
1805
+ partition, then the existing instance partition
1806
+ is overwritten blindly.
1807
+ """
1808
+
1809
+ class State(proto.Enum):
1810
+ r"""Indicates the current state of the instance partition.
1811
+
1812
+ Values:
1813
+ STATE_UNSPECIFIED (0):
1814
+ Not specified.
1815
+ CREATING (1):
1816
+ The instance partition is still being
1817
+ created. Resources may not be available yet, and
1818
+ operations such as creating placements using
1819
+ this instance partition may not work.
1820
+ READY (2):
1821
+ The instance partition is fully created and
1822
+ ready to do work such as creating placements and
1823
+ using in databases.
1824
+ """
1825
+ STATE_UNSPECIFIED = 0
1826
+ CREATING = 1
1827
+ READY = 2
1828
+
1829
+ name: str = proto.Field(
1830
+ proto.STRING,
1831
+ number=1,
1832
+ )
1833
+ config: str = proto.Field(
1834
+ proto.STRING,
1835
+ number=2,
1836
+ )
1837
+ display_name: str = proto.Field(
1838
+ proto.STRING,
1839
+ number=3,
1840
+ )
1841
+ node_count: int = proto.Field(
1842
+ proto.INT32,
1843
+ number=5,
1844
+ oneof="compute_capacity",
1845
+ )
1846
+ processing_units: int = proto.Field(
1847
+ proto.INT32,
1848
+ number=6,
1849
+ oneof="compute_capacity",
1850
+ )
1851
+ state: State = proto.Field(
1852
+ proto.ENUM,
1853
+ number=7,
1854
+ enum=State,
1855
+ )
1856
+ create_time: timestamp_pb2.Timestamp = proto.Field(
1857
+ proto.MESSAGE,
1858
+ number=8,
1859
+ message=timestamp_pb2.Timestamp,
1860
+ )
1861
+ update_time: timestamp_pb2.Timestamp = proto.Field(
1862
+ proto.MESSAGE,
1863
+ number=9,
1864
+ message=timestamp_pb2.Timestamp,
1865
+ )
1866
+ referencing_databases: MutableSequence[str] = proto.RepeatedField(
1867
+ proto.STRING,
1868
+ number=10,
1869
+ )
1870
+ referencing_backups: MutableSequence[str] = proto.RepeatedField(
1871
+ proto.STRING,
1872
+ number=11,
1873
+ )
1874
+ etag: str = proto.Field(
1875
+ proto.STRING,
1876
+ number=12,
1877
+ )
1878
+
1879
+
1880
+ class CreateInstancePartitionMetadata(proto.Message):
1881
+ r"""Metadata type for the operation returned by
1882
+ [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition].
1883
+
1884
+ Attributes:
1885
+ instance_partition (google.cloud.spanner_admin_instance_v1.types.InstancePartition):
1886
+ The instance partition being created.
1887
+ start_time (google.protobuf.timestamp_pb2.Timestamp):
1888
+ The time at which the
1889
+ [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
1890
+ request was received.
1891
+ cancel_time (google.protobuf.timestamp_pb2.Timestamp):
1892
+ The time at which this operation was
1893
+ cancelled. If set, this operation is in the
1894
+ process of undoing itself (which is guaranteed
1895
+ to succeed) and cannot be cancelled again.
1896
+ end_time (google.protobuf.timestamp_pb2.Timestamp):
1897
+ The time at which this operation failed or
1898
+ was completed successfully.
1899
+ """
1900
+
1901
+ instance_partition: "InstancePartition" = proto.Field(
1902
+ proto.MESSAGE,
1903
+ number=1,
1904
+ message="InstancePartition",
1905
+ )
1906
+ start_time: timestamp_pb2.Timestamp = proto.Field(
1907
+ proto.MESSAGE,
1908
+ number=2,
1909
+ message=timestamp_pb2.Timestamp,
1910
+ )
1911
+ cancel_time: timestamp_pb2.Timestamp = proto.Field(
1912
+ proto.MESSAGE,
1913
+ number=3,
1914
+ message=timestamp_pb2.Timestamp,
1915
+ )
1916
+ end_time: timestamp_pb2.Timestamp = proto.Field(
1917
+ proto.MESSAGE,
1918
+ number=4,
1919
+ message=timestamp_pb2.Timestamp,
1920
+ )
1921
+
1922
+
1923
+ class CreateInstancePartitionRequest(proto.Message):
1924
+ r"""The request for
1925
+ [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition].
1926
+
1927
+ Attributes:
1928
+ parent (str):
1929
+ Required. The name of the instance in which to create the
1930
+ instance partition. Values are of the form
1931
+ ``projects/<project>/instances/<instance>``.
1932
+ instance_partition_id (str):
1933
+ Required. The ID of the instance partition to create. Valid
1934
+ identifiers are of the form ``[a-z][-a-z0-9]*[a-z0-9]`` and
1935
+ must be between 2 and 64 characters in length.
1936
+ instance_partition (google.cloud.spanner_admin_instance_v1.types.InstancePartition):
1937
+ Required. The instance partition to create. The
1938
+ instance_partition.name may be omitted, but if specified
1939
+ must be
1940
+ ``<parent>/instancePartitions/<instance_partition_id>``.
1941
+ """
1942
+
1943
+ parent: str = proto.Field(
1944
+ proto.STRING,
1945
+ number=1,
1946
+ )
1947
+ instance_partition_id: str = proto.Field(
1948
+ proto.STRING,
1949
+ number=2,
1950
+ )
1951
+ instance_partition: "InstancePartition" = proto.Field(
1952
+ proto.MESSAGE,
1953
+ number=3,
1954
+ message="InstancePartition",
1955
+ )
1956
+
1957
+
1958
+ class DeleteInstancePartitionRequest(proto.Message):
1959
+ r"""The request for
1960
+ [DeleteInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstancePartition].
1961
+
1962
+ Attributes:
1963
+ name (str):
1964
+ Required. The name of the instance partition to be deleted.
1965
+ Values are of the form
1966
+ ``projects/{project}/instances/{instance}/instancePartitions/{instance_partition}``
1967
+ etag (str):
1968
+ Optional. If not empty, the API only deletes
1969
+ the instance partition when the etag provided
1970
+ matches the current status of the requested
1971
+ instance partition. Otherwise, deletes the
1972
+ instance partition without checking the current
1973
+ status of the requested instance partition.
1974
+ """
1975
+
1976
+ name: str = proto.Field(
1977
+ proto.STRING,
1978
+ number=1,
1979
+ )
1980
+ etag: str = proto.Field(
1981
+ proto.STRING,
1982
+ number=2,
1983
+ )
1984
+
1985
+
1986
+ class GetInstancePartitionRequest(proto.Message):
1987
+ r"""The request for
1988
+ [GetInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.GetInstancePartition].
1989
+
1990
+ Attributes:
1991
+ name (str):
1992
+ Required. The name of the requested instance partition.
1993
+ Values are of the form
1994
+ ``projects/{project}/instances/{instance}/instancePartitions/{instance_partition}``.
1995
+ """
1996
+
1997
+ name: str = proto.Field(
1998
+ proto.STRING,
1999
+ number=1,
2000
+ )
2001
+
2002
+
2003
+ class UpdateInstancePartitionRequest(proto.Message):
2004
+ r"""The request for
2005
+ [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition].
2006
+
2007
+ Attributes:
2008
+ instance_partition (google.cloud.spanner_admin_instance_v1.types.InstancePartition):
2009
+ Required. The instance partition to update, which must
2010
+ always include the instance partition name. Otherwise, only
2011
+ fields mentioned in
2012
+ [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
2013
+ need be included.
2014
+ field_mask (google.protobuf.field_mask_pb2.FieldMask):
2015
+ Required. A mask specifying which fields in
2016
+ [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
2017
+ should be updated. The field mask must always be specified;
2018
+ this prevents any future fields in
2019
+ [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
2020
+ from being erased accidentally by clients that do not know
2021
+ about them.
2022
+ """
2023
+
2024
+ instance_partition: "InstancePartition" = proto.Field(
2025
+ proto.MESSAGE,
2026
+ number=1,
2027
+ message="InstancePartition",
2028
+ )
2029
+ field_mask: field_mask_pb2.FieldMask = proto.Field(
2030
+ proto.MESSAGE,
2031
+ number=2,
2032
+ message=field_mask_pb2.FieldMask,
2033
+ )
2034
+
2035
+
2036
+ class UpdateInstancePartitionMetadata(proto.Message):
2037
+ r"""Metadata type for the operation returned by
2038
+ [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition].
2039
+
2040
+ Attributes:
2041
+ instance_partition (google.cloud.spanner_admin_instance_v1.types.InstancePartition):
2042
+ The desired end state of the update.
2043
+ start_time (google.protobuf.timestamp_pb2.Timestamp):
2044
+ The time at which
2045
+ [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
2046
+ request was received.
2047
+ cancel_time (google.protobuf.timestamp_pb2.Timestamp):
2048
+ The time at which this operation was
2049
+ cancelled. If set, this operation is in the
2050
+ process of undoing itself (which is guaranteed
2051
+ to succeed) and cannot be cancelled again.
2052
+ end_time (google.protobuf.timestamp_pb2.Timestamp):
2053
+ The time at which this operation failed or
2054
+ was completed successfully.
2055
+ """
2056
+
2057
+ instance_partition: "InstancePartition" = proto.Field(
2058
+ proto.MESSAGE,
2059
+ number=1,
2060
+ message="InstancePartition",
2061
+ )
2062
+ start_time: timestamp_pb2.Timestamp = proto.Field(
2063
+ proto.MESSAGE,
2064
+ number=2,
2065
+ message=timestamp_pb2.Timestamp,
2066
+ )
2067
+ cancel_time: timestamp_pb2.Timestamp = proto.Field(
2068
+ proto.MESSAGE,
2069
+ number=3,
2070
+ message=timestamp_pb2.Timestamp,
2071
+ )
2072
+ end_time: timestamp_pb2.Timestamp = proto.Field(
2073
+ proto.MESSAGE,
2074
+ number=4,
2075
+ message=timestamp_pb2.Timestamp,
2076
+ )
2077
+
2078
+
2079
+ class ListInstancePartitionsRequest(proto.Message):
2080
+ r"""The request for
2081
+ [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions].
2082
+
2083
+ Attributes:
2084
+ parent (str):
2085
+ Required. The instance whose instance partitions should be
2086
+ listed. Values are of the form
2087
+ ``projects/<project>/instances/<instance>``. Use
2088
+ ``{instance} = '-'`` to list instance partitions for all
2089
+ Instances in a project, e.g.,
2090
+ ``projects/myproject/instances/-``.
2091
+ page_size (int):
2092
+ Number of instance partitions to be returned
2093
+ in the response. If 0 or less, defaults to the
2094
+ server's maximum allowed page size.
2095
+ page_token (str):
2096
+ If non-empty, ``page_token`` should contain a
2097
+ [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token]
2098
+ from a previous
2099
+ [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
2100
+ instance_partition_deadline (google.protobuf.timestamp_pb2.Timestamp):
2101
+ Optional. Deadline used while retrieving metadata for
2102
+ instance partitions. Instance partitions whose metadata
2103
+ cannot be retrieved within this deadline will be added to
2104
+ [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
2105
+ in
2106
+ [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
2107
+ """
2108
+
2109
+ parent: str = proto.Field(
2110
+ proto.STRING,
2111
+ number=1,
2112
+ )
2113
+ page_size: int = proto.Field(
2114
+ proto.INT32,
2115
+ number=2,
2116
+ )
2117
+ page_token: str = proto.Field(
2118
+ proto.STRING,
2119
+ number=3,
2120
+ )
2121
+ instance_partition_deadline: timestamp_pb2.Timestamp = proto.Field(
2122
+ proto.MESSAGE,
2123
+ number=4,
2124
+ message=timestamp_pb2.Timestamp,
2125
+ )
2126
+
2127
+
2128
+ class ListInstancePartitionsResponse(proto.Message):
2129
+ r"""The response for
2130
+ [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions].
2131
+
2132
+ Attributes:
2133
+ instance_partitions (MutableSequence[google.cloud.spanner_admin_instance_v1.types.InstancePartition]):
2134
+ The list of requested instancePartitions.
2135
+ next_page_token (str):
2136
+ ``next_page_token`` can be sent in a subsequent
2137
+ [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]
2138
+ call to fetch more of the matching instance partitions.
2139
+ unreachable (MutableSequence[str]):
2140
+ The list of unreachable instances or instance partitions. It
2141
+ includes the names of instances or instance partitions whose
2142
+ metadata could not be retrieved within
2143
+ [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
2144
+ """
2145
+
2146
+ @property
2147
+ def raw_page(self):
2148
+ return self
2149
+
2150
+ instance_partitions: MutableSequence["InstancePartition"] = proto.RepeatedField(
2151
+ proto.MESSAGE,
2152
+ number=1,
2153
+ message="InstancePartition",
2154
+ )
2155
+ next_page_token: str = proto.Field(
2156
+ proto.STRING,
2157
+ number=2,
2158
+ )
2159
+ unreachable: MutableSequence[str] = proto.RepeatedField(
2160
+ proto.STRING,
2161
+ number=3,
2162
+ )
2163
+
2164
+
2165
+ class ListInstancePartitionOperationsRequest(proto.Message):
2166
+ r"""The request for
2167
+ [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations].
2168
+
2169
+ Attributes:
2170
+ parent (str):
2171
+ Required. The parent instance of the instance partition
2172
+ operations. Values are of the form
2173
+ ``projects/<project>/instances/<instance>``.
2174
+ filter (str):
2175
+ Optional. An expression that filters the list of returned
2176
+ operations.
2177
+
2178
+ A filter expression consists of a field name, a comparison
2179
+ operator, and a value for filtering. The value must be a
2180
+ string, a number, or a boolean. The comparison operator must
2181
+ be one of: ``<``, ``>``, ``<=``, ``>=``, ``!=``, ``=``, or
2182
+ ``:``. Colon ``:`` is the contains operator. Filter rules
2183
+ are not case sensitive.
2184
+
2185
+ The following fields in the Operation are eligible for
2186
+ filtering:
2187
+
2188
+ - ``name`` - The name of the long-running operation
2189
+ - ``done`` - False if the operation is in progress, else
2190
+ true.
2191
+ - ``metadata.@type`` - the type of metadata. For example,
2192
+ the type string for
2193
+ [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]
2194
+ is
2195
+ ``type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata``.
2196
+ - ``metadata.<field_name>`` - any field in metadata.value.
2197
+ ``metadata.@type`` must be specified first, if filtering
2198
+ on metadata fields.
2199
+ - ``error`` - Error associated with the long-running
2200
+ operation.
2201
+ - ``response.@type`` - the type of response.
2202
+ - ``response.<field_name>`` - any field in response.value.
2203
+
2204
+ You can combine multiple expressions by enclosing each
2205
+ expression in parentheses. By default, expressions are
2206
+ combined with AND logic. However, you can specify AND, OR,
2207
+ and NOT logic explicitly.
2208
+
2209
+ Here are a few examples:
2210
+
2211
+ - ``done:true`` - The operation is complete.
2212
+ - ``(metadata.@type=``
2213
+ ``type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) AND``
2214
+ ``(metadata.instance_partition.name:custom-instance-partition) AND``
2215
+ ``(metadata.start_time < \"2021-03-28T14:50:00Z\") AND``
2216
+ ``(error:*)`` - Return operations where:
2217
+
2218
+ - The operation's metadata type is
2219
+ [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
2220
+ - The instance partition name contains
2221
+ "custom-instance-partition".
2222
+ - The operation started before 2021-03-28T14:50:00Z.
2223
+ - The operation resulted in an error.
2224
+ page_size (int):
2225
+ Optional. Number of operations to be returned
2226
+ in the response. If 0 or less, defaults to the
2227
+ server's maximum allowed page size.
2228
+ page_token (str):
2229
+ Optional. If non-empty, ``page_token`` should contain a
2230
+ [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token]
2231
+ from a previous
2232
+ [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]
2233
+ to the same ``parent`` and with the same ``filter``.
2234
+ instance_partition_deadline (google.protobuf.timestamp_pb2.Timestamp):
2235
+ Optional. Deadline used while retrieving metadata for
2236
+ instance partition operations. Instance partitions whose
2237
+ operation metadata cannot be retrieved within this deadline
2238
+ will be added to
2239
+ [unreachable_instance_partitions][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.unreachable_instance_partitions]
2240
+ in
2241
+ [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
2242
+ """
2243
+
2244
+ parent: str = proto.Field(
2245
+ proto.STRING,
2246
+ number=1,
2247
+ )
2248
+ filter: str = proto.Field(
2249
+ proto.STRING,
2250
+ number=2,
2251
+ )
2252
+ page_size: int = proto.Field(
2253
+ proto.INT32,
2254
+ number=3,
2255
+ )
2256
+ page_token: str = proto.Field(
2257
+ proto.STRING,
2258
+ number=4,
2259
+ )
2260
+ instance_partition_deadline: timestamp_pb2.Timestamp = proto.Field(
2261
+ proto.MESSAGE,
2262
+ number=5,
2263
+ message=timestamp_pb2.Timestamp,
2264
+ )
2265
+
2266
+
2267
+ class ListInstancePartitionOperationsResponse(proto.Message):
2268
+ r"""The response for
2269
+ [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations].
2270
+
2271
+ Attributes:
2272
+ operations (MutableSequence[google.longrunning.operations_pb2.Operation]):
2273
+ The list of matching instance partition long-running
2274
+ operations. Each operation's name will be prefixed by the
2275
+ instance partition's name. The operation's metadata field
2276
+ type ``metadata.type_url`` describes the type of the
2277
+ metadata.
2278
+ next_page_token (str):
2279
+ ``next_page_token`` can be sent in a subsequent
2280
+ [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]
2281
+ call to fetch more of the matching metadata.
2282
+ unreachable_instance_partitions (MutableSequence[str]):
2283
+ The list of unreachable instance partitions. It includes the
2284
+ names of instance partitions whose operation metadata could
2285
+ not be retrieved within
2286
+ [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
2287
+ """
2288
+
2289
+ @property
2290
+ def raw_page(self):
2291
+ return self
2292
+
2293
+ operations: MutableSequence[operations_pb2.Operation] = proto.RepeatedField(
2294
+ proto.MESSAGE,
2295
+ number=1,
2296
+ message=operations_pb2.Operation,
2297
+ )
2298
+ next_page_token: str = proto.Field(
2299
+ proto.STRING,
2300
+ number=2,
2301
+ )
2302
+ unreachable_instance_partitions: MutableSequence[str] = proto.RepeatedField(
2303
+ proto.STRING,
2304
+ number=3,
2305
+ )
2306
+
2307
+
2308
+ class MoveInstanceRequest(proto.Message):
2309
+ r"""The request for
2310
+ [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance].
2311
+
2312
+ Attributes:
2313
+ name (str):
2314
+ Required. The instance to move. Values are of the form
2315
+ ``projects/<project>/instances/<instance>``.
2316
+ target_config (str):
2317
+ Required. The target instance configuration where to move
2318
+ the instance. Values are of the form
2319
+ ``projects/<project>/instanceConfigs/<config>``.
2320
+ """
2321
+
2322
+ name: str = proto.Field(
2323
+ proto.STRING,
2324
+ number=1,
2325
+ )
2326
+ target_config: str = proto.Field(
2327
+ proto.STRING,
2328
+ number=2,
2329
+ )
2330
+
2331
+
2332
+ class MoveInstanceResponse(proto.Message):
2333
+ r"""The response for
2334
+ [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance].
2335
+
2336
+ """
2337
+
2338
+
2339
+ class MoveInstanceMetadata(proto.Message):
2340
+ r"""Metadata type for the operation returned by
2341
+ [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance].
2342
+
2343
+ Attributes:
2344
+ target_config (str):
2345
+ The target instance configuration where to move the
2346
+ instance. Values are of the form
2347
+ ``projects/<project>/instanceConfigs/<config>``.
2348
+ progress (google.cloud.spanner_admin_instance_v1.types.OperationProgress):
2349
+ The progress of the
2350
+ [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance]
2351
+ operation.
2352
+ [progress_percent][google.spanner.admin.instance.v1.OperationProgress.progress_percent]
2353
+ is reset when cancellation is requested.
2354
+ cancel_time (google.protobuf.timestamp_pb2.Timestamp):
2355
+ The time at which this operation was
2356
+ cancelled.
2357
+ """
2358
+
2359
+ target_config: str = proto.Field(
2360
+ proto.STRING,
2361
+ number=1,
2362
+ )
2363
+ progress: common.OperationProgress = proto.Field(
2364
+ proto.MESSAGE,
2365
+ number=2,
2366
+ message=common.OperationProgress,
2367
+ )
2368
+ cancel_time: timestamp_pb2.Timestamp = proto.Field(
2369
+ proto.MESSAGE,
2370
+ number=3,
2371
+ message=timestamp_pb2.Timestamp,
2372
+ )
2373
+
2374
+
2375
+ __all__ = tuple(sorted(__protobuf__.manifest))