From f42edbe352a54ee4a96367cdf766ef0b6a28fb6a Mon Sep 17 00:00:00 2001 From: Google APIs Date: Tue, 30 Jan 2024 17:00:47 -0800 Subject: [PATCH] docs: Proto field comment updates, edit general gRPC API warning fix: Clear storage_grpc_service_config.json to avoid nested retry strategies PiperOrigin-RevId: 602881263 --- google/storage/v2/storage.proto | 29 +++++++------------ .../v2/storage_grpc_service_config.json | 14 +-------- google/storage/v2/storage_v2.yaml | 17 +++++++++-- 3 files changed, 26 insertions(+), 34 deletions(-) diff --git a/google/storage/v2/storage.proto b/google/storage/v2/storage.proto index c9f50a15b55a6..de6e27ea353df 100644 --- a/google/storage/v2/storage.proto +++ b/google/storage/v2/storage.proto @@ -112,34 +112,24 @@ service Storage { option (google.api.method_signature) = "bucket"; } - // Gets the IAM policy for a specified bucket or object. + // Gets the IAM policy for a specified bucket. // The `resource` field in the request should be - // `projects/_/buckets/{bucket}` for a bucket or - // `projects/_/buckets/{bucket}/objects/{object}` for an object. + // `projects/_/buckets/{bucket}`. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.routing) = { routing_parameters { field: "resource" path_template: "{bucket=**}" } - routing_parameters { - field: "resource" - path_template: "{bucket=projects/*/buckets/*}/objects/**" - } }; option (google.api.method_signature) = "resource"; } - // Updates an IAM policy for the specified bucket or object. + // Updates an IAM policy for the specified bucket. // The `resource` field in the request should be - // `projects/_/buckets/{bucket}` for a bucket or - // `projects/_/buckets/{bucket}/objects/{object}` for an object. + // `projects/_/buckets/{bucket}`. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.routing) = { routing_parameters { field: "resource" path_template: "{bucket=**}" } - routing_parameters { - field: "resource" - path_template: "{bucket=projects/*/buckets/*}/objects/**" - } }; option (google.api.method_signature) = "resource,policy"; } @@ -1158,13 +1148,16 @@ message BidiWriteObjectRequest { // covers all the bytes the server has persisted thus far and can be used to // decide what data is safe for the client to drop. Note that the object's // current size reported by the BidiWriteObjectResponse may lag behind the - // number of bytes written by the client. + // number of bytes written by the client. This field is ignored if + // `finish_write` is set to true. bool state_lookup = 7; // Persists data written on the stream, up to and including the current // message, to permanent storage. This option should be used sparingly as it // may reduce performance. Ongoing writes will periodically be persisted on - // the server even when `flush` is not set. + // the server even when `flush` is not set. This field is ignored if + // `finish_write` is set to true since there's no need to checkpoint or flush + // if this message completes the write. bool flush = 8; // If `true`, this indicates that the write is complete. Sending any @@ -2560,10 +2553,10 @@ message Owner { // Specifies a requested range of bytes to download. message ContentRange { - // The starting offset of the object data. + // The starting offset of the object data. This value is inclusive. int64 start = 1; - // The ending offset of the object data. + // The ending offset of the object data. This value is exclusive. int64 end = 2; // The complete length of the object data. diff --git a/google/storage/v2/storage_grpc_service_config.json b/google/storage/v2/storage_grpc_service_config.json index 093922118b1d4..7c12334e10377 100644 --- a/google/storage/v2/storage_grpc_service_config.json +++ b/google/storage/v2/storage_grpc_service_config.json @@ -1,15 +1,3 @@ { - "methodConfig": [{ - "name": [{ "service": "google.storage.v2.Storage"}], - "timeout": "60s", - "retryPolicy": { - "maxAttempts": 5, - "initialBackoff": "1s", - "maxBackoff": "60s", - "backoffMultiplier": 2, - "retryableStatusCodes": [ - "DEADLINE_EXCEEDED", "UNAVAILABLE" - ] - } - }] + "methodConfig": [] } diff --git a/google/storage/v2/storage_v2.yaml b/google/storage/v2/storage_v2.yaml index 35247f5f5558d..8a7aa5f96f21d 100644 --- a/google/storage/v2/storage_v2.yaml +++ b/google/storage/v2/storage_v2.yaml @@ -4,6 +4,7 @@ name: storage.googleapis.com title: Cloud Storage API apis: +- name: google.longrunning.Operations - name: google.storage.v2.Storage types: @@ -16,9 +17,11 @@ documentation: summary: |- Stop. This folder is likely not what you are looking for. - This folder contains protocol buffer definitions for an unreleased API for - accessing Cloud Storage. Unless told otherwise by a Google Cloud - representative, do not use any of the contents of this folder. If you + This folder contains protocol buffer definitions for an API + only accessible to select customers. Customers not participating should + not depend on this file. Please contact Google Cloud sales if you are + interested. Unless told otherwise by a Google Cloud + representative, do not use or otherwise rely on any of the contents of this folder. If you would like to use Cloud Storage, please consult our [official documentation](https://cloud.google.com/storage/docs/apis) for details on our XML and JSON APIs, or else consider one of our @@ -39,6 +42,14 @@ documentation: authentication: rules: + - selector: 'google.longrunning.Operations.*' + oauth: + canonical_scopes: |- + https://www.googleapis.com/auth/cloud-platform, + https://www.googleapis.com/auth/cloud-platform.read-only, + https://www.googleapis.com/auth/devstorage.full_control, + https://www.googleapis.com/auth/devstorage.read_only, + https://www.googleapis.com/auth/devstorage.read_write - selector: 'google.storage.v2.Storage.*' oauth: canonical_scopes: |-