cloud_redis.proto 36 KB

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