1
- // Copyright 2021 Google LLC
1
+ // Copyright 2022 Google LLC
2
2
//
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
@@ -21,8 +21,11 @@ import "google/api/client.proto";
21
21
import "google/api/field_behavior.proto" ;
22
22
import "google/api/resource.proto" ;
23
23
import "google/longrunning/operations.proto" ;
24
+ import "google/protobuf/duration.proto" ;
24
25
import "google/protobuf/field_mask.proto" ;
25
26
import "google/protobuf/timestamp.proto" ;
27
+ import "google/type/dayofweek.proto" ;
28
+ import "google/type/timeofday.proto" ;
26
29
27
30
option go_package = "google.golang.org/genproto/googleapis/cloud/redis/v1;redis" ;
28
31
option java_multiple_files = true ;
@@ -72,6 +75,16 @@ service CloudRedis {
72
75
option (google.api.method_signature ) = "name" ;
73
76
}
74
77
78
+ // Gets the AUTH string for a Redis instance. If AUTH is not enabled for the
79
+ // instance the response will be empty. This information is not included in
80
+ // the details returned to GetInstance.
81
+ rpc GetInstanceAuthString (GetInstanceAuthStringRequest ) returns (InstanceAuthString ) {
82
+ option (google.api.http ) = {
83
+ get : "/v1/{name=projects/*/locations/*/instances/*}/authString"
84
+ };
85
+ option (google.api.method_signature ) = "name" ;
86
+ }
87
+
75
88
// Creates a Redis instance based on the specified tier and memory size.
76
89
//
77
90
// By default, the instance is accessible from the project's
@@ -191,6 +204,20 @@ service CloudRedis {
191
204
metadata_type : "google.cloud.redis.v1.OperationMetadata"
192
205
};
193
206
}
207
+
208
+ // Reschedule maintenance for a given instance in a given project and
209
+ // location.
210
+ rpc RescheduleMaintenance (RescheduleMaintenanceRequest ) returns (google .longrunning .Operation ) {
211
+ option (google.api.http ) = {
212
+ post : "/v1/{name=projects/*/locations/*/instances/*}:rescheduleMaintenance"
213
+ body : "*"
214
+ };
215
+ option (google.api.method_signature ) = "name, reschedule_type, schedule_time" ;
216
+ option (google.longrunning.operation_info ) = {
217
+ response_type : "google.cloud.redis.v1.Instance"
218
+ metadata_type : "google.cloud.redis.v1.OperationMetadata"
219
+ };
220
+ }
194
221
}
195
222
196
223
// Node specific properties.
@@ -202,7 +229,7 @@ message NodeInfo {
202
229
string zone = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
203
230
}
204
231
205
- // A Google Cloud Redis instance.
232
+ // A Memorystore for Redis instance.
206
233
message Instance {
207
234
option (google.api.resource ) = {
208
235
type : "redis.googleapis.com/Instance"
@@ -267,18 +294,30 @@ message Instance {
267
294
PRIVATE_SERVICE_ACCESS = 2 ;
268
295
}
269
296
297
+ // Available TLS modes.
298
+ enum TransitEncryptionMode {
299
+ // Not set.
300
+ TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0 ;
301
+
302
+ // Client to Server traffic encryption enabled with server authentication.
303
+ SERVER_AUTHENTICATION = 1 ;
304
+
305
+ // TLS is disabled for the instance.
306
+ DISABLED = 2 ;
307
+ }
308
+
270
309
// Read replicas mode.
271
310
enum ReadReplicasMode {
272
- // If not set, Memorystore Redis backend will pick the mode based on other fields in
273
- // the request .
311
+ // If not set, Memorystore Redis backend will default to
312
+ // READ_REPLICAS_DISABLED .
274
313
READ_REPLICAS_MODE_UNSPECIFIED = 0 ;
275
314
276
315
// If disabled, read endpoint will not be provided and the instance cannot
277
316
// scale up or down the number of replicas.
278
317
READ_REPLICAS_DISABLED = 1 ;
279
318
280
319
// If enabled, read endpoint will be provided and the instance can scale
281
- // up and down the number of replicas.
320
+ // up and down the number of replicas. Not valid for basic tier.
282
321
READ_REPLICAS_ENABLED = 2 ;
283
322
}
284
323
@@ -333,6 +372,13 @@ message Instance {
333
372
// the default block size is /28.
334
373
string reserved_ip_range = 9 [(google.api.field_behavior ) = OPTIONAL ];
335
374
375
+ // Optional. Additional IP range for node placement. Required when enabling read
376
+ // replicas on an existing instance. For DIRECT_PEERING mode value must be a
377
+ // CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
378
+ // must be the name of an allocated address range associated with the private
379
+ // service access connection, or "auto".
380
+ string secondary_ip_range = 30 [(google.api.field_behavior ) = OPTIONAL ];
381
+
336
382
// Output only. Hostname or IP address of the exposed Redis endpoint used by
337
383
// clients to connect to the service.
338
384
string host = 10 [(google.api.field_behavior ) = OUTPUT_ONLY ];
@@ -400,9 +446,37 @@ message Instance {
400
446
// If not provided, the connect mode defaults to DIRECT_PEERING.
401
447
ConnectMode connect_mode = 22 [(google.api.field_behavior ) = OPTIONAL ];
402
448
403
- // Optional. The number of replica nodes. Valid range for standard tier
404
- // is [1-5] and defaults to 1. Valid value for basic tier is 0 and defaults
405
- // to 0.
449
+ // Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to
450
+ // "true" AUTH is enabled on the instance. Default value is "false" meaning
451
+ // AUTH is disabled.
452
+ bool auth_enabled = 23 [(google.api.field_behavior ) = OPTIONAL ];
453
+
454
+ // Output only. List of server CA certificates for the instance.
455
+ repeated TlsCertificate server_ca_certs = 25 [(google.api.field_behavior ) = OUTPUT_ONLY ];
456
+
457
+ // Optional. The TLS mode of the Redis instance.
458
+ // If not provided, TLS is disabled for the instance.
459
+ TransitEncryptionMode transit_encryption_mode = 26 [(google.api.field_behavior ) = OPTIONAL ];
460
+
461
+ // Optional. The number of replica nodes. The valid range for the Standard Tier with
462
+ // read replicas enabled is [1-5] and defaults to 2. If read replicas are not
463
+ // enabled for a Standard Tier instance, the only valid value is 1 and the
464
+ // default is 1. The valid value for basic tier is 0 and the default is also
465
+ // 0.
466
+
467
+ // Optional. The maintenance policy for the instance. If not provided,
468
+ // maintenance events can be performed at any time.
469
+ MaintenancePolicy maintenance_policy = 27 [(google.api.field_behavior ) = OPTIONAL ];
470
+
471
+ // Output only. Date and time of upcoming maintenance events which have been
472
+ // scheduled.
473
+ MaintenanceSchedule maintenance_schedule = 28 [(google.api.field_behavior ) = OUTPUT_ONLY ];
474
+
475
+ // Optional. The number of replica nodes. The valid range for the Standard Tier with
476
+ // read replicas enabled is [1-5] and defaults to 2. If read replicas are not
477
+ // enabled for a Standard Tier instance, the only valid value is 1 and the
478
+ // default is 1. The valid value for basic tier is 0 and the default is also
479
+ // 0.
406
480
int32 replica_count = 31 [(google.api.field_behavior ) = OPTIONAL ];
407
481
408
482
// Output only. Info per node.
@@ -418,10 +492,95 @@ message Instance {
418
492
// endpoint. Standard tier only. Write requests should target 'port'.
419
493
int32 read_endpoint_port = 34 [(google.api.field_behavior ) = OUTPUT_ONLY ];
420
494
421
- // Optional. Read replica mode.
495
+ // Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED .
422
496
ReadReplicasMode read_replicas_mode = 35 [(google.api.field_behavior ) = OPTIONAL ];
423
497
}
424
498
499
+ // Request for [RescheduleMaintenance][google.cloud.redis.v1.CloudRedis.RescheduleMaintenance].
500
+ message RescheduleMaintenanceRequest {
501
+ // Reschedule options.
502
+ enum RescheduleType {
503
+ // Not set.
504
+ RESCHEDULE_TYPE_UNSPECIFIED = 0 ;
505
+
506
+ // If the user wants to schedule the maintenance to happen now.
507
+ IMMEDIATE = 1 ;
508
+
509
+ // If the user wants to use the existing maintenance policy to find the
510
+ // next available window.
511
+ NEXT_AVAILABLE_WINDOW = 2 ;
512
+
513
+ // If the user wants to reschedule the maintenance to a specific time.
514
+ SPECIFIC_TIME = 3 ;
515
+ }
516
+
517
+ // Required. Redis instance resource name using the form:
518
+ // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
519
+ // where `location_id` refers to a GCP region.
520
+ string name = 1 [
521
+ (google.api.field_behavior ) = REQUIRED ,
522
+ (google.api.resource_reference ) = {
523
+ type : "redis.googleapis.com/Instance"
524
+ }
525
+ ];
526
+
527
+ // Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
528
+ RescheduleType reschedule_type = 2 [(google.api.field_behavior ) = REQUIRED ];
529
+
530
+ // Optional. Timestamp when the maintenance shall be rescheduled to if
531
+ // reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for
532
+ // example `2012-11-15T16:19:00.094Z`.
533
+ google.protobuf.Timestamp schedule_time = 3 [(google.api.field_behavior ) = OPTIONAL ];
534
+ }
535
+
536
+ // Maintenance policy for an instance.
537
+ message MaintenancePolicy {
538
+ // Output only. The time when the policy was created.
539
+ google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior ) = OUTPUT_ONLY ];
540
+
541
+ // Output only. The time when the policy was last updated.
542
+ google.protobuf.Timestamp update_time = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
543
+
544
+ // Optional. Description of what this policy is for. Create/Update methods
545
+ // return INVALID_ARGUMENT if the length is greater than 512.
546
+ string description = 3 [(google.api.field_behavior ) = OPTIONAL ];
547
+
548
+ // Optional. Maintenance window that is applied to resources covered by this
549
+ // policy. Minimum 1. For the current version, the maximum number of
550
+ // weekly_window is expected to be one.
551
+ repeated WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(google.api.field_behavior ) = OPTIONAL ];
552
+ }
553
+
554
+ // Time window in which disruptive maintenance updates occur. Non-disruptive
555
+ // updates can occur inside or outside this window.
556
+ message WeeklyMaintenanceWindow {
557
+ // Required. The day of week that maintenance updates occur.
558
+ google.type.DayOfWeek day = 1 [(google.api.field_behavior ) = REQUIRED ];
559
+
560
+ // Required. Start time of the window in UTC time.
561
+ google.type.TimeOfDay start_time = 2 [(google.api.field_behavior ) = REQUIRED ];
562
+
563
+ // Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
564
+ google.protobuf.Duration duration = 3 [(google.api.field_behavior ) = OUTPUT_ONLY ];
565
+ }
566
+
567
+ // Upcoming maintenance schedule. If no maintenance is scheduled, fields are not
568
+ // populated.
569
+ message MaintenanceSchedule {
570
+ // Output only. The start time of any upcoming scheduled maintenance for this instance.
571
+ google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior ) = OUTPUT_ONLY ];
572
+
573
+ // Output only. The end time of any upcoming scheduled maintenance for this instance.
574
+ google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
575
+
576
+ // If the scheduled maintenance can be rescheduled, default is true.
577
+ bool can_reschedule = 3 [deprecated = true ];
578
+
579
+ // Output only. The deadline that the maintenance schedule start time can not go beyond,
580
+ // including reschedule.
581
+ google.protobuf.Timestamp schedule_deadline_time = 5 [(google.api.field_behavior ) = OUTPUT_ONLY ];
582
+ }
583
+
425
584
// Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances].
426
585
message ListInstancesRequest {
427
586
// Required. The resource name of the instance location using the form:
@@ -484,6 +643,25 @@ message GetInstanceRequest {
484
643
];
485
644
}
486
645
646
+ // Request for [GetInstanceAuthString][google.cloud.redis.v1.CloudRedis.GetInstanceAuthString].
647
+ message GetInstanceAuthStringRequest {
648
+ // Required. Redis instance resource name using the form:
649
+ // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
650
+ // where `location_id` refers to a GCP region.
651
+ string name = 1 [
652
+ (google.api.field_behavior ) = REQUIRED ,
653
+ (google.api.resource_reference ) = {
654
+ type : "redis.googleapis.com/Instance"
655
+ }
656
+ ];
657
+ }
658
+
659
+ // Instance AUTH string details.
660
+ message InstanceAuthString {
661
+ // AUTH string set on the instance.
662
+ string auth_string = 1 ;
663
+ }
664
+
487
665
// Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance].
488
666
message CreateInstanceRequest {
489
667
// Required. The resource name of the instance location using the form:
@@ -684,3 +862,25 @@ message LocationMetadata {
684
862
message ZoneMetadata {
685
863
686
864
}
865
+
866
+ // TlsCertificate Resource
867
+ message TlsCertificate {
868
+ // Serial number, as extracted from the certificate.
869
+ string serial_number = 1 ;
870
+
871
+ // PEM representation.
872
+ string cert = 2 ;
873
+
874
+ // Output only. The time when the certificate was created in [RFC
875
+ // 3339](https://tools.ietf.org/html/rfc3339) format, for example
876
+ // `2020-05-18T00:00:00.094Z`.
877
+ google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior ) = OUTPUT_ONLY ];
878
+
879
+ // Output only. The time when the certificate expires in [RFC
880
+ // 3339](https://tools.ietf.org/html/rfc3339) format, for example
881
+ // `2020-05-18T00:00:00.094Z`.
882
+ google.protobuf.Timestamp expire_time = 4 [(google.api.field_behavior ) = OUTPUT_ONLY ];
883
+
884
+ // Sha1 Fingerprint of the certificate.
885
+ string sha1_fingerprint = 5 ;
886
+ }
0 commit comments