Open emilianooddo opened 1 year ago
I was able to reproduce the issue. I was able to get the code to work by specifying an api_endpoint
. For example, the code below works
endpoint = "us-west1-gkemulticloud.googleapis.com"
client_options = {"api_endpoint": endpoint}
client = gke_multicloud_v1.AttachedClustersClient(client_options=client_options)
See the full code below
from google.cloud import gke_multicloud_v1
def sample_list_attached_clusters():
# Specify the endpoint
endpoint = "us-west1-gkemulticloud.googleapis.com"
client_options = {"api_endpoint": endpoint}
# Create a client
client = gke_multicloud_v1.AttachedClustersClient(client_options=client_options)
# Initialize request argument(s)
request = gke_multicloud_v1.ListAttachedClustersRequest(
parent="projects/partheniou-303520/locations/us-west1",
)
# Make the request
page_result = client.list_attached_clusters(request=request)
# Handle the response
for response in page_result:
print(response)
sample_list_attached_clusters()
I'll keep this issue open so we can improve the sample code and/or client.
I'll transfer this issue to the repository that generates the code snippets so we can track improving the code snippets that we generate.
Hi, I tried to use the list_attached_clusters method with AttachedClustersClient, but I receive the following error:
For better understanding, I write down the code sample that I've used:
Thanks in advance