diff options
author | Google APIs <noreply@google.com> | 2019-04-04 17:52:08 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2019-04-04 17:52:32 -0700 |
commit | 327ff9c09f4b2bcc9633f035a58ad348e45fb2a0 (patch) | |
tree | 69721fb48f427bd01cdb3f4e214f4bcefef86852 | |
parent | 1666c6c390adb3e2148bbc3be852ecf844bddeca (diff) | |
download | googleapis-327ff9c09f4b2bcc9633f035a58ad348e45fb2a0.tar.gz |
Synchronize new proto/yaml changes.
PiperOrigin-RevId: 242045478
-rw-r--r-- | google/cloud/redis/redis_v1beta1.yaml | 26 | ||||
-rw-r--r-- | google/cloud/redis/v1beta1/cloud_redis.proto | 107 | ||||
-rw-r--r-- | google/cloud/redis/v1beta1/redis_gapic.yaml | 57 |
3 files changed, 139 insertions, 51 deletions
diff --git a/google/cloud/redis/redis_v1beta1.yaml b/google/cloud/redis/redis_v1beta1.yaml index 494b82aa5..1abe57a6d 100644 --- a/google/cloud/redis/redis_v1beta1.yaml +++ b/google/cloud/redis/redis_v1beta1.yaml @@ -11,9 +11,7 @@ types: - name: google.cloud.redis.v1beta1.ZoneMetadata documentation: - summary: |- - The Google Cloud Memorystore for Redis API is used for creating and managing - Redis instances on the Google Cloud Platform. + summary: Creates and manages Redis instances on the Google Cloud Platform. backend: rules: @@ -25,6 +23,8 @@ backend: deadline: 60.0 - selector: google.longrunning.Operations.CancelOperation deadline: 60.0 + - selector: google.longrunning.Operations.WaitOperation + deadline: 60.0 - selector: google.cloud.redis.v1beta1.CloudRedis.ListInstances deadline: 60.0 - selector: google.cloud.redis.v1beta1.CloudRedis.GetInstance @@ -33,23 +33,29 @@ backend: deadline: 60.0 - selector: google.cloud.redis.v1beta1.CloudRedis.UpdateInstance deadline: 60.0 + - selector: google.cloud.redis.v1beta1.CloudRedis.FailoverInstance + deadline: 60.0 - selector: google.cloud.redis.v1beta1.CloudRedis.DeleteInstance deadline: 60.0 http: rules: - - selector: google.longrunning.Operations.ListOperations - get: '/v1beta1/{name=projects/*/locations/*}/operations' - additional_bindings: - + - selector: google.longrunning.Operations.CancelOperation + post: '/v1beta1/{name=projects/*/locations/*/operations/*}:cancel' + - selector: google.longrunning.Operations.DeleteOperation + delete: '/v1beta1/{name=projects/*/locations/*/operations/*}' - selector: google.longrunning.Operations.GetOperation get: '/v1beta1/{name=projects/*/locations/*/operations/*}' - additional_bindings: - + - selector: google.longrunning.Operations.ListOperations + get: '/v1beta1/{name=projects/*/locations/*}/operations' authentication: rules: - - selector: '*' + - selector: 'google.cloud.redis.v1beta1.CloudRedis.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform + - selector: 'google.longrunning.Operations.*' oauth: canonical_scopes: |- https://www.googleapis.com/auth/cloud-platform diff --git a/google/cloud/redis/v1beta1/cloud_redis.proto b/google/cloud/redis/v1beta1/cloud_redis.proto index 778b2e444..0335a0026 100644 --- a/google/cloud/redis/v1beta1/cloud_redis.proto +++ b/google/cloud/redis/v1beta1/cloud_redis.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,12 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; package google.cloud.redis.v1beta1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -65,7 +67,7 @@ service CloudRedis { // Creates a Redis instance based on the specified tier and memory size. // - // By default, the instance is peered to the project's + // By default, the instance is accessible from the project's // [default network](/compute/docs/networks-and-firewalls#networks). // // The creation is executed asynchronously and callers may check the returned @@ -96,6 +98,16 @@ service CloudRedis { }; } + // Failover the master role to current replica node against a specific + // STANDARD tier redis instance. + rpc FailoverInstance(FailoverInstanceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/instances/*}:failover" + body: "*" + }; + } + // Deletes a specific Redis instance. Instance stops serving and data is // deleted. rpc DeleteInstance(DeleteInstanceRequest) @@ -127,12 +139,17 @@ message Instance { // Redis instance is being deleted. DELETING = 4; - // Redis instance is being repaired and may be unusable. Details can be - // found in the `status_message` field. + // Redis instance is being repaired and may be unusable. REPAIRING = 5; // Maintenance is being performed on this Redis instance. MAINTENANCE = 6; + + // Redis instance is importing data (availability may be affected). + IMPORTING = 8; + + // Redis instance is failing over (availability may be affected). + FAILING_OVER = 10; } // Available service tiers to choose from @@ -152,7 +169,7 @@ message Instance { // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` // // Note: Redis instances are managed and addressed at regional level so - // location_id here refers to a GCP region; however, users get to choose which + // location_id here refers to a GCP region; however, users may choose which // specific zone (or collection of zones for cross-zone instances) an instance // should be provisioned in. Refer to [location_id] and // [alternative_location_id] fields for more details. @@ -167,7 +184,7 @@ message Instance { // Optional. The zone where the instance will be provisioned. If not provided, // the service will choose a zone for the instance. For STANDARD_HA tier, // instances will be created across two zones for protection against zonal - // failures. if [alternative_location_id] is also provided, it must be + // failures. If [alternative_location_id] is also provided, it must be // different from [location_id]. string location_id = 4; @@ -177,27 +194,32 @@ message Instance { string alternative_location_id = 5; // Optional. The version of Redis software. - // If not provided, latest supported version will be used. + // If not provided, latest supported version will be used. Updating the + // version will perform an upgrade/downgrade to the new version. Currently, + // the supported values are: + // + // * `REDIS_4_0` for Redis 4.0 compatibility + // * `REDIS_3_2` for Redis 3.2 compatibility (default) string redis_version = 7; // Optional. The CIDR range of internal addresses that are reserved for this // instance. If not provided, the service will choose an unused /29 block, // for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique - // and non-overlapping with existing subnets in a network. + // and non-overlapping with existing subnets in an authorized network. string reserved_ip_range = 9; - // Output only. Hostname or IP address of the exposed redis endpoint used by + // Output only. Hostname or IP address of the exposed Redis endpoint used by // clients to connect to the service. string host = 10; - // Output only. The port number of the exposed redis endpoint. + // Output only. The port number of the exposed Redis endpoint. int32 port = 11; - // Output only. The current zone where the Redis endpoint is placed. In - // single zone deployments, this will always be the same as [location_id] - // provided by the user at creation time. In cross-zone instances (only - // applicable in STANDARD_HA tier), this can be either [location_id] or - // [alternative_location_id] and can change on a failover event. + // Output only. The current zone where the Redis endpoint is placed. For Basic + // Tier instances, this will always be the same as the [location_id] + // provided by the user at creation time. For Standard Tier instances, + // this can be either [location_id] or [alternative_location_id] and can + // change after a failover event. string current_location_id = 12; // Output only. The time the instance was created. @@ -213,14 +235,23 @@ message Instance { // Optional. Redis configuration parameters, according to // http://redis.io/topics/config. Currently, the only supported parameters // are: - // * maxmemory-policy - // * notify-keyspace-events + // + // Redis 3.2 and above: + // + // * maxmemory-policy + // * notify-keyspace-events + // + // Redis 4.0 and above: + // + // * activedefrag + // * lfu-log-factor + // * lfu-decay-time map<string, string> redis_configs = 16; // Required. The service tier of the instance. Tier tier = 17; - // Required. Redis memory size in GB. + // Required. Redis memory size in GiB. int32 memory_size_gb = 18; // Optional. The full name of the Google Compute Engine @@ -270,6 +301,9 @@ message ListInstancesResponse { // Token to retrieve the next page of results, or empty if there are no more // results in the list. string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; } // Request for [GetInstance][google.cloud.redis.v1beta1.CloudRedis.GetInstance]. @@ -307,11 +341,12 @@ message CreateInstanceRequest { message UpdateInstanceRequest { // Required. Mask of fields to update. At least one path must be supplied in // this field. The elements of the repeated paths field may only include these - // fields from [Instance][CloudRedis.Instance]: - // * `display_name` - // * `labels` - // * `memory_size_gb` - // * `redis_config` + // fields from [Instance][google.cloud.redis.v1beta1.Instance]: + // + // * `displayName` + // * `labels` + // * `memorySizeGb` + // * `redisConfig` google.protobuf.FieldMask update_mask = 1; // Required. Update description. @@ -328,6 +363,32 @@ message DeleteInstanceRequest { string name = 1; } +// Request for +// [Failover][google.cloud.redis.v1beta1.CloudRedis.FailoverInstance]. +message FailoverInstanceRequest { + enum DataProtectionMode { + DATA_PROTECTION_MODE_UNSPECIFIED = 0; + + // Instance failover will be protected with data loss control. More + // specifically, the failover will only be performed if the current + // replication offset diff between master and replica is under a certain + // threshold. + LIMITED_DATA_LOSS = 1; + + // Instance failover will be performed without data loss control. + FORCE_DATA_LOSS = 2; + } + + // Required. Redis instance resource name using the form: + // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + // where `location_id` refers to a GCP region + string name = 1; + + // Optional. Available data protection modes that the user can choose. If it's + // unspecified, data protection mode will be LIMITED_DATA_LOSS by default. + DataProtectionMode data_protection_mode = 2; +} + // This location metadata represents additional configuration options for a // given location where a Redis instance may be created. All fields are output // only. It is returned as content of the diff --git a/google/cloud/redis/v1beta1/redis_gapic.yaml b/google/cloud/redis/v1beta1/redis_gapic.yaml index 7497edf1f..858b35bf6 100644 --- a/google/cloud/redis/v1beta1/redis_gapic.yaml +++ b/google/cloud/redis/v1beta1/redis_gapic.yaml @@ -18,7 +18,7 @@ language_settings: package_name: redis.v1beta1 # A list of API interface configurations. interfaces: - # The fully qualified name of the API interface. +# The fully qualified name of the API interface. - name: google.cloud.redis.v1beta1.CloudRedis # A list of resource collection configurations. # Consists of a name_pattern and an entity_name. @@ -39,8 +39,8 @@ interfaces: retry_codes_def: - name: idempotent retry_codes: - - UNAVAILABLE - DEADLINE_EXCEEDED + - UNAVAILABLE - name: non_idempotent retry_codes: [] # Definition for retry/backoff parameters. @@ -161,14 +161,14 @@ interfaces: long_running: return_type: google.cloud.redis.v1beta1.Instance metadata_type: google.protobuf.Any - initial_poll_delay_millis: 60000 # 1 minutes + initial_poll_delay_millis: 60000 # 1 minutes poll_delay_multiplier: 1.5 - max_poll_delay_millis: 360000 # 6 minutes - total_poll_timeout_millis: 1200000 # 20 minutes + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 1200000 # 20 minutes sample_code_init_fields: - - instance_id="test_instance" - - instance.tier="BASIC" - - instance.memory_size_gb=1 + - instance_id="test_instance" + - instance.tier="BASIC" + - instance.memory_size_gb=1 - name: UpdateInstance flattening: groups: @@ -187,15 +187,15 @@ interfaces: long_running: return_type: google.cloud.redis.v1beta1.Instance metadata_type: google.protobuf.Any - initial_poll_delay_millis: 60000 # 1 minutes + initial_poll_delay_millis: 60000 # 1 minutes poll_delay_multiplier: 1.5 - max_poll_delay_millis: 360000 # 6 minutes - total_poll_timeout_millis: 1200000 # 20 minutes + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 7200000 # 120 minutes sample_code_init_fields: - - update_mask.paths[0]="display_name" - - update_mask.paths[1]="memory_size_gb" - - instance.display_name="UpdatedDisplayName" - - instance.memory_size_gb=4 + - update_mask.paths[0]="display_name" + - update_mask.paths[1]="memory_size_gb" + - instance.display_name="UpdatedDisplayName" + - instance.memory_size_gb=4 - name: DeleteInstance flattening: groups: @@ -212,10 +212,31 @@ interfaces: long_running: return_type: google.protobuf.Empty metadata_type: google.protobuf.Any - initial_poll_delay_millis: 60000 # 1 minutes + initial_poll_delay_millis: 60000 # 1 minutes poll_delay_multiplier: 1.5 - max_poll_delay_millis: 360000 # 6 minutes - total_poll_timeout_millis: 1200000 # 20 minutes + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 1200000 # 20 minutes + - name: FailoverInstance + flattening: + groups: + - parameters: + - name + - data_protection_mode + required_fields: + - name + - data_protection_mode + retry_codes_name: non_idempotent + retry_params_name: default + field_name_patterns: + name: instance + long_running: + return_type: google.cloud.redis.v1beta1.Instance + metadata_type: google.protobuf.Any + initial_poll_delay_millis: 60000 # 1 minutes + poll_delay_multiplier: 1.5 + max_poll_delay_millis: 360000 # 6 minutes + total_poll_timeout_millis: 1200000 # 20 minutes + timeout_millis: 60000 resource_name_generation: - message_name: ListInstancesRequest field_entity_map: |