cloud_redis.proto 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  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.v1;
  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/v1;redis";
  27. option java_multiple_files = true;
  28. option java_outer_classname = "CloudRedisServiceV1Proto";
  29. option java_package = "com.google.cloud.redis.v1";
  30. // Configures and manages Cloud Memorystore for Redis instances
  31. //
  32. // Google Cloud Memorystore for Redis v1
  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: "/v1/{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: "/v1/{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: "/v1/{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. 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: "/v1/{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.v1.Instance"
  99. metadata_type: "google.cloud.redis.v1.OperationMetadata"
  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: "/v1/{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.v1.Instance"
  115. metadata_type: "google.cloud.redis.v1.OperationMetadata"
  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: "/v1/{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.v1.Instance"
  128. metadata_type: "google.cloud.redis.v1.OperationMetadata"
  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: "/v1/{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.v1.Instance"
  147. metadata_type: "google.cloud.redis.v1.OperationMetadata"
  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: "/v1/{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.v1.Instance"
  164. metadata_type: "google.cloud.redis.v1.OperationMetadata"
  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: "/v1/{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.v1.Instance"
  177. metadata_type: "google.cloud.redis.v1.OperationMetadata"
  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: "/v1/{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.cloud.redis.v1.OperationMetadata"
  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: "/v1/{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.v1.Instance"
  202. metadata_type: "google.cloud.redis.v1.OperationMetadata"
  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 = 9;
  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.v1.Instance.location_id] and
  291. // [alternative_location_id][google.cloud.redis.v1.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 number of replica nodes. The valid range for the Standard Tier with
  398. // read replicas enabled is [1-5] and defaults to 2. If read replicas are not
  399. // enabled for a Standard Tier instance, the only valid value is 1 and the
  400. // default is 1. The valid value for basic tier is 0 and the default is also
  401. // 0.
  402. // Optional. The maintenance policy for the instance. If not provided,
  403. // maintenance events can be performed at any time.
  404. MaintenancePolicy maintenance_policy = 27 [(google.api.field_behavior) = OPTIONAL];
  405. // Output only. Date and time of upcoming maintenance events which have been
  406. // scheduled.
  407. MaintenanceSchedule maintenance_schedule = 28 [(google.api.field_behavior) = OUTPUT_ONLY];
  408. // Optional. The number of replica nodes. The valid range for the Standard Tier with
  409. // read replicas enabled is [1-5] and defaults to 2. If read replicas are not
  410. // enabled for a Standard Tier instance, the only valid value is 1 and the
  411. // default is 1. The valid value for basic tier is 0 and the default is also
  412. // 0.
  413. int32 replica_count = 31 [(google.api.field_behavior) = OPTIONAL];
  414. // Output only. Info per node.
  415. repeated NodeInfo nodes = 32 [(google.api.field_behavior) = OUTPUT_ONLY];
  416. // Output only. Hostname or IP address of the exposed readonly Redis
  417. // endpoint. Standard tier only. Targets all healthy replica nodes in
  418. // instance. Replication is asynchronous and replica nodes will exhibit some
  419. // lag behind the primary. Write requests must target 'host'.
  420. string read_endpoint = 33 [(google.api.field_behavior) = OUTPUT_ONLY];
  421. // Output only. The port number of the exposed readonly redis
  422. // endpoint. Standard tier only. Write requests should target 'port'.
  423. int32 read_endpoint_port = 34 [(google.api.field_behavior) = OUTPUT_ONLY];
  424. // Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
  425. ReadReplicasMode read_replicas_mode = 35 [(google.api.field_behavior) = OPTIONAL];
  426. }
  427. // Request for [RescheduleMaintenance][google.cloud.redis.v1.CloudRedis.RescheduleMaintenance].
  428. message RescheduleMaintenanceRequest {
  429. // Reschedule options.
  430. enum RescheduleType {
  431. // Not set.
  432. RESCHEDULE_TYPE_UNSPECIFIED = 0;
  433. // If the user wants to schedule the maintenance to happen now.
  434. IMMEDIATE = 1;
  435. // If the user wants to use the existing maintenance policy to find the
  436. // next available window.
  437. NEXT_AVAILABLE_WINDOW = 2;
  438. // If the user wants to reschedule the maintenance to a specific time.
  439. SPECIFIC_TIME = 3;
  440. }
  441. // Required. Redis instance resource name using the form:
  442. // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  443. // where `location_id` refers to a GCP region.
  444. string name = 1 [
  445. (google.api.field_behavior) = REQUIRED,
  446. (google.api.resource_reference) = {
  447. type: "redis.googleapis.com/Instance"
  448. }
  449. ];
  450. // Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
  451. RescheduleType reschedule_type = 2 [(google.api.field_behavior) = REQUIRED];
  452. // Optional. Timestamp when the maintenance shall be rescheduled to if
  453. // reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for
  454. // example `2012-11-15T16:19:00.094Z`.
  455. google.protobuf.Timestamp schedule_time = 3 [(google.api.field_behavior) = OPTIONAL];
  456. }
  457. // Maintenance policy for an instance.
  458. message MaintenancePolicy {
  459. // Output only. The time when the policy was created.
  460. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  461. // Output only. The time when the policy was last updated.
  462. google.protobuf.Timestamp update_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  463. // Optional. Description of what this policy is for. Create/Update methods
  464. // return INVALID_ARGUMENT if the length is greater than 512.
  465. string description = 3 [(google.api.field_behavior) = OPTIONAL];
  466. // Optional. Maintenance window that is applied to resources covered by this
  467. // policy. Minimum 1. For the current version, the maximum number of
  468. // weekly_window is expected to be one.
  469. repeated WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(google.api.field_behavior) = OPTIONAL];
  470. }
  471. // Time window in which disruptive maintenance updates occur. Non-disruptive
  472. // updates can occur inside or outside this window.
  473. message WeeklyMaintenanceWindow {
  474. // Required. The day of week that maintenance updates occur.
  475. google.type.DayOfWeek day = 1 [(google.api.field_behavior) = REQUIRED];
  476. // Required. Start time of the window in UTC time.
  477. google.type.TimeOfDay start_time = 2 [(google.api.field_behavior) = REQUIRED];
  478. // Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
  479. google.protobuf.Duration duration = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  480. }
  481. // Upcoming maintenance schedule. If no maintenance is scheduled, fields are not
  482. // populated.
  483. message MaintenanceSchedule {
  484. // Output only. The start time of any upcoming scheduled maintenance for this instance.
  485. google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  486. // Output only. The end time of any upcoming scheduled maintenance for this instance.
  487. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  488. // If the scheduled maintenance can be rescheduled, default is true.
  489. bool can_reschedule = 3 [deprecated = true];
  490. // Output only. The deadline that the maintenance schedule start time can not go beyond,
  491. // including reschedule.
  492. google.protobuf.Timestamp schedule_deadline_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  493. }
  494. // Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances].
  495. message ListInstancesRequest {
  496. // Required. The resource name of the instance location using the form:
  497. // `projects/{project_id}/locations/{location_id}`
  498. // where `location_id` refers to a GCP region.
  499. string parent = 1 [
  500. (google.api.field_behavior) = REQUIRED,
  501. (google.api.resource_reference) = {
  502. type: "locations.googleapis.com/Location"
  503. }
  504. ];
  505. // The maximum number of items to return.
  506. //
  507. // If not specified, a default value of 1000 will be used by the service.
  508. // Regardless of the page_size value, the response may include a partial list
  509. // and a caller should only rely on response's
  510. // [`next_page_token`][google.cloud.redis.v1.ListInstancesResponse.next_page_token]
  511. // to determine if there are more instances left to be queried.
  512. int32 page_size = 2;
  513. // The `next_page_token` value returned from a previous
  514. // [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances] request, if any.
  515. string page_token = 3;
  516. }
  517. // Response for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances].
  518. message ListInstancesResponse {
  519. // A list of Redis instances in the project in the specified location,
  520. // or across all locations.
  521. //
  522. // If the `location_id` in the parent field of the request is "-", all regions
  523. // available to the project are queried, and the results aggregated.
  524. // If in such an aggregated query a location is unavailable, a placeholder
  525. // Redis entry is included in the response with the `name` field set to a
  526. // value of the form
  527. // `projects/{project_id}/locations/{location_id}/instances/`- and the
  528. // `status` field set to ERROR and `status_message` field set to "location not
  529. // available for ListInstances".
  530. repeated Instance instances = 1;
  531. // Token to retrieve the next page of results, or empty if there are no more
  532. // results in the list.
  533. string next_page_token = 2;
  534. // Locations that could not be reached.
  535. repeated string unreachable = 3;
  536. }
  537. // Request for [GetInstance][google.cloud.redis.v1.CloudRedis.GetInstance].
  538. message GetInstanceRequest {
  539. // Required. Redis instance resource name using the form:
  540. // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  541. // where `location_id` refers to a GCP region.
  542. string name = 1 [
  543. (google.api.field_behavior) = REQUIRED,
  544. (google.api.resource_reference) = {
  545. type: "redis.googleapis.com/Instance"
  546. }
  547. ];
  548. }
  549. // Request for [GetInstanceAuthString][google.cloud.redis.v1.CloudRedis.GetInstanceAuthString].
  550. message GetInstanceAuthStringRequest {
  551. // Required. Redis instance resource name using the form:
  552. // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  553. // where `location_id` refers to a GCP region.
  554. string name = 1 [
  555. (google.api.field_behavior) = REQUIRED,
  556. (google.api.resource_reference) = {
  557. type: "redis.googleapis.com/Instance"
  558. }
  559. ];
  560. }
  561. // Instance AUTH string details.
  562. message InstanceAuthString {
  563. // AUTH string set on the instance.
  564. string auth_string = 1;
  565. }
  566. // Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance].
  567. message CreateInstanceRequest {
  568. // Required. The resource name of the instance location using the form:
  569. // `projects/{project_id}/locations/{location_id}`
  570. // where `location_id` refers to a GCP region.
  571. string parent = 1 [
  572. (google.api.field_behavior) = REQUIRED,
  573. (google.api.resource_reference) = {
  574. type: "locations.googleapis.com/Location"
  575. }
  576. ];
  577. // Required. The logical name of the Redis instance in the customer project
  578. // with the following restrictions:
  579. //
  580. // * Must contain only lowercase letters, numbers, and hyphens.
  581. // * Must start with a letter.
  582. // * Must be between 1-40 characters.
  583. // * Must end with a number or a letter.
  584. // * Must be unique within the customer project / location
  585. string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
  586. // Required. A Redis [Instance] resource
  587. Instance instance = 3 [(google.api.field_behavior) = REQUIRED];
  588. }
  589. // Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance].
  590. message UpdateInstanceRequest {
  591. // Required. Mask of fields to update. At least one path must be supplied in
  592. // this field. The elements of the repeated paths field may only include these
  593. // fields from [Instance][google.cloud.redis.v1.Instance]:
  594. //
  595. // * `displayName`
  596. // * `labels`
  597. // * `memorySizeGb`
  598. // * `redisConfig`
  599. // * `replica_count`
  600. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];
  601. // Required. Update description.
  602. // Only fields specified in update_mask are updated.
  603. Instance instance = 2 [(google.api.field_behavior) = REQUIRED];
  604. }
  605. // Request for [UpgradeInstance][google.cloud.redis.v1.CloudRedis.UpgradeInstance].
  606. message UpgradeInstanceRequest {
  607. // Required. Redis instance resource name using the form:
  608. // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  609. // where `location_id` refers to a GCP region.
  610. string name = 1 [
  611. (google.api.field_behavior) = REQUIRED,
  612. (google.api.resource_reference) = {
  613. type: "redis.googleapis.com/Instance"
  614. }
  615. ];
  616. // Required. Specifies the target version of Redis software to upgrade to.
  617. string redis_version = 2 [(google.api.field_behavior) = REQUIRED];
  618. }
  619. // Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance].
  620. message DeleteInstanceRequest {
  621. // Required. Redis instance resource name using the form:
  622. // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  623. // where `location_id` refers to a GCP region.
  624. string name = 1 [
  625. (google.api.field_behavior) = REQUIRED,
  626. (google.api.resource_reference) = {
  627. type: "redis.googleapis.com/Instance"
  628. }
  629. ];
  630. }
  631. // The Cloud Storage location for the input content
  632. message GcsSource {
  633. // Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
  634. string uri = 1 [(google.api.field_behavior) = REQUIRED];
  635. }
  636. // The input content
  637. message InputConfig {
  638. // Required. Specify source location of input data
  639. oneof source {
  640. // Google Cloud Storage location where input content is located.
  641. GcsSource gcs_source = 1;
  642. }
  643. }
  644. // Request for [Import][google.cloud.redis.v1.CloudRedis.ImportInstance].
  645. message ImportInstanceRequest {
  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 [(google.api.field_behavior) = REQUIRED];
  650. // Required. Specify data to be imported.
  651. InputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED];
  652. }
  653. // The Cloud Storage location for the output content
  654. message GcsDestination {
  655. // Required. Data destination URI (e.g.
  656. // 'gs://my_bucket/my_object'). Existing files will be overwritten.
  657. string uri = 1 [(google.api.field_behavior) = REQUIRED];
  658. }
  659. // The output content
  660. message OutputConfig {
  661. // Required. Specify destination location of output data
  662. oneof destination {
  663. // Google Cloud Storage destination for output content.
  664. GcsDestination gcs_destination = 1;
  665. }
  666. }
  667. // Request for [Export][google.cloud.redis.v1.CloudRedis.ExportInstance].
  668. message ExportInstanceRequest {
  669. // Required. Redis instance resource name using the form:
  670. // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  671. // where `location_id` refers to a GCP region.
  672. string name = 1 [(google.api.field_behavior) = REQUIRED];
  673. // Required. Specify data to be exported.
  674. OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED];
  675. }
  676. // Request for [Failover][google.cloud.redis.v1.CloudRedis.FailoverInstance].
  677. message FailoverInstanceRequest {
  678. // Specifies different modes of operation in relation to the data retention.
  679. enum DataProtectionMode {
  680. // Defaults to LIMITED_DATA_LOSS if a data protection mode is not
  681. // specified.
  682. DATA_PROTECTION_MODE_UNSPECIFIED = 0;
  683. // Instance failover will be protected with data loss control. More
  684. // specifically, the failover will only be performed if the current
  685. // replication offset diff between primary and replica is under a certain
  686. // threshold.
  687. LIMITED_DATA_LOSS = 1;
  688. // Instance failover will be performed without data loss control.
  689. FORCE_DATA_LOSS = 2;
  690. }
  691. // Required. Redis instance resource name using the form:
  692. // `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
  693. // where `location_id` refers to a GCP region.
  694. string name = 1 [
  695. (google.api.field_behavior) = REQUIRED,
  696. (google.api.resource_reference) = {
  697. type: "redis.googleapis.com/Instance"
  698. }
  699. ];
  700. // Optional. Available data protection modes that the user can choose. If it's
  701. // unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
  702. DataProtectionMode data_protection_mode = 2 [(google.api.field_behavior) = OPTIONAL];
  703. }
  704. // Represents the v1 metadata of the long-running operation.
  705. message OperationMetadata {
  706. // Creation timestamp.
  707. google.protobuf.Timestamp create_time = 1;
  708. // End timestamp.
  709. google.protobuf.Timestamp end_time = 2;
  710. // Operation target.
  711. string target = 3;
  712. // Operation verb.
  713. string verb = 4;
  714. // Operation status details.
  715. string status_detail = 5;
  716. // Specifies if cancellation was requested for the operation.
  717. bool cancel_requested = 6;
  718. // API version.
  719. string api_version = 7;
  720. }
  721. // This location metadata represents additional configuration options for a
  722. // given location where a Redis instance may be created. All fields are output
  723. // only. It is returned as content of the
  724. // `google.cloud.location.Location.metadata` field.
  725. message LocationMetadata {
  726. // Output only. The set of available zones in the location. The map is keyed
  727. // by the lowercase ID of each zone, as defined by GCE. These keys can be
  728. // specified in `location_id` or `alternative_location_id` fields when
  729. // creating a Redis instance.
  730. map<string, ZoneMetadata> available_zones = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  731. }
  732. // Defines specific information for a particular zone. Currently empty and
  733. // reserved for future use only.
  734. message ZoneMetadata {
  735. }
  736. // TlsCertificate Resource
  737. message TlsCertificate {
  738. // Serial number, as extracted from the certificate.
  739. string serial_number = 1;
  740. // PEM representation.
  741. string cert = 2;
  742. // Output only. The time when the certificate was created in [RFC
  743. // 3339](https://tools.ietf.org/html/rfc3339) format, for example
  744. // `2020-05-18T00:00:00.094Z`.
  745. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  746. // Output only. The time when the certificate expires in [RFC
  747. // 3339](https://tools.ietf.org/html/rfc3339) format, for example
  748. // `2020-05-18T00:00:00.094Z`.
  749. google.protobuf.Timestamp expire_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  750. // Sha1 Fingerprint of the certificate.
  751. string sha1_fingerprint = 5;
  752. }