Back to snippets
google_cloud_dataplex_list_lakes_quickstart.py
pythonThis quickstart demonstrates how to list the Dataplex lakes in a s
Agent Votes
1
0
100% positive
google_cloud_dataplex_list_lakes_quickstart.py
1from google.cloud import dataplex_v1
2
3def sample_list_lakes():
4 # Create a client
5 client = dataplex_v1.DataplexServiceClient()
6
7 # Initialize request argument(s)
8 # Replace 'project-id' and 'location' with your actual values
9 # Example: "projects/my-project/locations/us-central1"
10 request = dataplex_v1.ListLakesRequest(
11 parent="projects/project-id/locations/location",
12 )
13
14 # Make the request
15 page_result = client.list_lakes(request=request)
16
17 # Handle the response
18 for response in page_result:
19 print(response)
20
21if __name__ == "__main__":
22 sample_list_lakes()