google-cloud-alloy_db-v1 0.a → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/alloy_db/v1/alloy_db_admin/client.rb +2693 -0
  6. data/lib/google/cloud/alloy_db/v1/alloy_db_admin/credentials.rb +47 -0
  7. data/lib/google/cloud/alloy_db/v1/alloy_db_admin/operations.rb +768 -0
  8. data/lib/google/cloud/alloy_db/v1/alloy_db_admin/paths.rb +149 -0
  9. data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb +2111 -0
  10. data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/operations.rb +793 -0
  11. data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/service_stub.rb +1238 -0
  12. data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest.rb +54 -0
  13. data/lib/google/cloud/alloy_db/v1/alloy_db_admin.rb +56 -0
  14. data/lib/google/cloud/alloy_db/v1/bindings_override.rb +102 -0
  15. data/lib/google/cloud/alloy_db/v1/rest.rb +38 -0
  16. data/lib/google/cloud/alloy_db/v1/version.rb +8 -3
  17. data/lib/google/cloud/alloy_db/v1.rb +45 -0
  18. data/lib/google/cloud/alloydb/v1/resources_pb.rb +312 -0
  19. data/lib/google/cloud/alloydb/v1/service_pb.rb +237 -0
  20. data/lib/google/cloud/alloydb/v1/service_services_pb.rb +97 -0
  21. data/lib/google-cloud-alloy_db-v1.rb +21 -0
  22. data/proto_docs/README.md +4 -0
  23. data/proto_docs/google/api/client.rb +324 -0
  24. data/proto_docs/google/api/field_behavior.rb +71 -0
  25. data/proto_docs/google/api/launch_stage.rb +71 -0
  26. data/proto_docs/google/api/resource.rb +222 -0
  27. data/proto_docs/google/cloud/alloydb/v1/resources.rb +985 -0
  28. data/proto_docs/google/cloud/alloydb/v1/service.rb +815 -0
  29. data/proto_docs/google/longrunning/operations.rb +164 -0
  30. data/proto_docs/google/protobuf/any.rb +141 -0
  31. data/proto_docs/google/protobuf/duration.rb +98 -0
  32. data/proto_docs/google/protobuf/empty.rb +34 -0
  33. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  34. data/proto_docs/google/protobuf/timestamp.rb +129 -0
  35. data/proto_docs/google/protobuf/wrappers.rb +121 -0
  36. data/proto_docs/google/rpc/status.rb +48 -0
  37. data/proto_docs/google/type/dayofweek.rb +49 -0
  38. data/proto_docs/google/type/expr.rb +75 -0
  39. data/proto_docs/google/type/timeofday.rb +45 -0
  40. metadata +250 -12
