1// Copyright 2022 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.redis.v1beta1; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/api/field_behavior.proto"; 22import "google/api/resource.proto"; 23import "google/longrunning/operations.proto"; 24import "google/protobuf/duration.proto"; 25import "google/protobuf/field_mask.proto"; 26import "google/protobuf/timestamp.proto"; 27import "google/type/dayofweek.proto"; 28import "google/type/timeofday.proto"; 29 30option go_package = "cloud.google.com/go/redis/apiv1beta1/redispb;redispb"; 31option java_multiple_files = true; 32option java_outer_classname = "CloudRedisServiceBetaProto"; 33option java_package = "com.google.cloud.redis.v1beta1"; 34 35// Configures and manages Cloud Memorystore for Redis instances 36// 37// Google Cloud Memorystore for Redis v1beta1 38// 39// The `redis.googleapis.com` service implements the Google Cloud Memorystore 40// for Redis API and defines the following resource model for managing Redis 41// instances: 42// * The service works with a collection of cloud projects, named: `/projects/*` 43// * Each project has a collection of available locations, named: `/locations/*` 44// * Each location has a collection of Redis instances, named: `/instances/*` 45// * As such, Redis instances are resources of the form: 46// `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 47// 48// Note that location_id must be referring to a GCP `region`; for example: 49// * `projects/redpepper-1290/locations/us-central1/instances/my-redis` 50service CloudRedis { 51 option (google.api.default_host) = "redis.googleapis.com"; 52 option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; 53 54 // Lists all Redis instances owned by a project in either the specified 55 // location (region) or all locations. 56 // 57 // The location should have the following format: 58 // 59 // * `projects/{project_id}/locations/{location_id}` 60 // 61 // If `location_id` is specified as `-` (wildcard), then all regions 62 // available to the project are queried, and the results are aggregated. 63 rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { 64 option (google.api.http) = { 65 get: "/v1beta1/{parent=projects/*/locations/*}/instances" 66 }; 67 option (google.api.method_signature) = "parent"; 68 } 69 70 // Gets the details of a specific Redis instance. 71 rpc GetInstance(GetInstanceRequest) returns (Instance) { 72 option (google.api.http) = { 73 get: "/v1beta1/{name=projects/*/locations/*/instances/*}" 74 }; 75 option (google.api.method_signature) = "name"; 76 } 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: "/v1beta1/{name=projects/*/locations/*/instances/*}/authString" 84 }; 85 option (google.api.method_signature) = "name"; 86 } 87 88 // Creates a Redis instance based on the specified tier and memory size. 89 // 90 // By default, the instance is accessible from the project's 91 // [default network](https://cloud.google.com/vpc/docs/vpc). 92 // 93 // The creation is executed asynchronously and callers may check the returned 94 // operation to track its progress. Once the operation is completed the Redis 95 // instance will be fully functional. The completed longrunning.Operation will 96 // contain the new instance object in the response field. 97 // 98 // The returned operation is automatically deleted after a few hours, so there 99 // is no need to call DeleteOperation. 100 rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { 101 option (google.api.http) = { 102 post: "/v1beta1/{parent=projects/*/locations/*}/instances" 103 body: "instance" 104 }; 105 option (google.api.method_signature) = "parent,instance_id,instance"; 106 option (google.longrunning.operation_info) = { 107 response_type: "google.cloud.redis.v1beta1.Instance" 108 metadata_type: "google.protobuf.Any" 109 }; 110 } 111 112 // Updates the metadata and configuration of a specific Redis instance. 113 // 114 // Completed longrunning.Operation will contain the new instance object 115 // in the response field. The returned operation is automatically deleted 116 // after a few hours, so there is no need to call DeleteOperation. 117 rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) { 118 option (google.api.http) = { 119 patch: "/v1beta1/{instance.name=projects/*/locations/*/instances/*}" 120 body: "instance" 121 }; 122 option (google.api.method_signature) = "update_mask,instance"; 123 option (google.longrunning.operation_info) = { 124 response_type: "google.cloud.redis.v1beta1.Instance" 125 metadata_type: "google.protobuf.Any" 126 }; 127 } 128 129 // Upgrades Redis instance to the newer Redis version specified in the 130 // request. 131 rpc UpgradeInstance(UpgradeInstanceRequest) returns (google.longrunning.Operation) { 132 option (google.api.http) = { 133 post: "/v1beta1/{name=projects/*/locations/*/instances/*}:upgrade" 134 body: "*" 135 }; 136 option (google.api.method_signature) = "name,redis_version"; 137 option (google.longrunning.operation_info) = { 138 response_type: "google.cloud.redis.v1beta1.Instance" 139 metadata_type: "google.protobuf.Any" 140 }; 141 } 142 143 // Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. 144 // 145 // Redis may stop serving during this operation. Instance state will be 146 // IMPORTING for entire operation. When complete, the instance will contain 147 // only data from the imported file. 148 // 149 // The returned operation is automatically deleted after a few hours, so 150 // there is no need to call DeleteOperation. 151 rpc ImportInstance(ImportInstanceRequest) returns (google.longrunning.Operation) { 152 option (google.api.http) = { 153 post: "/v1beta1/{name=projects/*/locations/*/instances/*}:import" 154 body: "*" 155 }; 156 option (google.api.method_signature) = "name,input_config"; 157 option (google.longrunning.operation_info) = { 158 response_type: "google.cloud.redis.v1beta1.Instance" 159 metadata_type: "google.protobuf.Any" 160 }; 161 } 162 163 // Export Redis instance data into a Redis RDB format file in Cloud Storage. 164 // 165 // Redis will continue serving during this operation. 166 // 167 // The returned operation is automatically deleted after a few hours, so 168 // there is no need to call DeleteOperation. 169 rpc ExportInstance(ExportInstanceRequest) returns (google.longrunning.Operation) { 170 option (google.api.http) = { 171 post: "/v1beta1/{name=projects/*/locations/*/instances/*}:export" 172 body: "*" 173 }; 174 option (google.api.method_signature) = "name,output_config"; 175 option (google.longrunning.operation_info) = { 176 response_type: "google.cloud.redis.v1beta1.Instance" 177 metadata_type: "google.protobuf.Any" 178 }; 179 } 180 181 // Initiates a failover of the primary node to current replica node for a 182 // specific STANDARD tier Cloud Memorystore for Redis instance. 183 rpc FailoverInstance(FailoverInstanceRequest) returns (google.longrunning.Operation) { 184 option (google.api.http) = { 185 post: "/v1beta1/{name=projects/*/locations/*/instances/*}:failover" 186 body: "*" 187 }; 188 option (google.api.method_signature) = "name,data_protection_mode"; 189 option (google.longrunning.operation_info) = { 190 response_type: "google.cloud.redis.v1beta1.Instance" 191 metadata_type: "google.protobuf.Any" 192 }; 193 } 194 195 // Deletes a specific Redis instance. Instance stops serving and data is 196 // deleted. 197 rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { 198 option (google.api.http) = { 199 delete: "/v1beta1/{name=projects/*/locations/*/instances/*}" 200 }; 201 option (google.api.method_signature) = "name"; 202 option (google.longrunning.operation_info) = { 203 response_type: "google.protobuf.Empty" 204 metadata_type: "google.protobuf.Any" 205 }; 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: "/v1beta1/{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.v1beta1.Instance" 218 metadata_type: "google.protobuf.Any" 219 }; 220 } 221} 222 223// Node specific properties. 224message NodeInfo { 225 // Output only. Node identifying string. e.g. 'node-0', 'node-1' 226 string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 227 228 // Output only. Location of the node. 229 string zone = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 230} 231 232// A Memorystore for Redis instance. 233message Instance { 234 option (google.api.resource) = { 235 type: "redis.googleapis.com/Instance" 236 pattern: "projects/{project}/locations/{location}/instances/{instance}" 237 }; 238 239 // Represents the different states of a Redis instance. 240 enum State { 241 // Not set. 242 STATE_UNSPECIFIED = 0; 243 244 // Redis instance is being created. 245 CREATING = 1; 246 247 // Redis instance has been created and is fully usable. 248 READY = 2; 249 250 // Redis instance configuration is being updated. Certain kinds of updates 251 // may cause the instance to become unusable while the update is in 252 // progress. 253 UPDATING = 3; 254 255 // Redis instance is being deleted. 256 DELETING = 4; 257 258 // Redis instance is being repaired and may be unusable. 259 REPAIRING = 5; 260 261 // Maintenance is being performed on this Redis instance. 262 MAINTENANCE = 6; 263 264 // Redis instance is importing data (availability may be affected). 265 IMPORTING = 8; 266 267 // Redis instance is failing over (availability may be affected). 268 FAILING_OVER = 10; 269 } 270 271 // Available service tiers to choose from 272 enum Tier { 273 // Not set. 274 TIER_UNSPECIFIED = 0; 275 276 // BASIC tier: standalone instance 277 BASIC = 1; 278 279 // STANDARD_HA tier: highly available primary/replica instances 280 STANDARD_HA = 3; 281 } 282 283 // Available connection modes. 284 enum ConnectMode { 285 // Not set. 286 CONNECT_MODE_UNSPECIFIED = 0; 287 288 // Connect via direct peering to the Memorystore for Redis hosted service. 289 DIRECT_PEERING = 1; 290 291 // Connect your Memorystore for Redis instance using Private Service 292 // Access. Private services access provides an IP address range for multiple 293 // Google Cloud services, including Memorystore. 294 PRIVATE_SERVICE_ACCESS = 2; 295 } 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 309 // Read replicas mode. 310 enum ReadReplicasMode { 311 // If not set, Memorystore Redis backend will default to 312 // READ_REPLICAS_DISABLED. 313 READ_REPLICAS_MODE_UNSPECIFIED = 0; 314 315 // If disabled, read endpoint will not be provided and the instance cannot 316 // scale up or down the number of replicas. 317 READ_REPLICAS_DISABLED = 1; 318 319 // If enabled, read endpoint will be provided and the instance can scale 320 // up and down the number of replicas. Not valid for basic tier. 321 READ_REPLICAS_ENABLED = 2; 322 } 323 324 // Required. Unique name of the resource in this scope including project and 325 // location using the form: 326 // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` 327 // 328 // Note: Redis instances are managed and addressed at regional level so 329 // location_id here refers to a GCP region; however, users may choose which 330 // specific zone (or collection of zones for cross-zone instances) an instance 331 // should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and 332 // [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details. 333 string name = 1 [(google.api.field_behavior) = REQUIRED]; 334 335 // An arbitrary and optional user-provided name for the instance. 336 string display_name = 2; 337 338 // Resource labels to represent user provided metadata 339 map<string, string> labels = 3; 340 341 // Optional. The zone where the instance will be provisioned. If not provided, 342 // the service will choose a zone from the specified region for the instance. 343 // For standard tier, additional nodes will be added across multiple zones for 344 // protection against zonal failures. If specified, at least one node will be 345 // provisioned in this zone. 346 string location_id = 4 [(google.api.field_behavior) = OPTIONAL]; 347 348 // Optional. If specified, at least one node will be provisioned in this zone 349 // in addition to the zone specified in location_id. Only applicable to 350 // standard tier. If provided, it must be a different zone from the one 351 // provided in [location_id]. Additional nodes beyond the first 2 will be 352 // placed in zones selected by the service. 353 string alternative_location_id = 5 [(google.api.field_behavior) = OPTIONAL]; 354 355 // Optional. The version of Redis software. 356 // If not provided, latest supported version will be used. Currently, the 357 // supported values are: 358 // 359 // * `REDIS_3_2` for Redis 3.2 compatibility 360 // * `REDIS_4_0` for Redis 4.0 compatibility (default) 361 // * `REDIS_5_0` for Redis 5.0 compatibility 362 // * `REDIS_6_X` for Redis 6.x compatibility 363 string redis_version = 7 [(google.api.field_behavior) = OPTIONAL]; 364 365 // Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses 366 // that are reserved for this instance. Range must 367 // be unique and non-overlapping with existing subnets in an authorized 368 // network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP 369 // address ranges associated with this private service access connection. 370 // If not provided, the service will choose an unused /29 block, for 371 // example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED 372 // the default block size is /28. 373 string reserved_ip_range = 9 [(google.api.field_behavior) = OPTIONAL]; 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 382 // Output only. Hostname or IP address of the exposed Redis endpoint used by 383 // clients to connect to the service. 384 string host = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 385 386 // Output only. The port number of the exposed Redis endpoint. 387 int32 port = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; 388 389 // Output only. The current zone where the Redis primary node is located. In 390 // basic tier, this will always be the same as [location_id]. In 391 // standard tier, this can be the zone of any node in the instance. 392 string current_location_id = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; 393 394 // Output only. The time the instance was created. 395 google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; 396 397 // Output only. The current state of this instance. 398 State state = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; 399 400 // Output only. Additional information about the current status of this 401 // instance, if available. 402 string status_message = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; 403 404 // Optional. Redis configuration parameters, according to 405 // http://redis.io/topics/config. Currently, the only supported parameters 406 // are: 407 // 408 // Redis version 3.2 and newer: 409 // 410 // * maxmemory-policy 411 // * notify-keyspace-events 412 // 413 // Redis version 4.0 and newer: 414 // 415 // * activedefrag 416 // * lfu-decay-time 417 // * lfu-log-factor 418 // * maxmemory-gb 419 // 420 // Redis version 5.0 and newer: 421 // 422 // * stream-node-max-bytes 423 // * stream-node-max-entries 424 map<string, string> redis_configs = 16 [(google.api.field_behavior) = OPTIONAL]; 425 426 // Required. The service tier of the instance. 427 Tier tier = 17 [(google.api.field_behavior) = REQUIRED]; 428 429 // Required. Redis memory size in GiB. 430 int32 memory_size_gb = 18 [(google.api.field_behavior) = REQUIRED]; 431 432 // Optional. The full name of the Google Compute Engine 433 // [network](https://cloud.google.com/vpc/docs/vpc) to which the 434 // instance is connected. If left unspecified, the `default` network 435 // will be used. 436 string authorized_network = 20 [(google.api.field_behavior) = OPTIONAL]; 437 438 // Output only. Cloud IAM identity used by import / export operations to 439 // transfer data to/from Cloud Storage. Format is 440 // "serviceAccount:<service_account_email>". The value may change over time 441 // for a given instance so should be checked before each import/export 442 // operation. 443 string persistence_iam_identity = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; 444 445 // Optional. The network connect mode of the Redis instance. 446 // If not provided, the connect mode defaults to DIRECT_PEERING. 447 ConnectMode connect_mode = 22 [(google.api.field_behavior) = OPTIONAL]; 448 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 maintenance policy for the instance. If not provided, 462 // maintenance events can be performed at any time. 463 MaintenancePolicy maintenance_policy = 27 [(google.api.field_behavior) = OPTIONAL]; 464 465 // Output only. Date and time of upcoming maintenance events which have been 466 // scheduled. 467 MaintenanceSchedule maintenance_schedule = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; 468 469 // Optional. The number of replica nodes. The valid range for the Standard Tier with 470 // read replicas enabled is [1-5] and defaults to 2. If read replicas are not 471 // enabled for a Standard Tier instance, the only valid value is 1 and the 472 // default is 1. The valid value for basic tier is 0 and the default is also 473 // 0. 474 int32 replica_count = 31 [(google.api.field_behavior) = OPTIONAL]; 475 476 // Output only. Info per node. 477 repeated NodeInfo nodes = 32 [(google.api.field_behavior) = OUTPUT_ONLY]; 478 479 // Output only. Hostname or IP address of the exposed readonly Redis 480 // endpoint. Standard tier only. Targets all healthy replica nodes in 481 // instance. Replication is asynchronous and replica nodes will exhibit some 482 // lag behind the primary. Write requests must target 'host'. 483 string read_endpoint = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; 484 485 // Output only. The port number of the exposed readonly redis 486 // endpoint. Standard tier only. Write requests should target 'port'. 487 int32 read_endpoint_port = 34 [(google.api.field_behavior) = OUTPUT_ONLY]; 488 489 // Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED. 490 ReadReplicasMode read_replicas_mode = 35 [(google.api.field_behavior) = OPTIONAL]; 491 492 // Optional. Persistence configuration parameters 493 PersistenceConfig persistence_config = 37 [(google.api.field_behavior) = OPTIONAL]; 494} 495 496// Configuration of the persistence functionality. 497message PersistenceConfig { 498 // Available Persistence modes. 499 enum PersistenceMode { 500 // Not set. 501 PERSISTENCE_MODE_UNSPECIFIED = 0; 502 503 // Persistence is disabled for the instance, 504 // and any existing snapshots are deleted. 505 DISABLED = 1; 506 507 // RDB based Persistence is enabled. 508 RDB = 2; 509 } 510 511 // Available snapshot periods for scheduling. 512 enum SnapshotPeriod { 513 // Not set. 514 SNAPSHOT_PERIOD_UNSPECIFIED = 0; 515 516 // Snapshot every 1 hour. 517 ONE_HOUR = 3; 518 519 // Snapshot every 6 hours. 520 SIX_HOURS = 4; 521 522 // Snapshot every 12 hours. 523 TWELVE_HOURS = 5; 524 525 // Snapshot every 24 hours. 526 TWENTY_FOUR_HOURS = 6; 527 } 528 529 // Optional. Controls whether Persistence features are enabled. 530 // If not provided, the existing value will be used. 531 PersistenceMode persistence_mode = 1 [(google.api.field_behavior) = OPTIONAL]; 532 533 // Optional. Period between RDB snapshots. Snapshots will be attempted every period 534 // starting from the provided snapshot start time. For example, a start time 535 // of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing until 536 // 01/01/2033, and then trigger snapshots every day at 06:45, 12:45, 18:45, 537 // and 00:45 the next day, and so on. 538 // If not provided, TWENTY_FOUR_HOURS will be used as default. 539 SnapshotPeriod rdb_snapshot_period = 2 [(google.api.field_behavior) = OPTIONAL]; 540 541 // Output only. The next time that a snapshot attempt is scheduled to occur. 542 google.protobuf.Timestamp rdb_next_snapshot_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 543 544 // Optional. Date and time that the first snapshot was/will be attempted, and to which 545 // future snapshots will be aligned. 546 // If not provided, the current time will be used. 547 google.protobuf.Timestamp rdb_snapshot_start_time = 5 [(google.api.field_behavior) = OPTIONAL]; 548} 549 550// Request for [RescheduleMaintenance][google.cloud.redis.v1beta1.CloudRedis.RescheduleMaintenance]. 551message RescheduleMaintenanceRequest { 552 // Reschedule options. 553 enum RescheduleType { 554 // Not set. 555 RESCHEDULE_TYPE_UNSPECIFIED = 0; 556 557 // If the user wants to schedule the maintenance to happen now. 558 IMMEDIATE = 1; 559 560 // If the user wants to use the existing maintenance policy to find the 561 // next available window. 562 NEXT_AVAILABLE_WINDOW = 2; 563 564 // If the user wants to reschedule the maintenance to a specific time. 565 SPECIFIC_TIME = 3; 566 } 567 568 // Required. Redis instance resource name using the form: 569 // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` 570 // where `location_id` refers to a GCP region. 571 string name = 1 [ 572 (google.api.field_behavior) = REQUIRED, 573 (google.api.resource_reference) = { 574 type: "redis.googleapis.com/Instance" 575 } 576 ]; 577 578 // Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. 579 RescheduleType reschedule_type = 2 [(google.api.field_behavior) = REQUIRED]; 580 581 // Optional. Timestamp when the maintenance shall be rescheduled to if 582 // reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for 583 // example `2012-11-15T16:19:00.094Z`. 584 google.protobuf.Timestamp schedule_time = 3 [(google.api.field_behavior) = OPTIONAL]; 585} 586 587// Maintenance policy for an instance. 588message MaintenancePolicy { 589 // Output only. The time when the policy was created. 590 google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 591 592 // Output only. The time when the policy was last updated. 593 google.protobuf.Timestamp update_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 594 595 // Optional. Description of what this policy is for. Create/Update methods 596 // return INVALID_ARGUMENT if the length is greater than 512. 597 string description = 3 [(google.api.field_behavior) = OPTIONAL]; 598 599 // Optional. Maintenance window that is applied to resources covered by this 600 // policy. Minimum 1. For the current version, the maximum number of 601 // weekly_window is expected to be one. 602 repeated WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(google.api.field_behavior) = OPTIONAL]; 603} 604 605// Time window in which disruptive maintenance updates occur. Non-disruptive 606// updates can occur inside or outside this window. 607message WeeklyMaintenanceWindow { 608 // Required. The day of week that maintenance updates occur. 609 google.type.DayOfWeek day = 1 [(google.api.field_behavior) = REQUIRED]; 610 611 // Required. Start time of the window in UTC time. 612 google.type.TimeOfDay start_time = 2 [(google.api.field_behavior) = REQUIRED]; 613 614 // Output only. Duration of the maintenance window. The current window is fixed at 1 hour. 615 google.protobuf.Duration duration = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 616} 617 618// Upcoming maintenance schedule. If no maintenance is scheduled, fields are not 619// populated. 620message MaintenanceSchedule { 621 // Output only. The start time of any upcoming scheduled maintenance for this instance. 622 google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 623 624 // Output only. The end time of any upcoming scheduled maintenance for this instance. 625 google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 626 627 // If the scheduled maintenance can be rescheduled, default is true. 628 bool can_reschedule = 3 [deprecated = true]; 629 630 // Output only. The deadline that the maintenance schedule start time can not go beyond, 631 // including reschedule. 632 google.protobuf.Timestamp schedule_deadline_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 633} 634 635// Request for [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances]. 636message ListInstancesRequest { 637 // Required. The resource name of the instance location using the form: 638 // `projects/{project_id}/locations/{location_id}` 639 // where `location_id` refers to a GCP region. 640 string parent = 1 [ 641 (google.api.field_behavior) = REQUIRED, 642 (google.api.resource_reference) = { 643 type: "locations.googleapis.com/Location" 644 } 645 ]; 646 647 // The maximum number of items to return. 648 // 649 // If not specified, a default value of 1000 will be used by the service. 650 // Regardless of the page_size value, the response may include a partial list 651 // and a caller should only rely on response's 652 // [`next_page_token`][google.cloud.redis.v1beta1.ListInstancesResponse.next_page_token] 653 // to determine if there are more instances left to be queried. 654 int32 page_size = 2; 655 656 // The `next_page_token` value returned from a previous 657 // [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances] request, if any. 658 string page_token = 3; 659} 660 661// Response for [ListInstances][google.cloud.redis.v1beta1.CloudRedis.ListInstances]. 662message ListInstancesResponse { 663 // A list of Redis instances in the project in the specified location, 664 // or across all locations. 665 // 666 // If the `location_id` in the parent field of the request is "-", all regions 667 // available to the project are queried, and the results aggregated. 668 // If in such an aggregated query a location is unavailable, a placeholder 669 // Redis entry is included in the response with the `name` field set to a 670 // value of the form 671 // `projects/{project_id}/locations/{location_id}/instances/`- and the 672 // `status` field set to ERROR and `status_message` field set to "location not 673 // available for ListInstances". 674 repeated Instance instances = 1; 675 676 // Token to retrieve the next page of results, or empty if there are no more 677 // results in the list. 678 string next_page_token = 2; 679 680 // Locations that could not be reached. 681 repeated string unreachable = 3; 682} 683 684// Request for [GetInstance][google.cloud.redis.v1beta1.CloudRedis.GetInstance]. 685message GetInstanceRequest { 686 // Required. Redis instance resource name using the form: 687 // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` 688 // where `location_id` refers to a GCP region. 689 string name = 1 [ 690 (google.api.field_behavior) = REQUIRED, 691 (google.api.resource_reference) = { 692 type: "redis.googleapis.com/Instance" 693 } 694 ]; 695} 696 697// Request for [GetInstanceAuthString][google.cloud.redis.v1beta1.CloudRedis.GetInstanceAuthString]. 698message GetInstanceAuthStringRequest { 699 // Required. Redis instance resource name using the form: 700 // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` 701 // where `location_id` refers to a GCP region. 702 string name = 1 [ 703 (google.api.field_behavior) = REQUIRED, 704 (google.api.resource_reference) = { 705 type: "redis.googleapis.com/Instance" 706 } 707 ]; 708} 709 710// Instance AUTH string details. 711message InstanceAuthString { 712 // AUTH string set on the instance. 713 string auth_string = 1; 714} 715 716// Request for [CreateInstance][google.cloud.redis.v1beta1.CloudRedis.CreateInstance]. 717message CreateInstanceRequest { 718 // Required. The resource name of the instance location using the form: 719 // `projects/{project_id}/locations/{location_id}` 720 // where `location_id` refers to a GCP region. 721 string parent = 1 [ 722 (google.api.field_behavior) = REQUIRED, 723 (google.api.resource_reference) = { 724 type: "locations.googleapis.com/Location" 725 } 726 ]; 727 728 // Required. The logical name of the Redis instance in the customer project 729 // with the following restrictions: 730 // 731 // * Must contain only lowercase letters, numbers, and hyphens. 732 // * Must start with a letter. 733 // * Must be between 1-40 characters. 734 // * Must end with a number or a letter. 735 // * Must be unique within the customer project / location 736 string instance_id = 2 [(google.api.field_behavior) = REQUIRED]; 737 738 // Required. A Redis [Instance] resource 739 Instance instance = 3 [(google.api.field_behavior) = REQUIRED]; 740} 741 742// Request for [UpdateInstance][google.cloud.redis.v1beta1.CloudRedis.UpdateInstance]. 743message UpdateInstanceRequest { 744 // Required. Mask of fields to update. At least one path must be supplied in 745 // this field. The elements of the repeated paths field may only include these 746 // fields from [Instance][google.cloud.redis.v1beta1.Instance]: 747 // 748 // * `displayName` 749 // * `labels` 750 // * `memorySizeGb` 751 // * `redisConfig` 752 // * `replica_count` 753 google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED]; 754 755 // Required. Update description. 756 // Only fields specified in update_mask are updated. 757 Instance instance = 2 [(google.api.field_behavior) = REQUIRED]; 758} 759 760// Request for [UpgradeInstance][google.cloud.redis.v1beta1.CloudRedis.UpgradeInstance]. 761message UpgradeInstanceRequest { 762 // Required. Redis instance resource name using the form: 763 // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` 764 // where `location_id` refers to a GCP region. 765 string name = 1 [ 766 (google.api.field_behavior) = REQUIRED, 767 (google.api.resource_reference) = { 768 type: "redis.googleapis.com/Instance" 769 } 770 ]; 771 772 // Required. Specifies the target version of Redis software to upgrade to. 773 string redis_version = 2 [(google.api.field_behavior) = REQUIRED]; 774} 775 776// Request for [DeleteInstance][google.cloud.redis.v1beta1.CloudRedis.DeleteInstance]. 777message DeleteInstanceRequest { 778 // Required. Redis instance resource name using the form: 779 // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` 780 // where `location_id` refers to a GCP region. 781 string name = 1 [ 782 (google.api.field_behavior) = REQUIRED, 783 (google.api.resource_reference) = { 784 type: "redis.googleapis.com/Instance" 785 } 786 ]; 787} 788 789// The Cloud Storage location for the input content 790message GcsSource { 791 // Required. Source data URI. (e.g. 'gs://my_bucket/my_object'). 792 string uri = 1 [(google.api.field_behavior) = REQUIRED]; 793} 794 795// The input content 796message InputConfig { 797 // Required. Specify source location of input data 798 oneof source { 799 // Google Cloud Storage location where input content is located. 800 GcsSource gcs_source = 1; 801 } 802} 803 804// Request for [Import][google.cloud.redis.v1beta1.CloudRedis.ImportInstance]. 805message ImportInstanceRequest { 806 // Required. Redis instance resource name using the form: 807 // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` 808 // where `location_id` refers to a GCP region. 809 string name = 1 [(google.api.field_behavior) = REQUIRED]; 810 811 // Required. Specify data to be imported. 812 InputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED]; 813} 814 815// The Cloud Storage location for the output content 816message GcsDestination { 817 // Required. Data destination URI (e.g. 818 // 'gs://my_bucket/my_object'). Existing files will be overwritten. 819 string uri = 1 [(google.api.field_behavior) = REQUIRED]; 820} 821 822// The output content 823message OutputConfig { 824 // Required. Specify destination location of output data 825 oneof destination { 826 // Google Cloud Storage destination for output content. 827 GcsDestination gcs_destination = 1; 828 } 829} 830 831// Request for [Export][google.cloud.redis.v1beta1.CloudRedis.ExportInstance]. 832message ExportInstanceRequest { 833 // Required. Redis instance resource name using the form: 834 // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` 835 // where `location_id` refers to a GCP region. 836 string name = 1 [(google.api.field_behavior) = REQUIRED]; 837 838 // Required. Specify data to be exported. 839 OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; 840} 841 842// Request for [Failover][google.cloud.redis.v1beta1.CloudRedis.FailoverInstance]. 843message FailoverInstanceRequest { 844 // Specifies different modes of operation in relation to the data retention. 845 enum DataProtectionMode { 846 // Defaults to LIMITED_DATA_LOSS if a data protection mode is not 847 // specified. 848 DATA_PROTECTION_MODE_UNSPECIFIED = 0; 849 850 // Instance failover will be protected with data loss control. More 851 // specifically, the failover will only be performed if the current 852 // replication offset diff between primary and replica is under a certain 853 // threshold. 854 LIMITED_DATA_LOSS = 1; 855 856 // Instance failover will be performed without data loss control. 857 FORCE_DATA_LOSS = 2; 858 } 859 860 // Required. Redis instance resource name using the form: 861 // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` 862 // where `location_id` refers to a GCP region. 863 string name = 1 [ 864 (google.api.field_behavior) = REQUIRED, 865 (google.api.resource_reference) = { 866 type: "redis.googleapis.com/Instance" 867 } 868 ]; 869 870 // Optional. Available data protection modes that the user can choose. If it's 871 // unspecified, data protection mode will be LIMITED_DATA_LOSS by default. 872 DataProtectionMode data_protection_mode = 2 [(google.api.field_behavior) = OPTIONAL]; 873} 874 875// This location metadata represents additional configuration options for a 876// given location where a Redis instance may be created. All fields are output 877// only. It is returned as content of the 878// `google.cloud.location.Location.metadata` field. 879message LocationMetadata { 880 // Output only. The set of available zones in the location. The map is keyed 881 // by the lowercase ID of each zone, as defined by GCE. These keys can be 882 // specified in `location_id` or `alternative_location_id` fields when 883 // creating a Redis instance. 884 map<string, ZoneMetadata> available_zones = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 885} 886 887// Defines specific information for a particular zone. Currently empty and 888// reserved for future use only. 889message ZoneMetadata { 890 891} 892 893// TlsCertificate Resource 894message TlsCertificate { 895 // Serial number, as extracted from the certificate. 896 string serial_number = 1; 897 898 // PEM representation. 899 string cert = 2; 900 901 // Output only. The time when the certificate was created in [RFC 902 // 3339](https://tools.ietf.org/html/rfc3339) format, for example 903 // `2020-05-18T00:00:00.094Z`. 904 google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 905 906 // Output only. The time when the certificate expires in [RFC 907 // 3339](https://tools.ietf.org/html/rfc3339) format, for example 908 // `2020-05-18T00:00:00.094Z`. 909 google.protobuf.Timestamp expire_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 910 911 // Sha1 Fingerprint of the certificate. 912 string sha1_fingerprint = 5; 913} 914