Skip to content

Commit

Permalink
docs: Proto field comment updates, edit general gRPC API warning
Browse files Browse the repository at this point in the history
fix: Clear storage_grpc_service_config.json to avoid nested retry strategies

PiperOrigin-RevId: 602881263
  • Loading branch information
Google APIs authored and Copybara-Service committed Jan 31, 2024
1 parent 3dbe7d4 commit f42edbe
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 34 deletions.
29 changes: 11 additions & 18 deletions google/storage/v2/storage.proto
Expand Up @@ -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";
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
14 changes: 1 addition & 13 deletions 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": []
}
17 changes: 14 additions & 3 deletions google/storage/v2/storage_v2.yaml
Expand Up @@ -4,6 +4,7 @@ name: storage.googleapis.com
title: Cloud Storage API

apis:
- name: google.longrunning.Operations
- name: google.storage.v2.Storage

types:
Expand All @@ -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
Expand All @@ -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: |-
Expand Down

0 comments on commit f42edbe

Please sign in to comment.