@@ -0,0 +1,985 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module AlloyDB
23
+ module V1
24
+ # The username/password for a database user. Used for specifying initial
25
+ # users at cluster creation time.
26
+ # @!attribute [rw] user
27
+ # @return [::String]
28
+ # The database username.
29
+ # @!attribute [rw] password
30
+ # @return [::String]
31
+ # The initial password for the user.
32
+ class UserPassword
33
+ include ::Google::Protobuf::MessageExts
34
+ extend ::Google::Protobuf::MessageExts::ClassMethods
35
+ end
36
+
37
+ # Subset of the source instance configuration that is available when reading
38
+ # the cluster resource.
39
+ # @!attribute [r] host_port
40
+ # @return [::String]
41
+ # Output only. The host and port of the on-premises instance in host:port
42
+ # format
43
+ # @!attribute [r] reference_id
44
+ # @return [::String]
45
+ # Output only. Place holder for the external source identifier(e.g DMS job
46
+ # name) that created the cluster.
47
+ # @!attribute [r] source_type
48
+ # @return [::Google::Cloud::AlloyDB::V1::MigrationSource::MigrationSourceType]
49
+ # Output only. Type of migration source.
50
+ class MigrationSource
51
+ include ::Google::Protobuf::MessageExts
52
+ extend ::Google::Protobuf::MessageExts::ClassMethods
53
+
54
+ # Denote the type of migration source that created this cluster.
55
+ module MigrationSourceType
56
+ # Migration source is unknown.
57
+ MIGRATION_SOURCE_TYPE_UNSPECIFIED = 0
58
+
59
+ # DMS source means the cluster was created via DMS migration job.
60
+ DMS = 1
61
+ end
62
+ end
63
+
64
+ # EncryptionConfig describes the encryption config of a cluster or a backup
65
+ # that is encrypted with a CMEK (customer-managed encryption key).
66
+ # @!attribute [rw] kms_key_name
67
+ # @return [::String]
68
+ # The fully-qualified resource name of the KMS key.
69
+ # Each Cloud KMS key is regionalized and has the following format:
70
+ # projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME]
71
+ class EncryptionConfig
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
+ end
75
+
76
+ # EncryptionInfo describes the encryption information of a cluster or a backup.
77
+ # @!attribute [r] encryption_type
78
+ # @return [::Google::Cloud::AlloyDB::V1::EncryptionInfo::Type]
79
+ # Output only. Type of encryption.
80
+ # @!attribute [r] kms_key_versions
81
+ # @return [::Array<::String>]
82
+ # Output only. Cloud KMS key versions that are being used to protect the
83
+ # database or the backup.
84
+ class EncryptionInfo
85
+ include ::Google::Protobuf::MessageExts
86
+ extend ::Google::Protobuf::MessageExts::ClassMethods
87
+
88
+ # Possible encryption types.
89
+ module Type
90
+ # Encryption type not specified. Defaults to GOOGLE_DEFAULT_ENCRYPTION.
91
+ TYPE_UNSPECIFIED = 0
92
+
93
+ # The data is encrypted at rest with a key that is fully managed by Google.
94
+ # No key version will be populated. This is the default state.
95
+ GOOGLE_DEFAULT_ENCRYPTION = 1
96
+
97
+ # The data is encrypted at rest with a key that is managed by the customer.
98
+ # KMS key versions will be populated.
99
+ CUSTOMER_MANAGED_ENCRYPTION = 2
100
+ end
101
+ end
102
+
103
+ # SSL configuration for an AlloyDB Cluster.
104
+ # @!attribute [rw] ssl_mode
105
+ # @return [::Google::Cloud::AlloyDB::V1::SslConfig::SslMode]
106
+ # Optional. SSL mode. Specifies client-server SSL/TLS connection behavior.
107
+ # @!attribute [rw] ca_source
108
+ # @return [::Google::Cloud::AlloyDB::V1::SslConfig::CaSource]
109
+ # Optional. Certificate Authority (CA) source. Only CA_SOURCE_MANAGED is
110
+ # supported currently, and is the default value.
111
+ class SslConfig
112
+ include ::Google::Protobuf::MessageExts
113
+ extend ::Google::Protobuf::MessageExts::ClassMethods
114
+
115
+ # SSL mode options.
116
+ module SslMode
117
+ # SSL mode not specified. Defaults to SSL_MODE_ALLOW.
118
+ SSL_MODE_UNSPECIFIED = 0
119
+
120
+ # SSL connections are optional. CA verification not enforced.
121
+ SSL_MODE_ALLOW = 1
122
+
123
+ # SSL connections are required. CA verification not enforced.
124
+ # Clients may use locally self-signed certificates (default psql client
125
+ # behavior).
126
+ SSL_MODE_REQUIRE = 2
127
+
128
+ # SSL connections are required. CA verification enforced.
129
+ # Clients must have certificates signed by a Cluster CA, e.g. via
130
+ # GenerateClientCertificate.
131
+ SSL_MODE_VERIFY_CA = 3
132
+ end
133
+
134
+ # Certificate Authority (CA) source for SSL/TLS certificates.
135
+ module CaSource
136
+ # Certificate Authority (CA) source not specified. Defaults to
137
+ # CA_SOURCE_MANAGED.
138
+ CA_SOURCE_UNSPECIFIED = 0
139
+
140
+ # Certificate Authority (CA) managed by the AlloyDB Cluster.
141
+ CA_SOURCE_MANAGED = 1
142
+ end
143
+ end
144
+
145
+ # Message describing the user-specified automated backup policy.
146
+ #
147
+ # All fields in the automated backup policy are optional. Defaults for each
148
+ # field are provided if they are not set.
149
+ # @!attribute [rw] weekly_schedule
150
+ # @return [::Google::Cloud::AlloyDB::V1::AutomatedBackupPolicy::WeeklySchedule]
151
+ # Weekly schedule for the Backup.
152
+ # @!attribute [rw] time_based_retention
153
+ # @return [::Google::Cloud::AlloyDB::V1::AutomatedBackupPolicy::TimeBasedRetention]
154
+ # Time-based Backup retention policy.
155
+ # @!attribute [rw] quantity_based_retention
156
+ # @return [::Google::Cloud::AlloyDB::V1::AutomatedBackupPolicy::QuantityBasedRetention]
157
+ # Quantity-based Backup retention policy to retain recent backups.
158
+ # @!attribute [rw] enabled
159
+ # @return [::Boolean]
160
+ # Whether automated automated backups are enabled. If not set, defaults to
161
+ # true.
162
+ # @!attribute [rw] backup_window
163
+ # @return [::Google::Protobuf::Duration]
164
+ # The length of the time window during which a backup can be
165
+ # taken. If a backup does not succeed within this time window, it will be
166
+ # canceled and considered failed.
167
+ #
168
+ # The backup window must be at least 5 minutes long. There is no upper bound
169
+ # on the window. If not set, it defaults to 1 hour.
170
+ # @!attribute [rw] encryption_config
171
+ # @return [::Google::Cloud::AlloyDB::V1::EncryptionConfig]
172
+ # Optional. The encryption config can be specified to encrypt the
173
+ # backups with a customer-managed encryption key (CMEK). When this field is
174
+ # not specified, the backup will then use default encryption scheme to
175
+ # protect the user data.
176
+ # @!attribute [rw] location
177
+ # @return [::String]
178
+ # The location where the backup will be stored. Currently, the only supported
179
+ # option is to store the backup in the same region as the cluster.
180
+ #
181
+ # If empty, defaults to the region of the cluster.
182
+ # @!attribute [rw] labels
183
+ # @return [::Google::Protobuf::Map{::String => ::String}]
184
+ # Labels to apply to backups created using this configuration.
185
+ class AutomatedBackupPolicy
186
+ include ::Google::Protobuf::MessageExts
187
+ extend ::Google::Protobuf::MessageExts::ClassMethods
188
+
189
+ # A weekly schedule starts a backup at prescribed start times within a
190
+ # day, for the specified days of the week.
191
+ #
192
+ # The weekly schedule message is flexible and can be used to create many
193
+ # types of schedules. For example, to have a daily backup that starts at
194
+ # 22:00, configure the `start_times` field to have one element "22:00" and
195
+ # the `days_of_week` field to have all seven days of the week.
196
+ # @!attribute [rw] start_times
197
+ # @return [::Array<::Google::Type::TimeOfDay>]
198
+ # The times during the day to start a backup. The start times are assumed
199
+ # to be in UTC and to be an exact hour (e.g., 04:00:00).
200
+ #
201
+ # If no start times are provided, a single fixed start time is chosen
202
+ # arbitrarily.
203
+ # @!attribute [rw] days_of_week
204
+ # @return [::Array<::Google::Type::DayOfWeek>]
205
+ # The days of the week to perform a backup.
206
+ #
207
+ # If this field is left empty, the default of every day of the week is
208
+ # used.
209
+ class WeeklySchedule
210
+ include ::Google::Protobuf::MessageExts
211
+ extend ::Google::Protobuf::MessageExts::ClassMethods
212
+ end
213
+
214
+ # A time based retention policy specifies that all backups within a certain
215
+ # time period should be retained.
216
+ # @!attribute [rw] retention_period
217
+ # @return [::Google::Protobuf::Duration]
218
+ # The retention period.
219
+ class TimeBasedRetention
220
+ include ::Google::Protobuf::MessageExts
221
+ extend ::Google::Protobuf::MessageExts::ClassMethods
222
+ end
223
+
224
+ # A quantity based policy specifies that a certain number of the most recent
225
+ # successful backups should be retained.
226
+ # @!attribute [rw] count
227
+ # @return [::Integer]
228
+ # The number of backups to retain.
229
+ class QuantityBasedRetention
230
+ include ::Google::Protobuf::MessageExts
231
+ extend ::Google::Protobuf::MessageExts::ClassMethods
232
+ end
233
+
234
+ # @!attribute [rw] key
235
+ # @return [::String]
236
+ # @!attribute [rw] value
237
+ # @return [::String]
238
+ class LabelsEntry
239
+ include ::Google::Protobuf::MessageExts
240
+ extend ::Google::Protobuf::MessageExts::ClassMethods
241
+ end
242
+ end
243
+
244
+ # Message describing a BackupSource.
245
+ # @!attribute [r] backup_uid
246
+ # @return [::String]
247
+ # Output only. The system-generated UID of the backup which was used to
248
+ # create this resource. The UID is generated when the backup is created, and
249
+ # it is retained until the backup is deleted.
250
+ # @!attribute [rw] backup_name
251
+ # @return [::String]
252
+ # Required. The name of the backup resource with the format:
253
+ # * projects/\\{project}/locations/\\{region}/backups/\\{backup_id}
254
+ class BackupSource
255
+ include ::Google::Protobuf::MessageExts
256
+ extend ::Google::Protobuf::MessageExts::ClassMethods
257
+ end
258
+
259
+ # A cluster is a collection of regional AlloyDB resources. It can include a
260
+ # primary instance and one or more read pool instances.
261
+ # All cluster resources share a storage layer, which scales as needed.
262
+ # @!attribute [r] backup_source
263
+ # @return [::Google::Cloud::AlloyDB::V1::BackupSource]
264
+ # Output only. Cluster created from backup.
265
+ # @!attribute [r] migration_source
266
+ # @return [::Google::Cloud::AlloyDB::V1::MigrationSource]
267
+ # Output only. Cluster created via DMS migration.
268
+ # @!attribute [r] name
269
+ # @return [::String]
270
+ # Output only. The name of the cluster resource with the format:
271
+ # * projects/\\{project}/locations/\\{region}/clusters/\\{cluster_id}
272
+ # where the cluster ID segment should satisfy the regex expression
273
+ # `[a-z0-9-]+`. For more details see https://google.aip.dev/122.
274
+ # The prefix of the cluster resource name is the name of the parent resource:
275
+ # * projects/\\{project}/locations/\\{region}
276
+ # @!attribute [rw] display_name
277
+ # @return [::String]
278
+ # User-settable and human-readable display name for the Cluster.
279
+ # @!attribute [r] uid
280
+ # @return [::String]
281
+ # Output only. The system-generated UID of the resource. The UID is assigned
282
+ # when the resource is created, and it is retained until it is deleted.
283
+ # @!attribute [r] create_time
284
+ # @return [::Google::Protobuf::Timestamp]
285
+ # Output only. Create time stamp
286
+ # @!attribute [r] update_time
287
+ # @return [::Google::Protobuf::Timestamp]
288
+ # Output only. Update time stamp
289
+ # @!attribute [r] delete_time
290
+ # @return [::Google::Protobuf::Timestamp]
291
+ # Output only. Delete time stamp
292
+ # @!attribute [rw] labels
293
+ # @return [::Google::Protobuf::Map{::String => ::String}]
294
+ # Labels as key value pairs
295
+ # @!attribute [r] state
296
+ # @return [::Google::Cloud::AlloyDB::V1::Cluster::State]
297
+ # Output only. The current serving state of the cluster.
298
+ # @!attribute [r] cluster_type
299
+ # @return [::Google::Cloud::AlloyDB::V1::Cluster::ClusterType]
300
+ # Output only. The type of the cluster. This is an output-only field and it's
301
+ # populated at the Cluster creation time or the Cluster promotion
302
+ # time. The cluster type is determined by which RPC was used to create
303
+ # the cluster (i.e. `CreateCluster` vs. `CreateSecondaryCluster`
304
+ # @!attribute [r] database_version
305
+ # @return [::Google::Cloud::AlloyDB::V1::DatabaseVersion]
306
+ # Output only. The database engine major version. This is an output-only
307
+ # field and it's populated at the Cluster creation time. This field cannot be
308
+ # changed after cluster creation.
309
+ # @!attribute [rw] network
310
+ # @return [::String]
311
+ # Required. The resource link for the VPC network in which cluster resources
312
+ # are created and from which they are accessible via Private IP. The network
313
+ # must belong to the same project as the cluster. It is specified in the
314
+ # form: "projects/\\{project_number}/global/networks/\\{network_id}". This is
315
+ # required to create a cluster. It can be updated, but it cannot be removed.
316
+ # @!attribute [rw] etag
317
+ # @return [::String]
318
+ # For Resource freshness validation (https://google.aip.dev/154)
319
+ # @!attribute [rw] annotations
320
+ # @return [::Google::Protobuf::Map{::String => ::String}]
321
+ # Annotations to allow client tools to store small amount of arbitrary data.
322
+ # This is distinct from labels.
323
+ # https://google.aip.dev/128
324
+ # @!attribute [r] reconciling
325
+ # @return [::Boolean]
326
+ # Output only. Reconciling (https://google.aip.dev/128#reconciliation).
327
+ # Set to true if the current state of Cluster does not match the user's
328
+ # intended state, and the service is actively updating the resource to
329
+ # reconcile them. This can happen due to user-triggered updates or
330
+ # system actions like failover or maintenance.
331
+ # @!attribute [rw] initial_user
332
+ # @return [::Google::Cloud::AlloyDB::V1::UserPassword]
333
+ # Input only. Initial user to setup during cluster creation. Required.
334
+ # If used in `RestoreCluster` this is ignored.
335
+ # @!attribute [rw] automated_backup_policy
336
+ # @return [::Google::Cloud::AlloyDB::V1::AutomatedBackupPolicy]
337
+ # The automated backup policy for this cluster.
338
+ #
339
+ # If no policy is provided then the default policy will be used. If backups
340
+ # are supported for the cluster, the default policy takes one backup a day,
341
+ # has a backup window of 1 hour, and retains backups for 14 days.
342
+ # For more information on the defaults, consult the
343
+ # documentation for the message type.
344
+ # @!attribute [rw] ssl_config
345
+ # @return [::Google::Cloud::AlloyDB::V1::SslConfig]
346
+ # SSL configuration for this AlloyDB Cluster.
347
+ # @!attribute [rw] encryption_config
348
+ # @return [::Google::Cloud::AlloyDB::V1::EncryptionConfig]
349
+ # Optional. The encryption config can be specified to encrypt the data disks
350
+ # and other persistent data resources of a cluster with a
351
+ # customer-managed encryption key (CMEK). When this field is not
352
+ # specified, the cluster will then use default encryption scheme to
353
+ # protect the user data.
354
+ # @!attribute [r] encryption_info
355
+ # @return [::Google::Cloud::AlloyDB::V1::EncryptionInfo]
356
+ # Output only. The encryption information for the cluster.
357
+ # @!attribute [rw] secondary_config
358
+ # @return [::Google::Cloud::AlloyDB::V1::Cluster::SecondaryConfig]
359
+ # Cross Region replication config specific to SECONDARY cluster.
360
+ # @!attribute [r] primary_config
361
+ # @return [::Google::Cloud::AlloyDB::V1::Cluster::PrimaryConfig]
362
+ # Output only. Cross Region replication config specific to PRIMARY cluster.
363
+ class Cluster
364
+ include ::Google::Protobuf::MessageExts
365
+ extend ::Google::Protobuf::MessageExts::ClassMethods
366
+
367
+ # Configuration information for the secondary cluster. This should be set
368
+ # if and only if the cluster is of type SECONDARY.
369
+ # @!attribute [rw] primary_cluster_name
370
+ # @return [::String]
371
+ # The name of the primary cluster name with the format:
372
+ # * projects/\\{project}/locations/\\{region}/clusters/\\{cluster_id}
373
+ class SecondaryConfig
374
+ include ::Google::Protobuf::MessageExts
375
+ extend ::Google::Protobuf::MessageExts::ClassMethods
376
+ end
377
+
378
+ # Configuration for the primary cluster. It has the list of clusters that are
379
+ # replicating from this cluster. This should be set if and only if the
380
+ # cluster is of type PRIMARY.
381
+ # @!attribute [r] secondary_cluster_names
382
+ # @return [::Array<::String>]
383
+ # Output only. Names of the clusters that are replicating from this
384
+ # cluster.
385
+ class PrimaryConfig
386
+ include ::Google::Protobuf::MessageExts
387
+ extend ::Google::Protobuf::MessageExts::ClassMethods
388
+ end
389
+
390
+ # @!attribute [rw] key
391
+ # @return [::String]
392
+ # @!attribute [rw] value
393
+ # @return [::String]
394
+ class LabelsEntry
395
+ include ::Google::Protobuf::MessageExts
396
+ extend ::Google::Protobuf::MessageExts::ClassMethods
397
+ end
398
+
399
+ # @!attribute [rw] key
400
+ # @return [::String]
401
+ # @!attribute [rw] value
402
+ # @return [::String]
403
+ class AnnotationsEntry
404
+ include ::Google::Protobuf::MessageExts
405
+ extend ::Google::Protobuf::MessageExts::ClassMethods
406
+ end
407
+
408
+ # Cluster State
409
+ module State
410
+ # The state of the cluster is unknown.
411
+ STATE_UNSPECIFIED = 0
412
+
413
+ # The cluster is active and running.
414
+ READY = 1
415
+
416
+ # The cluster is stopped. All instances in the cluster are stopped.
417
+ # Customers can start a stopped cluster at any point and all their
418
+ # instances will come back to life with same names and IP resources. In
419
+ # this state, customer pays for storage.
420
+ # Associated backups could also be present in a stopped cluster.
421
+ STOPPED = 2
422
+
423
+ # The cluster is empty and has no associated resources.
424
+ # All instances, associated storage and backups have been deleted.
425
+ EMPTY = 3
426
+
427
+ # The cluster is being created.
428
+ CREATING = 4
429
+
430
+ # The cluster is being deleted.
431
+ DELETING = 5
432
+
433
+ # The creation of the cluster failed.
434
+ FAILED = 6
435
+
436
+ # The cluster is bootstrapping with data from some other source.
437
+ # Direct mutations to the cluster (e.g. adding read pool) are not allowed.
438
+ BOOTSTRAPPING = 7
439
+
440
+ # The cluster is under maintenance. AlloyDB regularly performs maintenance
441
+ # and upgrades on customer clusters. Updates on the cluster are
442
+ # not allowed while the cluster is in this state.
443
+ MAINTENANCE = 8
444
+
445
+ # The cluster is being promoted.
446
+ PROMOTING = 9
447
+ end
448
+
449
+ # Type of Cluster
450
+ module ClusterType
451
+ # The type of the cluster is unknown.
452
+ CLUSTER_TYPE_UNSPECIFIED = 0
453
+
454
+ # Primary cluster that support read and write operations.
455
+ PRIMARY = 1
456
+
457
+ # Secondary cluster that is replicating from another region.
458
+ # This only supports read.
459
+ SECONDARY = 2
460
+ end
461
+ end
462
+
463
+ # An Instance is a computing unit that an end customer can connect to.
464
+ # It's the main unit of computing resources in AlloyDB.
465
+ # @!attribute [r] name
466
+ # @return [::String]
467
+ # Output only. The name of the instance resource with the format:
468
+ # * projects/\\{project}/locations/\\{region}/clusters/\\{cluster_id}/instances/\\{instance_id}
469
+ # where the cluster and instance ID segments should satisfy the regex
470
+ # expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
471
+ # lowercase letters, numbers, and dashes, starting with a letter, and ending
472
+ # with a letter or number. For more details see https://google.aip.dev/122.
473
+ # The prefix of the instance resource name is the name of the parent
474
+ # resource:
475
+ # * projects/\\{project}/locations/\\{region}/clusters/\\{cluster_id}
476
+ # @!attribute [rw] display_name
477
+ # @return [::String]
478
+ # User-settable and human-readable display name for the Instance.
479
+ # @!attribute [r] uid
480
+ # @return [::String]
481
+ # Output only. The system-generated UID of the resource. The UID is assigned
482
+ # when the resource is created, and it is retained until it is deleted.
483
+ # @!attribute [r] create_time
484
+ # @return [::Google::Protobuf::Timestamp]
485
+ # Output only. Create time stamp
486
+ # @!attribute [r] update_time
487
+ # @return [::Google::Protobuf::Timestamp]
488
+ # Output only. Update time stamp
489
+ # @!attribute [r] delete_time
490
+ # @return [::Google::Protobuf::Timestamp]
491
+ # Output only. Delete time stamp
492
+ # @!attribute [rw] labels
493
+ # @return [::Google::Protobuf::Map{::String => ::String}]
494
+ # Labels as key value pairs
495
+ # @!attribute [r] state
496
+ # @return [::Google::Cloud::AlloyDB::V1::Instance::State]
497
+ # Output only. The current serving state of the instance.
498
+ # @!attribute [rw] instance_type
499
+ # @return [::Google::Cloud::AlloyDB::V1::Instance::InstanceType]
500
+ # Required. The type of the instance. Specified at creation time.
501
+ # @!attribute [rw] machine_config
502
+ # @return [::Google::Cloud::AlloyDB::V1::Instance::MachineConfig]
503
+ # Configurations for the machines that host the underlying
504
+ # database engine.
505
+ # @!attribute [rw] availability_type
506
+ # @return [::Google::Cloud::AlloyDB::V1::Instance::AvailabilityType]
507
+ # Availability type of an Instance.
508
+ # Defaults to REGIONAL for both primary and read instances.
509
+ # Note that primary and read instances can have different availability types.
510
+ # @!attribute [rw] gce_zone
511
+ # @return [::String]
512
+ # The Compute Engine zone that the instance should serve from, per
513
+ # https://cloud.google.com/compute/docs/regions-zones
514
+ # This can ONLY be specified for ZONAL instances.
515
+ # If present for a REGIONAL instance, an error will be thrown.
516
+ # If this is absent for a ZONAL instance, instance is created in a random
517
+ # zone with available capacity.
518
+ # @!attribute [rw] database_flags
519
+ # @return [::Google::Protobuf::Map{::String => ::String}]
520
+ # Database flags. Set at instance level.
521
+ # * They are copied from primary instance on read instance creation.
522
+ # * Read instances can set new or override existing flags that are relevant
523
+ # for reads, e.g. for enabling columnar cache on a read instance. Flags
524
+ # set on read instance may or may not be present on primary.
525
+ #
526
+ #
527
+ # This is a list of "key": "value" pairs.
528
+ # "key": The name of the flag. These flags are passed at instance setup time,
529
+ # so include both server options and system variables for Postgres. Flags are
530
+ # specified with underscores, not hyphens.
531
+ # "value": The value of the flag. Booleans are set to **on** for true
532
+ # and **off** for false. This field must be omitted if the flag
533
+ # doesn't take a value.
534
+ # @!attribute [r] writable_node
535
+ # @return [::Google::Cloud::AlloyDB::V1::Instance::Node]
536
+ # Output only. This is set for the read-write VM of the PRIMARY instance
537
+ # only.
538
+ # @!attribute [r] nodes
539
+ # @return [::Array<::Google::Cloud::AlloyDB::V1::Instance::Node>]
540
+ # Output only. List of available read-only VMs in this instance, including
541
+ # the standby for a PRIMARY instance.
542
+ # @!attribute [rw] query_insights_config
543
+ # @return [::Google::Cloud::AlloyDB::V1::Instance::QueryInsightsInstanceConfig]
544
+ # Configuration for query insights.
545
+ # @!attribute [rw] read_pool_config
546
+ # @return [::Google::Cloud::AlloyDB::V1::Instance::ReadPoolConfig]
547
+ # Read pool specific config.
548
+ # @!attribute [r] ip_address
549
+ # @return [::String]
550
+ # Output only. The IP address for the Instance.
551
+ # This is the connection endpoint for an end-user application.
552
+ # @!attribute [r] reconciling
553
+ # @return [::Boolean]
554
+ # Output only. Reconciling (https://google.aip.dev/128#reconciliation).
555
+ # Set to true if the current state of Instance does not match the user's
556
+ # intended state, and the service is actively updating the resource to
557
+ # reconcile them. This can happen due to user-triggered updates or
558
+ # system actions like failover or maintenance.
559
+ # @!attribute [rw] etag
560
+ # @return [::String]
561
+ # For Resource freshness validation (https://google.aip.dev/154)
562
+ # @!attribute [rw] annotations
563
+ # @return [::Google::Protobuf::Map{::String => ::String}]
564
+ # Annotations to allow client tools to store small amount of arbitrary data.
565
+ # This is distinct from labels.
566
+ # https://google.aip.dev/128
567
+ class Instance
568
+ include ::Google::Protobuf::MessageExts
569
+ extend ::Google::Protobuf::MessageExts::ClassMethods
570
+
571
+ # MachineConfig describes the configuration of a machine.
572
+ # @!attribute [rw] cpu_count
573
+ # @return [::Integer]
574
+ # The number of CPU's in the VM instance.
575
+ class MachineConfig
576
+ include ::Google::Protobuf::MessageExts
577
+ extend ::Google::Protobuf::MessageExts::ClassMethods
578
+ end
579
+
580
+ # Details of a single node in the instance.
581
+ # Nodes in an AlloyDB instance are ephemereal, they can change during
582
+ # update, failover, autohealing and resize operations.
583
+ # @!attribute [rw] zone_id
584
+ # @return [::String]
585
+ # The Compute Engine zone of the VM e.g. "us-central1-b".
586
+ # @!attribute [rw] id
587
+ # @return [::String]
588
+ # The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
589
+ # @!attribute [rw] ip
590
+ # @return [::String]
591
+ # The private IP address of the VM e.g. "10.57.0.34".
592
+ # @!attribute [rw] state
593
+ # @return [::String]
594
+ # Determined by state of the compute VM and postgres-service health.
595
+ # Compute VM state can have values listed in
596
+ # https://cloud.google.com/compute/docs/instances/instance-life-cycle and
597
+ # postgres-service health can have values: HEALTHY and UNHEALTHY.
598
+ class Node
599
+ include ::Google::Protobuf::MessageExts
600
+ extend ::Google::Protobuf::MessageExts::ClassMethods
601
+ end
602
+
603
+ # QueryInsights Instance specific configuration.
604
+ # @!attribute [rw] record_application_tags
605
+ # @return [::Boolean]
606
+ # Record application tags for an instance.
607
+ # This flag is turned "on" by default.
608
+ # @!attribute [rw] record_client_address
609
+ # @return [::Boolean]
610
+ # Record client address for an instance. Client address is PII information.
611
+ # This flag is turned "on" by default.
612
+ # @!attribute [rw] query_string_length
613
+ # @return [::Integer]
614
+ # Query string length. The default value is 1024.
615
+ # Any integer between 256 and 4500 is considered valid.
616
+ # @!attribute [rw] query_plans_per_minute
617
+ # @return [::Integer]
618
+ # Number of query execution plans captured by Insights per minute
619
+ # for all queries combined. The default value is 5.
620
+ # Any integer between 0 and 20 is considered valid.
621
+ class QueryInsightsInstanceConfig
622
+ include ::Google::Protobuf::MessageExts
623
+ extend ::Google::Protobuf::MessageExts::ClassMethods
624
+ end
625
+
626
+ # Configuration for a read pool instance.
627
+ # @!attribute [rw] node_count
628
+ # @return [::Integer]
629
+ # Read capacity, i.e. number of nodes in a read pool instance.
630
+ class ReadPoolConfig
631
+ include ::Google::Protobuf::MessageExts
632
+ extend ::Google::Protobuf::MessageExts::ClassMethods
633
+ end
634
+
635
+ # @!attribute [rw] key
636
+ # @return [::String]
637
+ # @!attribute [rw] value
638
+ # @return [::String]
639
+ class LabelsEntry
640
+ include ::Google::Protobuf::MessageExts
641
+ extend ::Google::Protobuf::MessageExts::ClassMethods
642
+ end
643
+
644
+ # @!attribute [rw] key
645
+ # @return [::String]
646
+ # @!attribute [rw] value
647
+ # @return [::String]
648
+ class DatabaseFlagsEntry
649
+ include ::Google::Protobuf::MessageExts
650
+ extend ::Google::Protobuf::MessageExts::ClassMethods
651
+ end
652
+
653
+ # @!attribute [rw] key
654
+ # @return [::String]
655
+ # @!attribute [rw] value
656
+ # @return [::String]
657
+ class AnnotationsEntry
658
+ include ::Google::Protobuf::MessageExts
659
+ extend ::Google::Protobuf::MessageExts::ClassMethods
660
+ end
661
+
662
+ # Instance State
663
+ module State
664
+ # The state of the instance is unknown.
665
+ STATE_UNSPECIFIED = 0
666
+
667
+ # The instance is active and running.
668
+ READY = 1
669
+
670
+ # The instance is stopped. Instance name and IP resources are preserved.
671
+ STOPPED = 2
672
+
673
+ # The instance is being created.
674
+ CREATING = 3
675
+
676
+ # The instance is being deleted.
677
+ DELETING = 4
678
+
679
+ # The instance is down for maintenance.
680
+ MAINTENANCE = 5
681
+
682
+ # The creation of the instance failed or a fatal error occurred during
683
+ # an operation on the instance.
684
+ # Note: Instances in this state would tried to be auto-repaired. And
685
+ # Customers should be able to restart, update or delete these instances.
686
+ FAILED = 6
687
+
688
+ # Index 7 is used in the producer apis for ROLLED_BACK state. Keeping that
689
+ # index unused in case that state also needs to exposed via consumer apis
690
+ # in future.
691
+ # The instance has been configured to sync data from some other source.
692
+ BOOTSTRAPPING = 8
693
+
694
+ # The instance is being promoted.
695
+ PROMOTING = 9
696
+ end
697
+
698
+ # Type of an Instance
699
+ module InstanceType
700
+ # The type of the instance is unknown.
701
+ INSTANCE_TYPE_UNSPECIFIED = 0
702
+
703
+ # PRIMARY instances support read and write operations.
704
+ PRIMARY = 1
705
+
706
+ # READ POOL instances support read operations only. Each read pool instance
707
+ # consists of one or more homogeneous nodes.
708
+ # * Read pool of size 1 can only have zonal availability.
709
+ # * Read pools with node count of 2 or more can have regional
710
+ # availability (nodes are present in 2 or more zones in a region).
711
+ READ_POOL = 2
712
+
713
+ # SECONDARY instances support read operations only. SECONDARY instance
714
+ # is a cross-region read replica
715
+ SECONDARY = 3
716
+ end
717
+
718
+ # The Availability type of an instance. Potential values:
719
+ # <br><b>ZONAL</b>: The instance serves data from only one zone.
720
+ # Outages in that zone affect instance availability.
721
+ # <br><b>REGIONAL</b>: The instance can serve data from more than one zone
722
+ # in a region (it is highly available).
723
+ module AvailabilityType
724
+ # This is an unknown Availability type.
725
+ AVAILABILITY_TYPE_UNSPECIFIED = 0
726
+
727
+ # Zonal available instance.
728
+ ZONAL = 1
729
+
730
+ # Regional (or Highly) available instance.
731
+ REGIONAL = 2
732
+ end
733
+ end
734
+
735
+ # Message describing Backup object
736
+ # @!attribute [r] name
737
+ # @return [::String]
738
+ # Output only. The name of the backup resource with the format:
739
+ # * projects/\\{project}/locations/\\{region}/backups/\\{backup_id}
740
+ # where the cluster and backup ID segments should satisfy the regex
741
+ # expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
742
+ # lowercase letters, numbers, and dashes, starting with a letter, and ending
743
+ # with a letter or number. For more details see https://google.aip.dev/122.
744
+ # The prefix of the backup resource name is the name of the parent
745
+ # resource:
746
+ # * projects/\\{project}/locations/\\{region}
747
+ # @!attribute [rw] display_name
748
+ # @return [::String]
749
+ # User-settable and human-readable display name for the Backup.
750
+ # @!attribute [r] uid
751
+ # @return [::String]
752
+ # Output only. The system-generated UID of the resource. The UID is assigned
753
+ # when the resource is created, and it is retained until it is deleted.
754
+ # @!attribute [r] create_time
755
+ # @return [::Google::Protobuf::Timestamp]
756
+ # Output only. Create time stamp
757
+ # @!attribute [r] update_time
758
+ # @return [::Google::Protobuf::Timestamp]
759
+ # Output only. Update time stamp
760
+ # @!attribute [r] delete_time
761
+ # @return [::Google::Protobuf::Timestamp]
762
+ # Output only. Delete time stamp
763
+ # @!attribute [rw] labels
764
+ # @return [::Google::Protobuf::Map{::String => ::String}]
765
+ # Labels as key value pairs
766
+ # @!attribute [r] state
767
+ # @return [::Google::Cloud::AlloyDB::V1::Backup::State]
768
+ # Output only. The current state of the backup.
769
+ # @!attribute [rw] type
770
+ # @return [::Google::Cloud::AlloyDB::V1::Backup::Type]
771
+ # The backup type, which suggests the trigger for the backup.
772
+ # @!attribute [rw] description
773
+ # @return [::String]
774
+ # User-provided description of the backup.
775
+ # @!attribute [r] cluster_uid
776
+ # @return [::String]
777
+ # Output only. The system-generated UID of the cluster which was used to
778
+ # create this resource.
779
+ # @!attribute [rw] cluster_name
780
+ # @return [::String]
781
+ # Required. The full resource name of the backup source cluster
782
+ # (e.g., projects/<project>/locations/<location>/clusters/<cluster_id>).
783
+ # @!attribute [r] reconciling
784
+ # @return [::Boolean]
785
+ # Output only. Reconciling (https://google.aip.dev/128#reconciliation), if
786
+ # true, indicates that the service is actively updating the resource. This
787
+ # can happen due to user-triggered updates or system actions like failover or
788
+ # maintenance.
789
+ # @!attribute [rw] encryption_config
790
+ # @return [::Google::Cloud::AlloyDB::V1::EncryptionConfig]
791
+ # Optional. The encryption config can be specified to encrypt the
792
+ # backup with a customer-managed encryption key (CMEK). When this field is
793
+ # not specified, the backup will then use default encryption scheme to
794
+ # protect the user data.
795
+ # @!attribute [r] encryption_info
796
+ # @return [::Google::Cloud::AlloyDB::V1::EncryptionInfo]
797
+ # Output only. The encryption information for the backup.
798
+ # @!attribute [rw] etag
799
+ # @return [::String]
800
+ # For Resource freshness validation (https://google.aip.dev/154)
801
+ # @!attribute [rw] annotations
802
+ # @return [::Google::Protobuf::Map{::String => ::String}]
803
+ # Annotations to allow client tools to store small amount of arbitrary data.
804
+ # This is distinct from labels.
805
+ # https://google.aip.dev/128
806
+ # @!attribute [r] size_bytes
807
+ # @return [::Integer]
808
+ # Output only. The size of the backup in bytes.
809
+ # @!attribute [r] expiry_time
810
+ # @return [::Google::Protobuf::Timestamp]
811
+ # Output only. The time at which after the backup is eligible to be garbage
812
+ # collected. It is the duration specified by the backup's retention policy,
813
+ # added to the backup's create_time.
814
+ class Backup
815
+ include ::Google::Protobuf::MessageExts
816
+ extend ::Google::Protobuf::MessageExts::ClassMethods
817
+
818
+ # @!attribute [rw] key
819
+ # @return [::String]
820
+ # @!attribute [rw] value
821
+ # @return [::String]
822
+ class LabelsEntry
823
+ include ::Google::Protobuf::MessageExts
824
+ extend ::Google::Protobuf::MessageExts::ClassMethods
825
+ end
826
+
827
+ # @!attribute [rw] key
828
+ # @return [::String]
829
+ # @!attribute [rw] value
830
+ # @return [::String]
831
+ class AnnotationsEntry
832
+ include ::Google::Protobuf::MessageExts
833
+ extend ::Google::Protobuf::MessageExts::ClassMethods
834
+ end
835
+
836
+ # Backup State
837
+ module State
838
+ # The state of the backup is unknown.
839
+ STATE_UNSPECIFIED = 0
840
+
841
+ # The backup is ready.
842
+ READY = 1
843
+
844
+ # The backup is creating.
845
+ CREATING = 2
846
+
847
+ # The backup failed.
848
+ FAILED = 3
849
+
850
+ # The backup is being deleted.
851
+ DELETING = 4
852
+ end
853
+
854
+ # Backup Type
855
+ module Type
856
+ # Backup Type is unknown.
857
+ TYPE_UNSPECIFIED = 0
858
+
859
+ # ON_DEMAND backups that were triggered by the customer (e.g., not
860
+ # AUTOMATED).
861
+ ON_DEMAND = 1
862
+
863
+ # AUTOMATED backups triggered by the automated backups scheduler pursuant
864
+ # to an automated backup policy.
865
+ AUTOMATED = 2
866
+
867
+ # CONTINUOUS backups triggered by the automated backups scheduler
868
+ # due to a continuous backup policy.
869
+ CONTINUOUS = 3
870
+ end
871
+ end
872
+
873
+ # SupportedDatabaseFlag gives general information about a database flag,
874
+ # like type and allowed values. This is a static value that is defined
875
+ # on the server side, and it cannot be modified by callers.
876
+ # To set the Database flags on a particular Instance, a caller should modify
877
+ # the Instance.database_flags field.
878
+ # @!attribute [rw] string_restrictions
879
+ # @return [::Google::Cloud::AlloyDB::V1::SupportedDatabaseFlag::StringRestrictions]
880
+ # Restriction on STRING type value.
881
+ # @!attribute [rw] integer_restrictions
882
+ # @return [::Google::Cloud::AlloyDB::V1::SupportedDatabaseFlag::IntegerRestrictions]
883
+ # Restriction on INTEGER type value.
884
+ # @!attribute [rw] name
885
+ # @return [::String]
886
+ # The name of the flag resource, following Google Cloud conventions, e.g.:
887
+ # * projects/\\{project}/locations/\\{location}/flags/\\{flag}
888
+ # This field currently has no semantic meaning.
889
+ # @!attribute [rw] flag_name
890
+ # @return [::String]
891
+ # The name of the database flag, e.g. "max_allowed_packets".
892
+ # The is a possibly key for the Instance.database_flags map field.
893
+ # @!attribute [rw] value_type
894
+ # @return [::Google::Cloud::AlloyDB::V1::SupportedDatabaseFlag::ValueType]
895
+ # @!attribute [rw] accepts_multiple_values
896
+ # @return [::Boolean]
897
+ # Whether the database flag accepts multiple values. If true,
898
+ # a comma-separated list of stringified values may be specified.
899
+ # @!attribute [rw] supported_db_versions
900
+ # @return [::Array<::Google::Cloud::AlloyDB::V1::DatabaseVersion>]
901
+ # Major database engine versions for which this flag is supported.
902
+ # @!attribute [rw] requires_db_restart
903
+ # @return [::Boolean]
904
+ # Whether setting or updating this flag on an Instance requires a database
905
+ # restart. If a flag that requires database restart is set, the backend
906
+ # will automatically restart the database (making sure to satisfy any
907
+ # availability SLO's).
908
+ class SupportedDatabaseFlag
909
+ include ::Google::Protobuf::MessageExts
910
+ extend ::Google::Protobuf::MessageExts::ClassMethods
911
+
912
+ # Restrictions on STRING type values
913
+ # @!attribute [rw] allowed_values
914
+ # @return [::Array<::String>]
915
+ # The list of allowed values, if bounded. This field will be empty
916
+ # if there is a unbounded number of allowed values.
917
+ class StringRestrictions
918
+ include ::Google::Protobuf::MessageExts
919
+ extend ::Google::Protobuf::MessageExts::ClassMethods
920
+ end
921
+
922
+ # Restrictions on INTEGER type values.
923
+ # @!attribute [rw] min_value
924
+ # @return [::Google::Protobuf::Int64Value]
925
+ # The minimum value that can be specified, if applicable.
926
+ # @!attribute [rw] max_value
927
+ # @return [::Google::Protobuf::Int64Value]
928
+ # The maximum value that can be specified, if applicable.
929
+ class IntegerRestrictions
930
+ include ::Google::Protobuf::MessageExts
931
+ extend ::Google::Protobuf::MessageExts::ClassMethods
932
+ end
933
+
934
+ # ValueType describes the semantic type of the value that the flag accepts.
935
+ # Regardless of the ValueType, the Instance.database_flags field accepts the
936
+ # stringified version of the value, i.e. "20" or "3.14".
937
+ module ValueType
938
+ # This is an unknown flag type.
939
+ VALUE_TYPE_UNSPECIFIED = 0
940
+
941
+ # String type flag.
942
+ STRING = 1
943
+
944
+ # Integer type flag.
945
+ INTEGER = 2
946
+
947
+ # Float type flag.
948
+ FLOAT = 3
949
+
950
+ # Denotes that the flag does not accept any values.
951
+ NONE = 4
952
+ end
953
+ end
954
+
955
+ # The supported database engine versions.
956
+ module DatabaseVersion
957
+ # This is an unknown database version.
958
+ DATABASE_VERSION_UNSPECIFIED = 0
959
+
960
+ # DEPRECATED - The database version is Postgres 13.
961
+ POSTGRES_13 = 1
962
+
963
+ # The database version is Postgres 14.
964
+ POSTGRES_14 = 2
965
+ end
966
+
967
+ # View on Instance. Pass this enum to rpcs that returns an Instance message to
968
+ # control which subsets of fields to get.
969
+ module InstanceView
970
+ # INSTANCE_VIEW_UNSPECIFIED Not specified, equivalent to BASIC.
971
+ INSTANCE_VIEW_UNSPECIFIED = 0
972
+
973
+ # BASIC server responses for a primary or read instance include all the
974
+ # relevant instance details, excluding the details of each node in the
975
+ # instance. The default value.
976
+ INSTANCE_VIEW_BASIC = 1
977
+
978
+ # FULL response is equivalent to BASIC for primary instance (for now).
979
+ # For read pool instance, this includes details of each node in the pool.
980
+ INSTANCE_VIEW_FULL = 2
981
+ end
982
+ end
983
+ end
984
+ end
985
+ end