@@ -32,8 +32,14 @@ option java_package = "com.google.cloud.gkehub.v1beta1";
3232option php_namespace = "Google\\Cloud\\GkeHub\\V1beta1" ;
3333option ruby_package = "Google::Cloud::GkeHub::V1beta1" ;
3434
35- // GKE Hub CRUD API for the Membership resource.
36- // The Membership service is currently only available in the global location.
35+ // The GKE Hub MembershipService handles the registration of many Kubernetes
36+ // clusters to Google Cloud, represented with the [Membership][google.cloud.gkehub.v1beta1.Membership] resource.
37+ //
38+ // GKE Hub is currently only available in the global region.
39+ //
40+ // **Membership management may be non-trivial:** it is recommended to use one
41+ // of the Google-provided client libraries or tools where possible when working
42+ // with Membership resources.
3743service GkeHubMembershipService {
3844 option (google.api.default_host ) = "gkehub.googleapis.com" ;
3945 option (google.api.oauth_scopes ) = "https://www.googleapis.com/auth/cloud-platform" ;
@@ -54,7 +60,11 @@ service GkeHubMembershipService {
5460 option (google.api.method_signature ) = "name" ;
5561 }
5662
57- // Adds a new Membership.
63+ // Creates a new Membership.
64+ //
65+ // **This is currently only supported for GKE clusters on Google Cloud**.
66+ // To register other clusters, follow the instructions at
67+ // https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
5868 rpc CreateMembership (CreateMembershipRequest ) returns (google.longrunning.Operation ) {
5969 option (google.api.http ) = {
6070 post : "/v1beta1/{parent=projects/*/locations/*}/memberships"
@@ -68,6 +78,10 @@ service GkeHubMembershipService {
6878 }
6979
7080 // Removes a Membership.
81+ //
82+ // **This is currently only supported for GKE clusters on Google Cloud**.
83+ // To unregister other clusters, follow the instructions at
84+ // https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
7185 rpc DeleteMembership (DeleteMembershipRequest ) returns (google.longrunning.Operation ) {
7286 option (google.api.http ) = {
7387 delete : "/v1beta1/{name=projects/*/locations/*/memberships/*}"
@@ -93,6 +107,9 @@ service GkeHubMembershipService {
93107 }
94108
95109 // Generates the manifest for deployment of the GKE connect agent.
110+ //
111+ // **This method is used internally by Google-provided libraries.**
112+ // Most clients should not need to call this method directly.
96113 rpc GenerateConnectManifest (GenerateConnectManifestRequest ) returns (GenerateConnectManifestResponse ) {
97114 option (google.api.http ) = {
98115 get : "/v1beta1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest"
@@ -168,9 +185,9 @@ message Membership {
168185 // Optional. GCP labels for this membership.
169186 map <string , string > labels = 2 [(google.api.field_behavior ) = OPTIONAL ];
170187
171- // Required . Description of this membership, limited to 63 characters.
188+ // Optional . Description of this membership, limited to 63 characters.
172189 // Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*`
173- string description = 3 [(google.api.field_behavior ) = REQUIRED ];
190+ string description = 3 [(google.api.field_behavior ) = OPTIONAL ];
174191
175192 // Type of resource represented by this Membership
176193 oneof type {
@@ -223,8 +240,17 @@ message Membership {
223240// MembershipEndpoint contains information needed to contact a Kubernetes API,
224241// endpoint and any additional Kubernetes metadata.
225242message MembershipEndpoint {
226- // Optional. GKE-specific information. Only present if this Membership is a GKE cluster.
227- GkeCluster gke_cluster = 4 [(google.api.field_behavior ) = OPTIONAL ];
243+ // Cluster information of the registered cluster.
244+ oneof type {
245+ // Optional. Specific information for a GKE-on-GCP cluster.
246+ GkeCluster gke_cluster = 4 [(google.api.field_behavior ) = OPTIONAL ];
247+
248+ // Optional. Specific information for a GKE On-Prem cluster.
249+ OnPremCluster on_prem_cluster = 7 [(google.api.field_behavior ) = OPTIONAL ];
250+
251+ // Optional. Specific information for a GKE Multi-Cloud cluster.
252+ MultiCloudCluster multi_cloud_cluster = 8 [(google.api.field_behavior ) = OPTIONAL ];
253+ }
228254
229255 // Output only. Useful Kubernetes-specific metadata.
230256 KubernetesMetadata kubernetes_metadata = 5 [(google.api.field_behavior ) = OUTPUT_ONLY ];
@@ -308,10 +334,46 @@ message ResourceManifest {
308334message GkeCluster {
309335 // Immutable. Self-link of the GCP resource for the GKE cluster. For example:
310336 //
311- // > container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster
337+ // // container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster
312338 //
313339 // Zonal clusters are also supported.
314340 string resource_link = 1 [(google.api.field_behavior ) = IMMUTABLE ];
341+
342+ // Output only. If cluster_missing is set then it denotes that the GKE cluster no longer
343+ // exists in the GKE Control Plane.
344+ bool cluster_missing = 3 [(google.api.field_behavior ) = OUTPUT_ONLY ];
345+ }
346+
347+ // OnPremCluster contains information specific to GKE On-Prem clusters.
348+ message OnPremCluster {
349+ // Immutable. Self-link of the GCP resource for the GKE On-Prem cluster. For example:
350+ //
351+ // //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/vmwareClusters/my-cluster
352+ // //gkeonprem.googleapis.com/projects/my-project/locations/us-west1-a/bareMetalClusters/my-cluster
353+ string resource_link = 1 [(google.api.field_behavior ) = IMMUTABLE ];
354+
355+ // Output only. If cluster_missing is set then it denotes that
356+ // API(gkeonprem.googleapis.com) resource for this GKE On-Prem cluster no
357+ // longer exists.
358+ bool cluster_missing = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
359+
360+ // Immutable. Whether the cluster is an admin cluster.
361+ bool admin_cluster = 3 [(google.api.field_behavior ) = IMMUTABLE ];
362+ }
363+
364+ // MultiCloudCluster contains information specific to GKE Multi-Cloud clusters.
365+ message MultiCloudCluster {
366+ // Immutable. Self-link of the GCP resource for the GKE Multi-Cloud cluster. For
367+ // example:
368+ //
369+ // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/awsClusters/my-cluster
370+ // //gkemulticloud.googleapis.com/projects/my-project/locations/us-west1-a/azureClusters/my-cluster
371+ string resource_link = 1 [(google.api.field_behavior ) = IMMUTABLE ];
372+
373+ // Output only. If cluster_missing is set then it denotes that
374+ // API(gkemulticloud.googleapis.com) resource for this GKE Multi-Cloud cluster
375+ // no longer exists.
376+ bool cluster_missing = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
315377}
316378
317379// KubernetesMetadata provides informational metadata for Memberships
@@ -494,13 +556,43 @@ message CreateMembershipRequest {
494556
495557 // Required. The membership to create.
496558 Membership resource = 3 [(google.api.field_behavior ) = REQUIRED ];
559+
560+ // Optional. A request ID to identify requests. Specify a unique request ID
561+ // so that if you must retry your request, the server will know to ignore
562+ // the request if it has already been completed. The server will guarantee
563+ // that for at least 60 minutes after the first request.
564+ //
565+ // For example, consider a situation where you make an initial request and
566+ // the request times out. If you make the request again with the same request
567+ // ID, the server can check if original operation with the same request ID
568+ // was received, and if so, will ignore the second request. This prevents
569+ // clients from accidentally creating duplicate commitments.
570+ //
571+ // The request ID must be a valid UUID with the exception that zero UUID is
572+ // not supported (00000000-0000-0000-0000-000000000000).
573+ string request_id = 4 [(google.api.field_behavior ) = OPTIONAL ];
497574}
498575
499576// Request message for `GkeHubMembershipService.DeleteMembership` method.
500577message DeleteMembershipRequest {
501578 // Required. The Membership resource name in the format
502579 // `projects/*/locations/*/memberships/*`.
503580 string name = 1 [(google.api.field_behavior ) = REQUIRED ];
581+
582+ // Optional. A request ID to identify requests. Specify a unique request ID
583+ // so that if you must retry your request, the server will know to ignore
584+ // the request if it has already been completed. The server will guarantee
585+ // that for at least 60 minutes after the first request.
586+ //
587+ // For example, consider a situation where you make an initial request and
588+ // the request times out. If you make the request again with the same request
589+ // ID, the server can check if original operation with the same request ID
590+ // was received, and if so, will ignore the second request. This prevents
591+ // clients from accidentally creating duplicate commitments.
592+ //
593+ // The request ID must be a valid UUID with the exception that zero UUID is
594+ // not supported (00000000-0000-0000-0000-000000000000).
595+ string request_id = 4 [(google.api.field_behavior ) = OPTIONAL ];
504596}
505597
506598// Request message for `GkeHubMembershipService.UpdateMembership` method.
@@ -519,7 +611,24 @@ message UpdateMembershipRequest {
519611 // If you are updating a map field, set the value of a key to null or empty
520612 // string to delete the key from the map. It's not possible to update a key's
521613 // value to the empty string.
614+ // If you specify the update_mask to be a special path "*", fully replaces all
615+ // user-modifiable fields to match `resource`.
522616 Membership resource = 3 [(google.api.field_behavior ) = REQUIRED ];
617+
618+ // Optional. A request ID to identify requests. Specify a unique request ID
619+ // so that if you must retry your request, the server will know to ignore
620+ // the request if it has already been completed. The server will guarantee
621+ // that for at least 60 minutes after the first request.
622+ //
623+ // For example, consider a situation where you make an initial request and
624+ // the request times out. If you make the request again with the same request
625+ // ID, the server can check if original operation with the same request ID
626+ // was received, and if so, will ignore the second request. This prevents
627+ // clients from accidentally creating duplicate commitments.
628+ //
629+ // The request ID must be a valid UUID with the exception that zero UUID is
630+ // not supported (00000000-0000-0000-0000-000000000000).
631+ string request_id = 4 [(google.api.field_behavior ) = OPTIONAL ];
523632}
524633
525634// Request message for `GkeHubMembershipService.GenerateConnectManifest`
0 commit comments