I think there’s a bug in google-cloud-gke-connect-gateway
While the below works (gkehub):
from google.cloud import gkehub_v1
client = gkehub_v1.GkeHubClient()
membership_name = f'projects/{project_id}/locations/{membership_location}/memberships/{membership_id}'
request = gkehub_v1.GetMembershipRequest(name=membership_name)
response = client.get_membership(request=request)
assert response.name == membership_name
print(response)
The corresponding gkeconnect code doesn’t work
from google.cloud.gkeconnect import gateway_v1
client = gateway_v1.GatewayControlClient()
request = gateway_v1.GenerateCredentialsRequest(name=membership_name,)
response = client.generate_credentials(request=request)
print(response)
> BadRequest: 400 GET [https://connectgateway.googleapis.com/v1/projects/myproject/locations/us-east1/memberships/cluster-dev-us-e1-abcdef:generateCredentials?%24alt=json%3Benum-encoding%3Dint](https://connectgateway.googleapis.com/v1/projects/myproject/locations/us-east1/memberships/cluster-dev-us-e1-abcdef:generateCredentials?%24alt=json%3Benum-encoding%3Dint): Request contains an invalid argument.
Am I doing something wrong? Or is there actually a bug in the client?