1- // Copyright 2021 Google LLC
1+ // Copyright 2023 Google LLC
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ import "google/api/resource.proto";
2323import "google/cloud/gkehub/v1/feature.proto" ;
2424import "google/cloud/gkehub/v1/membership.proto" ;
2525import "google/longrunning/operations.proto" ;
26+ import "google/protobuf/empty.proto" ;
2627import "google/protobuf/field_mask.proto" ;
2728import "google/protobuf/timestamp.proto" ;
2829
@@ -43,17 +44,22 @@ option ruby_package = "Google::Cloud::GkeHub::V1";
4344// * [Membership][google.cloud.gkehub.v1.Membership]
4445// * [Feature][google.cloud.gkehub.v1.Feature]
4546//
46- // GKE Hub is currently only available in the global region.
47+ // GKE Hub is currently available in the global region and all regions in
48+ // https://cloud.google.com/compute/docs/regions-zones. Feature is only
49+ // available in global region while membership is global region and all the
50+ // regions.
4751//
4852// **Membership management may be non-trivial:** it is recommended to use one
4953// of the Google-provided client libraries or tools where possible when working
5054// with Membership resources.
5155service GkeHub {
5256 option (google.api.default_host ) = "gkehub.googleapis.com" ;
53- option (google.api.oauth_scopes ) = "https://www.googleapis.com/auth/cloud-platform" ;
57+ option (google.api.oauth_scopes ) =
58+ "https://www.googleapis.com/auth/cloud-platform" ;
5459
5560 // Lists Memberships in a given project and location.
56- rpc ListMemberships (ListMembershipsRequest ) returns (ListMembershipsResponse ) {
61+ rpc ListMemberships (ListMembershipsRequest )
62+ returns (ListMembershipsResponse ) {
5763 option (google.api.http ) = {
5864 get : "/v1/{parent=projects/*/locations/*}/memberships"
5965 };
@@ -89,7 +95,8 @@ service GkeHub {
8995 // **This is currently only supported for GKE clusters on Google Cloud**.
9096 // To register other clusters, follow the instructions at
9197 // https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
92- rpc CreateMembership (CreateMembershipRequest ) returns (google.longrunning.Operation ) {
98+ rpc CreateMembership (CreateMembershipRequest )
99+ returns (google.longrunning.Operation ) {
93100 option (google.api.http ) = {
94101 post : "/v1/{parent=projects/*/locations/*}/memberships"
95102 body : "resource"
@@ -102,7 +109,8 @@ service GkeHub {
102109 }
103110
104111 // Adds a new Feature.
105- rpc CreateFeature (CreateFeatureRequest ) returns (google.longrunning.Operation ) {
112+ rpc CreateFeature (CreateFeatureRequest )
113+ returns (google.longrunning.Operation ) {
106114 option (google.api.http ) = {
107115 post : "/v1/{parent=projects/*/locations/*}/features"
108116 body : "resource"
@@ -119,7 +127,8 @@ service GkeHub {
119127 // **This is currently only supported for GKE clusters on Google Cloud**.
120128 // To unregister other clusters, follow the instructions at
121129 // https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
122- rpc DeleteMembership (DeleteMembershipRequest ) returns (google.longrunning.Operation ) {
130+ rpc DeleteMembership (DeleteMembershipRequest )
131+ returns (google.longrunning.Operation ) {
123132 option (google.api.http ) = {
124133 delete : "/v1/{name=projects/*/locations/*/memberships/*}"
125134 };
@@ -131,7 +140,8 @@ service GkeHub {
131140 }
132141
133142 // Removes a Feature.
134- rpc DeleteFeature (DeleteFeatureRequest ) returns (google.longrunning.Operation ) {
143+ rpc DeleteFeature (DeleteFeatureRequest )
144+ returns (google.longrunning.Operation ) {
135145 option (google.api.http ) = {
136146 delete : "/v1/{name=projects/*/locations/*/features/*}"
137147 };
@@ -143,7 +153,8 @@ service GkeHub {
143153 }
144154
145155 // Updates an existing Membership.
146- rpc UpdateMembership (UpdateMembershipRequest ) returns (google.longrunning.Operation ) {
156+ rpc UpdateMembership (UpdateMembershipRequest )
157+ returns (google.longrunning.Operation ) {
147158 option (google.api.http ) = {
148159 patch : "/v1/{name=projects/*/locations/*/memberships/*}"
149160 body : "resource"
@@ -156,7 +167,8 @@ service GkeHub {
156167 }
157168
158169 // Updates an existing Feature.
159- rpc UpdateFeature (UpdateFeatureRequest ) returns (google.longrunning.Operation ) {
170+ rpc UpdateFeature (UpdateFeatureRequest )
171+ returns (google.longrunning.Operation ) {
160172 option (google.api.http ) = {
161173 patch : "/v1/{name=projects/*/locations/*/features/*}"
162174 body : "resource"
@@ -172,7 +184,8 @@ service GkeHub {
172184 //
173185 // **This method is used internally by Google-provided libraries.**
174186 // Most clients should not need to call this method directly.
175- rpc GenerateConnectManifest (GenerateConnectManifestRequest ) returns (GenerateConnectManifestResponse ) {
187+ rpc GenerateConnectManifest (GenerateConnectManifestRequest )
188+ returns (GenerateConnectManifestResponse ) {
176189 option (google.api.http ) = {
177190 get : "/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest"
178191 };
@@ -181,27 +194,28 @@ service GkeHub {
181194
182195// Request message for `GkeHub.ListMemberships` method.
183196message ListMembershipsRequest {
184- // Required. The parent (project and location) where the Memberships will be listed.
185- // Specified in the format `projects/*/locations/*`.
197+ // Required. The parent (project and location) where the Memberships will be
198+ // listed. Specified in the format `projects/*/locations/*`.
199+ // `projects/*/locations/-` list memberships in all the regions.
186200 string parent = 1 [
187201 (google.api.field_behavior ) = REQUIRED ,
188202 (google.api.resource_reference ) = {
189203 child_type : "gkehub.googleapis.com/Membership"
190204 }
191205 ];
192206
193- // Optional. When requesting a 'page' of resources, `page_size` specifies number of
194- // resources to return. If unspecified or set to 0, all resources will
195- // be returned.
207+ // Optional. When requesting a 'page' of resources, `page_size` specifies
208+ // number of resources to return. If unspecified or set to 0, all resources
209+ // will be returned.
196210 int32 page_size = 2 [(google.api.field_behavior ) = OPTIONAL ];
197211
198212 // Optional. Token returned by previous call to `ListMemberships` which
199213 // specifies the position in the list from where to continue listing the
200214 // resources.
201215 string page_token = 3 [(google.api.field_behavior ) = OPTIONAL ];
202216
203- // Optional. Lists Memberships that match the filter expression, following the syntax
204- // outlined in https://google.aip.dev/160.
217+ // Optional. Lists Memberships that match the filter expression, following the
218+ // syntax outlined in https://google.aip.dev/160.
205219 //
206220 // Examples:
207221 //
@@ -255,17 +269,17 @@ message GetMembershipRequest {
255269
256270// Request message for the `GkeHub.CreateMembership` method.
257271message CreateMembershipRequest {
258- // Required. The parent (project and location) where the Memberships will be created.
259- // Specified in the format `projects/*/locations/*`.
272+ // Required. The parent (project and location) where the Memberships will be
273+ // created. Specified in the format `projects/*/locations/*`.
260274 string parent = 1 [
261275 (google.api.field_behavior ) = REQUIRED ,
262276 (google.api.resource_reference ) = {
263277 child_type : "gkehub.googleapis.com/Membership"
264278 }
265279 ];
266280
267- // Required. Client chosen ID for the membership. `membership_id` must be a valid RFC
268- // 1123 compliant DNS label:
281+ // Required. Client chosen ID for the membership. `membership_id` must be a
282+ // valid RFC 1123 compliant DNS label:
269283 //
270284 // 1. At most 63 characters in length
271285 // 2. It must consist of lower case alphanumeric characters or `-`
@@ -319,6 +333,11 @@ message DeleteMembershipRequest {
319333 // The request ID must be a valid UUID with the exception that zero UUID is
320334 // not supported (00000000-0000-0000-0000-000000000000).
321335 string request_id = 2 [(google.api.field_behavior ) = OPTIONAL ];
336+
337+ // Optional. If set to true, any subresource from this Membership will also be
338+ // deleted. Otherwise, the request will only work if the Membership has no
339+ // subresource.
340+ bool force = 3 [(google.api.field_behavior ) = OPTIONAL ];
322341}
323342
324343// Request message for `GkeHub.UpdateMembership` method.
@@ -333,7 +352,8 @@ message UpdateMembershipRequest {
333352 ];
334353
335354 // Required. Mask of fields to update.
336- google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior ) = REQUIRED ];
355+ google.protobuf.FieldMask update_mask = 2
356+ [(google.api.field_behavior ) = REQUIRED ];
337357
338358 // Required. Only fields specified in update_mask are updated.
339359 // If you specify a field in the update_mask but don't specify its value here
@@ -365,30 +385,32 @@ message UpdateMembershipRequest {
365385// method.
366386// .
367387message GenerateConnectManifestRequest {
368- // Required. The Membership resource name the Agent will associate with, in the format
369- // `projects/*/locations/*/memberships/*`.
388+ // Required. The Membership resource name the Agent will associate with, in
389+ // the format `projects/*/locations/*/memberships/*`.
370390 string name = 1 [
371391 (google.api.field_behavior ) = REQUIRED ,
372392 (google.api.resource_reference ) = {
373393 type : "gkehub.googleapis.com/Membership"
374394 }
375395 ];
376396
377- // Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`.
397+ // Optional. Namespace for GKE Connect agent resources. Defaults to
398+ // `gke-connect`.
378399 //
379400 // The Connect Agent is authorized automatically when run in the default
380401 // namespace. Otherwise, explicit authorization must be granted with an
381402 // additional IAM binding.
382403 string namespace = 2 [(google.api.field_behavior ) = OPTIONAL ];
383404
384- // Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com
385- // requires the use of a proxy. Format must be in the form
386- // `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol
405+ // Optional. URI of a proxy if connectivity from the agent to
406+ // gkeconnect.googleapis.com requires the use of a proxy. Format must be in
407+ // the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol
387408 // supported by the proxy. This will direct the connect agent's outbound
388409 // traffic through a HTTP(S) proxy.
389410 bytes proxy = 3 [(google.api.field_behavior ) = OPTIONAL ];
390411
391- // Optional. The Connect agent version to use. Defaults to the most current version.
412+ // Optional. The Connect agent version to use. Defaults to the most current
413+ // version.
392414 string version = 4 [(google.api.field_behavior ) = OPTIONAL ];
393415
394416 // Optional. If true, generate the resources for upgrade only. Some resources
0 commit comments